Skip to main content

pytest-f3ts

Use your pytest test plans with the FixturFab Test Executor!

Manage, Execute, and Support your Hardware Test Plan Deployments

Leverage the amazingness that is pytest and all of the community support to implement hardware tests for circuit boards, sub-assemblies and more!

Simply add the pytest-f3ts plugin and a config.yml test plan to your project and start executing your tests using the FixturFab Test Executor.

Installation

Install from PyPI with pip:

pip install pytest-f3ts

Or add it to a project managed with poetry:

poetry add pytest-f3ts

Documentation

See the docs for more information.

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

Git Commit Message Format

We use Conventional Commits for our commit messages. This allows us to automatically generate changelogs and version numbers.

Brief Overview:

  • fix: - Fixes a bug
  • feat: - Adds a new feature
  • docs: - Updates documentation
  • style: - Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: - A code change that neither fixes a bug nor adds a feature
  • perf: - A code change that improves performance
  • test: - Adding missing tests or correcting existing tests
  • chore: - Changes to the build process or auxiliary tools and libraries such as documentation generation
  • ci: - Changes to our CI configuration files and scripts
  • BREAKING CHANGE: - A commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in semantic versioning).

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:

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 ::: pytest_f3ts.{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.pytest-f3ts 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.pytest-f3ts 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 and isort checks (flake8 runs locally via pre-commit)
    • 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 on the main branch after a merge request is accepted, and creates a new tag
  • build: Builds the wheel and publishes it to both the Google Cloud Artifact Registry and PyPI
    • Triggered by new tags, which are created by the version stage

Metadata

Release files for pytest-f3ts 1.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-f3ts 1.1.7
File Size Uploaded
pytest_f3ts-1.1.7.tar.gz 30.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-f3ts 1.1.7
File Interpreter ABI Platform
pytest_f3ts-1.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 66.3 kB

Release files / pytest_f3ts-1.1.7.tar.gz

Download URL pytest_f3ts-1.1.7.tar.gz
Size 30.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cb5d63809845e7ab9ddaba87b98a386748e3dbe378ebec97bc9d1fc32ff15846
BLAKE2b-256 checksum
How to use checksums
808cedd5ac1a5f3a9d62b5f253bb5ab0348d3ed5f683e33753ea45ebce02e706
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.10.20 Linux/5.15.154+

Release files / pytest_f3ts-1.1.7-py3-none-any.whl

Download URL pytest_f3ts-1.1.7-py3-none-any.whl
Size 35.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63dbe8aaf4fdf1770017cdb66e04fc0f4cff7b513fe0617da05af24dfb5e5ebf
BLAKE2b-256 checksum
How to use checksums
a0fdce9da03621a360d5dd703fbe0d47aa82d795ec57a1af540880b1aa263872
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.10.20 Linux/5.15.154+

Release history Release notifications | RSS feed

This release

1.1.7 This release

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.15

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.7

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page