Skip to main content

Create manufacturing and validation tests for hardware development.

Project description

Pytation

Build Documentation

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:

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

Pytation GUI

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.

Download files

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

Source Distribution

pytation-0.5.0.tar.gz (46.4 kB view details)

Uploaded Source

File details

Details for the file pytation-0.5.0.tar.gz.

File metadata

  • Download URL: pytation-0.5.0.tar.gz
  • Upload date:
  • Size: 46.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pytation-0.5.0.tar.gz
Algorithm Hash digest
SHA256 5bda4f3df62eac1b00ed5fd693fd30aa5f437690baebfcc0ec8637c7aaef6635
MD5 f2be22966d37f43b397b626c23e55a95
BLAKE2b-256 9d7e70336ba8e421bd87b29ab65fdbec381f16a71dc494c787fb858834c3690a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytation-0.5.0.tar.gz:

Publisher: build.yml on jetperch/pytation

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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