This repository stores and generates Division and Jurisdiction YAML data for US local governments in the OpenStates ecosystem.
- Source models and pipeline code under
src/ - Output YAML under:
divisions/<state>/local/jurisdictions/<state>/local/
- Tests under
tests/ - Human-facing docs under
docs/
- Python
3.12+ - uv
- macOS/Linux shell examples below (adapt for Windows as needed)
- Clone and enter repo.
git clone <repo-url>
cd jurisdictions- Install
uv(if needed).
brew install uv
# or
curl -LsSf https://astral.sh/uv/install.sh | sh- Create virtual environment and install dependencies.
uv venv .venv
source .venv/bin/activate
uv sync --all-extras- Verify local setup.
uv run ruff check .
uv run pytest -m "not integration and not slow"- Full test suite:
uv run pytest- Fast local test pass:
uv run pytest -m "not integration and not slow"- Lint:
uv run ruff check .- Run Stage 1 pipeline:
uv run python src/init_migration/main.py
uv run python src/init_migration/main.py --state wa,tx,oh --force- Create a branch for your change.
- Keep changes focused and add/update tests.
- Run validation commands before opening a PR.
- Update docs when behavior or contributor workflow changes.
- Contributor process and expectations:
CONTRIBUTING.md - Agent and semi-autonomous workflow rules:
AGENTS.md - Pre-commit checklist:
ai_tools/system/pre-commit-checks.instruction.md - UV setup details and migration notes:
docs/setup_uv.md
This if for maintainers to pull the forked pull request and review the changes locally. Local branch here refers to the name of the branch you'd like to checkout to review the changes in your local dev environment.
Example:
git fetch origin pull/<PR_NUMBER>/head:<local-branch-name>
- Use
srcpackage-root imports in code and tests. - Do not modify core model contracts in
src/models/without maintainer approval.