Coder Social home page Coder Social logo

hardware-tools's Introduction

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.

hardware-tools's People

Contributors

wattsup avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar Kostas Georgiou avatar  avatar

hardware-tools's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.