Skip to content

Development

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

Install dependencies

Use UV 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

We use Ruff for linting and formatting.

Report issues

ruff check src

Fix issues

ruff check src --fix

Test

We use pytest for testing.

Standard (cobertura) XML Coverage Report

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

HTML Coverage Report

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

Terminal Coverage Report

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

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