Skip to content

Development

This guide provides instructions for setting up your development environment to contribute to Graphinate.

Install dependencies

UV is used to install all dependencies, including those for testing and documentation.

uv sync --all-extras --all-groups

Update dependencies

To update the locked dependencies to their latest versions:

uv lock --upgrade
uv sync --all-extras --all-groups

Ruff

Ruff is used for linting and formatting.

Report issues

ruff check src
ruff check tests

Fix issues

ruff check src --fix
ruff check tests --fix

Test

We use pytest for testing.

This is the recommended command for local development, as it provides the fastest feedback.

python -m pytest tests --cov=src --cov-branch --doctest-modules --cov-report=term --junitxml=junit.xml

Generates an interactive HTML coverage report.

python -m pytest tests --cov=src --cov-branch --doctest-modules --cov-report=html --junitxml=junit.xml

Generates a standard Cobertura XML report (useful for CI/CD).

python -m pytest tests --cov=src --cov-branch --doctest-modules --cov-report=xml --junitxml=junit.xml

Docs

The documentation is built using MkDocs with the Material for MkDocs theme.

Test

To serve the documentation locally for testing:

python -m mkdocs serve

Build

To build the static documentation site:

python -m mkdocs build