Skip to main content

FixturFab Functional Test System Hardware Utilities Library. Connect and control test hardware for your FixturFab Functional Test System.

Project description

f3ts-hardware-utils

FixturFab Functional Test System Hardware Utilities Library

Connect and Control Test Hardware for your FixturFab Functional Test System

f3ts-hardware-utils is a Python module that contains the basic utilities for creating a PCBA functional test system. This module contains classes for controlling all common test hardware, including:

  • Acroname Manufacturing Test Modules
  • Feasa LED Analyzers
  • FixturFab Test Instruments
  • Segger J-Link Programmers
  • Rigol Power Supplies and Programmable Loads
  • Various USB Relay Hardware

Installation into a Project using poetry

Install the package into your project using poetry:

poetry add f3ts-hardware-utils

Documentation

The documentation for the package can be found here.

Development

Environment Setup

poetry is used for dependency management and pre-commit is used to identify simple issues before submission for code review. Once installed, run the following commands to setup your development environment:

poetry install
pre-commit install

Making changes

Use the following process when making changes to the module:

  1. Create new test cases
  2. Write new feature code and/or bugfixes
  3. Write documentation for new features
  4. Run pre-commit checks and tests prior to committing

To run the pre-commit checks, simply run the following:

poetry run pre-commit run --all-files

Code Quality Tools

black

black is used for code formatting, this is configured within pyproject.toml

To run black manually, run:

poetry run black .

flake8

flake8 is used to enforce additional style guidelines.

To run flake8 manually, run:

poetry run flake8 ./pytest_f3ts

isort

isort is used to automatically reformat python module import statements.

To run isort manually, run:

poetry run isort .

pre-commit

To automatically check if code is ready to be committed and pushed to Gitlab pre-commit is used. This is configured via the .pre-commit-config.yml file.

To run pre-commit manually, run:

poetry run pre-commit run --all-files

Documentation Generation

mkdocs is utilized along with mkdocs-material to generate documentation for this project.

The docs directory contains the general structure for the documentation in the form of markdown files. To autogenerate additional documentation from docstrings, the mkdocstrings module is used.

Developing documentation with the live server

When creating additional documentation it's useful to run the mkdocs server which will live-reload the webpages as you make changes. To start this server, run the following in a terminal: ### pre-commit

poetry run mkdocs serve

Adding a new file for autodocumentation

To add a new python file to the autodocumentation, open the docs/reference.md file. Add a new header to the file, and then add the line ::: f3ts_hardware_utils.{new_file_name}, this will signal to mkdocstrings to process the new file when building the documentation

Manually building and uploading a wheel

poetry config repositories.f3ts-hardware-utils https://us-west1-python.pkg.dev/test-runner-404519/pytest-f3ts/

# On windows you will need to run the following command as two separate commands
# and paste the token into the password prompt for the second command.
gcloud auth print-access-token | poetry config http-basic.f3ts-hardware-utils oauth2accesstoken

poetry publish --repository pytest-f3ts --build

Pipeline Setup

The pipeline is configured via the .gitlab-ci.yml file. The pipeline is configured to run the following stages:

  • linting: Runs the black, flake8, and isort checks
    • Occurs on all merge requests and is required to pass before a merge request can be merged
  • version: Runs the gen-semver.py command to update the version number
    • Occurs after a merge request is accepted.
    • [skip ci] is added to a new Git Commit to prevent the pipeline from running again
  • build: Builds the package and uploads it to the Gitlab package registry
    • Triggered by new tags, which are created by the version stage

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

f3ts_hardware_utils-0.1.19.tar.gz (40.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

f3ts_hardware_utils-0.1.19-py3-none-any.whl (53.1 kB view details)

Uploaded Python 3

File details

Details for the file f3ts_hardware_utils-0.1.19.tar.gz.

File metadata

  • Download URL: f3ts_hardware_utils-0.1.19.tar.gz
  • Upload date:
  • Size: 40.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.10.16 Linux/5.15.154+

File hashes

Hashes for f3ts_hardware_utils-0.1.19.tar.gz
Algorithm Hash digest
SHA256 7c5de6e680418dce6652733309262b6c7c0b93bab8fc25bac3d2bb25fcbb85b0
MD5 a6df2d6b09ccaa0c702bcdd1f51664f0
BLAKE2b-256 e33304be6c14830372eb3a56aeeea2f56af662fe5f790037160b26ed5d6345b1

See more details on using hashes here.

File details

Details for the file f3ts_hardware_utils-0.1.19-py3-none-any.whl.

File metadata

File hashes

Hashes for f3ts_hardware_utils-0.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 e511f280238147eba85bf71f12d32a7396e7d97c9072611c7009b7e3b88cd58e
MD5 08eb1a2b08a930d53f3cf8f24a2f29f4
BLAKE2b-256 b4db4cd5aa5f27b79fb08d0e6b8176c8e543fdecfc0ab27cdae905cd1c8ed673

See more details on using hashes here.

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