Contributing¶
Environment¶
For local development, you need Python 3.10 or later installed. We use uv for project management, Hatch for environment management, and just as our command runner.
Dependencies¶
To install this package and its development dependencies, run:
just sync
or
uv sync --extra dev
Code checking¶
To execute all code checking tools together, run:
just check
Linting¶
We utilize ruff for linting, which analyzes code for potential issues and enforces consistent style. Refer to pyproject.toml for configuration details.
To run linting:
just lint
Formatting¶
ruff is also used for code formatting. Refer to pyproject.toml for configuration details.
To run formatting:
just format
Testing¶
We use pytest for testing. You have two options for running tests:
# Run tests on your current Python version
uv run --extra test pytest -v
# Run tests across all supported Python versions
just test
Pre-commit Hooks¶
We use pre-commit to run quality checks automatically:
# Install pre-commit hooks
uv tool install pre-commit
pre-commit install
# Run hooks manually on all files
pre-commit run --all-files
Documentation¶
We follow the Google docstring format for code documentation. All user-facing classes and functions must be documented with docstrings and type hints.
To build the documentation site locally, run:
just docs
Release Process¶
New versions are automatically published to PyPI when a GitHub release is created.