Create manufacturing and validation tests for hardware development.
Project description
Pytation
Welcome to the Pytation project! Use Pytation to quickly build reliable test stations for your custom hardware projects. Although building manufacturing test stations is the primary goal of this project, you can also build repeatable development and validation test stations. The framework allows you to run tests using a variety of runners including the graphical PySide6 runner and command line runner.
Project links:
- Documentation on GitHub Pages
- Releases on pypi
- Source Code on GitHub
Terminology and Architecture
A station represents a physical test setup — the equipment, instruments, and fixtures used to test hardware units. A station starts once, opens long-lived equipment, and runs continuously until the operator shuts it down.
Each unit under test goes through a suite — a single pass through the full list of tests. The suite captures all results for that unit into a ZIP file and then resets so the next unit starts fresh. A station runs suites in a loop: load a unit, run the suite, save results, repeat.
A test is a single test function within a suite. Each test receives a context object that provides access to devices, configuration, environment variables, the output filesystem, and user interaction (prompts, wait-for-user, progress reporting).
A device is a piece of equipment or instrument (e.g. a power supply, oscilloscope, or the device under test itself). Each device has a lifecycle that controls when it is opened and closed:
- station (default) — opened once at station start, closed at station stop.
- suite — opened and closed with each suite (each unit).
- test — opened and closed around each individual test.
- manual — opened and closed explicitly by test code.
A runner drives the station. Pytation provides two built-in runners:
- GUI runner — a PySide6 graphical interface with state images, progress bars, and prompt dialogs.
- CLI runner — a command-line interface for headless or scripted operation.
The execution lifecycle is:
station_start
│ station_setup
│ for each unit:
│ │ suite_setup (e.g. wait for operator to load unit)
│ │ for each test:
│ │ │ test_setup
│ │ │ test function (receives Context)
│ │ │ test_teardown
│ │ suite_teardown (e.g. display PASS/FAIL, wait for removal)
│ │ save results to ZIP
station_stop
station_teardown
Quick Start
You will need Python 3.9 or newer. You can install this package using pip:
pip3 install -U pytation
Alternatively, you can clone the repo:
git clone https://github.com/jetperch/pytation.git
cd pytation
pip3 install -U -r requirements.txt
python3 setup.py qt
You can then run the example:
python3 -m pytation gui pytation_examples.simple.STATION
On Windows, you may need to use python rather than python3.
License
All pytation code is released under the permissive Apache 2.0 license. See the License File for details.
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 Distribution
File details
Details for the file pytation-0.4.0.tar.gz.
File metadata
- Download URL: pytation-0.4.0.tar.gz
- Upload date:
- Size: 39.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32cec17b89418796a0c7b334de3158d439fce50926d37dea8107eba13ee77d44
|
|
| MD5 |
fed683573074758490922b0962b80cb3
|
|
| BLAKE2b-256 |
2a25e9f92bb2bdb54df1098503e0f44dff429641ae89d4f52e73bbc8f72023db
|
Provenance
The following attestation bundles were made for pytation-0.4.0.tar.gz:
Publisher:
build.yml on jetperch/pytation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytation-0.4.0.tar.gz -
Subject digest:
32cec17b89418796a0c7b334de3158d439fce50926d37dea8107eba13ee77d44 - Sigstore transparency entry: 1357425052
- Sigstore integration time:
-
Permalink:
jetperch/pytation@d04bfe6dd390818b1b75adfc92be8787ce0045a6 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/jetperch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@d04bfe6dd390818b1b75adfc92be8787ce0045a6 -
Trigger Event:
push
-
Statement type: