OptimusKG
Contributing

Contributing

Set up a development environment and contribute to OptimusKG.

Development Environment

We use uv and docker for local development.

  1. Install uv
  2. Install Docker
  3. Install all dependencies:
uv sync --all-groups

Pre-commit Hooks

We use pre-commit to enforce code quality:

uv tool run pre-commit install

Running Tests

We use pytest for testing:

# Run with pre-configured flags
uv tool run hatch run pytest

# Or directly
uv tool run pytest

Development Scripts

Available via hatch:

# List all scripts
uv tool run hatch run list

# Run a specific script
uv tool run hatch run <script-name>

Code Quality

# Format code
make format

# Lint
make lint

# Type checking
make ty

# Docstring coverage
make interrogate

Key Rules

  • When editing a node file, always update the corresponding catalog YAML
  • Never delete the checksum property in the catalog
  • After editing a node, rerun all downstream nodes and sync the catalog
  • All data transformations use Polars (not Pandas)

On this page