Contributing

Set up a development environment

From the repository root:

python3 -m venv .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/python -m pip install --group dev
.venv/bin/maturin develop --locked

The test and docs dependency groups can be installed separately when you do not need the complete development environment.

Build or serve the docs locally

This project uses Great Docs for documentation.

# Install or update Great Docs in the project environment
.venv/bin/python -m pip install --upgrade great-docs

# Build docs into great-docs/_site/
.venv/bin/great-docs build

# Preview with live reload
.venv/bin/great-docs preview

The project environment supplies Great Docs and the dependencies used by the rendered examples.

Running tests

From the repo root:

cargo fmt && cargo check && cargo test && cargo build && cargo clippy
.venv/bin/pip install -e . --no-build-isolation
.venv/bin/python -m pytest tests_py