Skip to main content

A library for automating hardware development and testing

Project description

hardware-tools

Unit Test Pylint Coverage Latest Version

A library for automating hardware development and testing


Environment

List of dependencies for package to run.

Required

  • python modules, installed via pip install hardware_tools
    • numpy
    • pyvisa
    • cython
    • colorama
    • matplotlib
    • scipy
    • sklean
    • Pillow
    • scikit-image

Optional

  • Test extensions, installed via pip install hardware_tools[test]
    • time-machine
    • hardware-tools

Virtual Environment

If using hardware-tools in a virtual environment, do not place it within this repo directory. Set it outside due to an issue compiling the extensions with cython since it tries to compile the code inside the virtual environment as well.

mkdir workspace-hardware-tools
cd workspace-hardware-tools
python -m venv .
source ./Scripts/activate # or .\Scripts\activate.bat
git clone https://github.com/WattsUp/hardware-tools
cd hardware-tools
python -m pip install .

Installation / Build / Deployment

# To install latest stable version on PyPi, execute:
python -m pip install hardware_tools

# To install from source, execute:
git clone https://github.com/WattsUp/hardware-tools
cd hardware-tools
python -m pip install .

# For development, install as a link to repository such that code changes are used. And include testing packages
git clone https://github.com/WattsUp/hardware-tools
cd hardware-tools
python -m pip install -e .[test]

Usage

Explain how to use your project.

# TODO

Running Tests

Make sure to install package with testing extension

# To run the automated tests, execute:
python -m tests discover -s tests -t . --locals

# To save the results to file, execute:
python -m tests discover -s tests -t . --locals &> testing.log

## The following is a synopsis of unittest main arguments ##
# To run a singular test file, execute:
python -m tests $path_to_test_file
python -m tests tests.measurement.test_mask

# To run a singular test class, execute:
python -m tests $path_to_test_file.$class
python -m tests tests.measurement.test_mask.TestMaskDecagon

# To run a singular test method, execute:
python -m tests $path_to_test_file.$class.$method
python -m tests tests.measurement.test_mask.TestMaskDecagon.test_init

# Multiple can be strung together
python -m tests tests.measurement.test_mask tests.test_math
# To run coverage and print the report with missing lines, execute:
python -m coverage run && python -m coverage report -m

# To run profiler, execute:
python -m cProfile -s tottime -m tests discover -s tests -t . > profile.log

# To run linting, execute:
python -m pylint hardware_tools tests tools setup.py

Development

Code development of this project adheres to Google Python Guide

Styling

Use yapf to format files, based on Google's guide with the exception of indents being 2 spaces.

# To format all files, execute:
yapf -ir .

Versioning

Versioning of this projects adheres to Semantic Versioning and is implemented using git tags.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hardware-tools-0.2.3.tar.gz (301.3 kB view details)

Uploaded Source

Built Distributions

hardware_tools-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (932.2 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

hardware_tools-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (931.5 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

hardware_tools-0.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (948.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

hardware_tools-0.2.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (852.0 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

File details

Details for the file hardware-tools-0.2.3.tar.gz.

File metadata

  • Download URL: hardware-tools-0.2.3.tar.gz
  • Upload date:
  • Size: 301.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for hardware-tools-0.2.3.tar.gz
Algorithm Hash digest
SHA256 1acbd4050b82b5ade1bc5cc98d6a8b32dc9e3f370a8f644f7eff11f4dc6d33d2
MD5 bce19ced668e219b6e417d2b1e10c177
BLAKE2b-256 d389cf80d78784278d237fce78c17736b665b44cb5266728df6a6eaa6b26bc1b

See more details on using hashes here.

File details

Details for the file hardware_tools-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hardware_tools-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6a0a8afd9cf679f438a7ab44fe1622c205125dfda274ab03da2264c29a606338
MD5 283a4f56b99fac43e9f4b2db3df1407c
BLAKE2b-256 53df0ea6fa4995c7564af70466d3070ffd416324dee7662b9c199ee554d334e3

See more details on using hashes here.

File details

Details for the file hardware_tools-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hardware_tools-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 df32e411a8a7f764b9abe5af48c366dad40631bcf4a80f585cee44375cffe87c
MD5 97d4d26ae83187b50bfb3c7b132380c4
BLAKE2b-256 3beddc0514f55bfb62030297889be6b1f99fa68dcdbd9c0541a50d5b2af16189

See more details on using hashes here.

File details

Details for the file hardware_tools-0.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hardware_tools-0.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c14f9a6726a7238fdf3e6482e506c13fa4562a23b650ef009946cd423b29562f
MD5 1e13984e10dddd00c1cc22cd2f73cebd
BLAKE2b-256 3cea7583e90a96eb5bdbae578719dd3c831a084121ef3819809fa2fdd8ccefed

See more details on using hashes here.

File details

Details for the file hardware_tools-0.2.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hardware_tools-0.2.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 14201390cf175bd6be7a81826dbeaa4a66421029ea70bba222162dbc765ea04a
MD5 27a559d298f739cdad273082bddbdb43
BLAKE2b-256 db3b321a9fed0b80933ee9bdcc190b3d909ec48c15797d6889378c62709c9d3d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page