Contributing¶
Contributions and suggestions for new features are welcome, as are bug reports! Please create a new issue or better still, dive right in with a pull-request.
Local setup¶
Requirements:
uvhttps://docs.astral.sh/uv/getting-started/installation/
uv python pin 3.13
uv venv .venv
source .venv/bin/activate
uv sync --all-groups
prek install
Prek¶
We use prek to manage our git hooks.
It is installed as part of uv sync --all-groups, and it is configured in
prek.toml.
prek install sets up the git hook, so the checks run automatically whenever you commit.
To run every hook against the whole repo without committing, use:
prek run -a
Note
We used to use pre-commit with a .pre-commit-config.yaml file.
If you set up your local checkout before that change, re-run prek install to replace the
old hook — otherwise the stale pre-commit hook will no longer find a config it recognises.
prek.toml contains the following hooks:
- actionlint: lints our GitHub Actions workflow files.
- pyproject-fmt: formats and normalizes
pyproject.toml. - Ruff: does linting checks (including import sorting) and automatically fixes what it can.
- Ruff format: automatically formats your code to a standardized Python format.
- mypy: static type checker which verifies you are not using objects incorrectly.
- codespell: catches common spelling mistakes in the docs.
As mentioned, some of these tools automatically fix your code while other only highlight potential issues. Sometimes it will be enough to try to commit a second time and it will pass, while other times it may require manual changes to your code.
In rare cases it may be difficult or undesirable to change to code to pass the linting rules.
If this happens, it's ok to add a Ruff # noqa or mypy # type: ignore comment to skip that line.
For details of how to do this, please see the Ruff docs
and mypy docs.
Credits¶
This package was written by Phil Ewels (@ewels), based on initial code by Will McGugan (@willmcgugan).
rich-click is co-maintained by Daniel Reeves (@dwreeves).
Furthermore, these contributors helped make the package what it is today:
See the full list of contributors here.