A framework for testing hardware
Project description
Setup
pip install hatch
Running Tests
hatch run cov
Running Examples
hatch run examples/network.py
Using InfluxDB
hwtest includes an InfluxDB telemetry logger. If you choose to use this, make sure you have InfluxDB configured by following the setup guide. Be sure to install version 2+, as that's the API the logger uses.
You'll also need to create an org and access token inside the InfluxDB UI (accessible via http://localhost:8086/ if running locally). The logger creates the InfluxDB client using environment variables for configuration. Specifically, you'll need to set at least INFLUXDB_V2_ORG and INFLUXDB_V2_TOKEN.
To test your configuration, run:
hatch run examples/influxdb.py
This should write 10 datapoints to the bucket named network-example.
You can also try the subprocess driver example, which runs the same test as the influxdb.py example, but attempts to log telemetry at 50 Hz in the background while running the test.
Distributing hwtest
You may need to distribute a copy of hwtest to customers so they can run tests against your hardware. In order to create packages you can distribute, run
hatch build
This will create a hwtest-*.whl file under a dist/ directory. This will include just the source code, not any examples, tests, or documentation. This .whl file can be installed on another machine with pip install filename.whl. You don't need hatch to use the .whl file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hwtest-0.0.1-py3-none-any.whl.
File metadata
- Download URL: hwtest-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b67d61d77f912ee0a49b5f774dd697edcf0196dff83672b7da912cfe03a1f11a
|
|
| MD5 |
c01ee33fe362a1c1af4fe1d68f6338b8
|
|
| BLAKE2b-256 |
465707cfd75f07df7bf5c81a55f8494c45653a8d611793fd41734e39d35de430
|