Receptorctl is a front-end CLI and importable Python library that interacts with Receptor over its control socket interface.
This project includes a nox configuration to automate tests, checks, and other functions in a reproducible way using isolated environments.
Before you submit a PR, you should install nox and verify your changes.
To run
make receptorctl-lintandreceptorctl-testfrom the repository root, you must first installnox.
- Install
noxusingpython3 -m pip install noxor your distribution's package manager. - Run
nox --listfrom thereceptorctldirectory to view available sessions.
You can run nox with no arguments to execute all checks and tests.
Alternatively, you can run only certain tasks as outlined in the following sections.
By default nox sessions install pinned dependencies from
pyproject.toml.
Run the following nox sessions to check for code style and formatting issues:
-
Run all checks.
nox -s lint
-
Check code style.
nox -s check_style
-
Check formatting.
nox -s check_format
-
Format code if the check fails.
nox -s format
Run the following nox sessions to test Receptorctl changes:
-
Run tests against the complete matrix of Python versions.
nox -s tests
-
Run tests against a specific Python version.
# For example, this command tests Receptorctl against Python 3.12. nox -s tests-3.12
Update dependencies in the requirements directory as follows:
- Add any packages or pins to the
*.infile. - Do one of the following from the
receptorctldirectory:
-
Update all dependencies.
nox -s pip-compile
-
Generate the full dependency tree for a single set of dependencies, for example:
nox -s "pip-compile-3.12(tests)"
You can also pass the
--no-upgradeflag when adding a new package. This avoids bumping transitive dependencies for other packages in the*.infile.
nox -s pip-compile -- --no-upgrade