Contributing¶
Since this project is a pytest plug-in, it really does require test-driven development. If you want to contribute a bug fix or new feature, please first create a test case that demonstrates what your new code is supposed to do. Note that you need to set up tests using the pytester fixture, rather than testing directly.
This project uses hatch for its environments and build system, as well as pre-commit, ruff, mdformat, and docstrfmt for formatting and linting. Before you send in a pull request, please:
Set up
pre-commit
and use it to runruff
andmdformat
with the settings included in thepyproject.toml
and.pre-commit-config.yaml
filesRun tests using the command
hatch run test:test
, which will run all of the tests against CPython 3.9-3.12 and Pytest 7.4.x, 8.2.x, and 8.3.x.Check test coverage with
hatch run cov
Generate and proofread docs by running
hatch run docs:generate
Within the Github repo, Github Actions are set up so that:
Creating a tag of the format “v#.#.#” will build a release and upload it to PyPI.
Creating a tag that starts with “docs-…” will trigger a documentation build.