Thank you for your interest in contributing!
- Python 3.10+
- uv (recommended) or pip
git clone https://github.com/SKE-Labs/lightrace-python.git
cd lightrace-python
uv sync --extra dev
uv run pre-commit install# Testing
uv run pytest -s -v tests/
# Linting & formatting
uv run ruff check .
uv run ruff format .
# Type checking
uv run mypy src/lightrace
# Pre-commit (all checks)
uv run pre-commit run --all-filesAfter pre-commit install, hooks run automatically on commit:
- ruff-check: Linter with auto-fix
- ruff-format: Code formatter
- Ruff for linting and formatting (100 char line length)
- MyPy with strict mode for type checking
- Type hints required on all function definitions
- Use
from __future__ import annotationsfor modern type syntax
We use pytest for testing. Tests live in tests/.
# Run all tests
pytest -s -v tests/
# Run specific test
pytest -s -v tests/test_trace.py::TestTraceDecorator::test_root_trace- Fork the repo and create a feature branch
- Write tests for new functionality
- Ensure
pytest,ruff check ., andmypy src/lightracepass - Submit a PR with a clear description
Releases are automated via GitHub Actions. Maintainers trigger the release workflow which handles versioning, building, and PyPI publishing via OIDC.
MIT