Skip to content

Contributing

Thank you for considering contributing to Law Graph!

Development Setup

  1. Fork the repository
  2. Clone your fork:
git clone https://github.com/YOUR_USERNAME/law_graph.git
cd law_graph
  1. Install development dependencies:
uv pip install -e .[dev]
  1. Install pre-commit hooks:
pre-commit install

Development Workflow

Running Tests

# Run all tests
pytest

# Run with type checking
DEV_TYPECHECK=1 pytest

# Run with coverage
pytest --cov=law_graph

Code Quality

# Lint and format
ruff check .
ruff format .

# Run pre-commit on all files
pre-commit run --all-files

Documentation

# Serve docs locally
mkdocs serve

# Build docs
mkdocs build

Environment Variables

  • DEV_TYPECHECK=1: Enable runtime type checking with beartype

Python Version

This project requires Python 3.13+ and follows modern Python practices.