Thank you for your interest in contributing! This page covers how to report problems, get support, and contribute code. For the full development guide (architecture, CI, releases), see docs/dev.md.
Please report bugs and request features through GitHub issues. For bugs, include:
- What you ran (a minimal code snippet is ideal)
- What you expected and what happened instead, including the full traceback
- Your
policyengineversion (pip show policyengine) and Python version
- Open a GitHub issue with a usage question
- Email hello@policyengine.org
git clone https://github.com/PolicyEngine/policyengine.py.git
cd policyengine.py
uv pip install -e ".[dev]"This installs the shared analysis layer, both country model extras, and the dev dependencies used in CI (pytest, ruff, mypy, towncrier).
Tests require a HUGGING_FACE_TOKEN environment variable for downloading datasets:
export HUGGING_FACE_TOKEN=hf_...
make testCommon commands:
make format # ruff format
make test # pytest with coverage
make docs # build static Quarto HTML docs
make docs-serve # preview the docs locally-
Fork the repository (or create a branch, if you have write access) and make your changes.
-
Add a changelog fragment describing the change:
# Fragment types: breaking, added, changed, fixed, removed echo "Description of change" > changelog.d/my-branch.fixed.md
-
Run
make formatandmake testlocally. -
Open a pull request. CI runs lint/format checks, tests on Python 3.13 and 3.14, and a docs build; all required checks must pass before merge.
On merge, the versioning workflow bumps the version, builds the changelog, and creates a GitHub Release.
All participants are expected to follow our Code of Conduct.