Thanks for contributing. This document covers the coding style we enforce in CI and how to set up local checks.
mamba activate confostate
pip install -e ".[dev]"The dev extra includes test, docs, and lint tools (Ruff, pre-commit).
We follow PEP 8 with these project rules:
| Rule | Setting |
|---|---|
| Linter & formatter | Ruff |
| Line length | 79 characters |
All style configuration lives in pyproject.toml under [tool.ruff],
[tool.ruff.lint], and [tool.ruff.format]. Do not duplicate settings in
other config files.
# Format the tree
ruff format .
# Lint (auto-fix safe issues)
ruff check --fix .
# Check without writing (same as CI)
ruff check .
ruff format --check --diff .pre-commit runs Ruff on staged files before each commit so style issues never reach CI.
pip install pre-commit # or: pip install -e ".[lint]"
pre-commit installAfter that, git commit formats and lints automatically. To run on the whole
repo:
pre-commit run --all-filesHooks are defined in .pre-commit-config.yaml (they read settings from
pyproject.toml).
pytest -v
cd docs && make htmlCI runs tests, lint, docs, and (on tags/releases) packaging. See
Plans/ci-setup-plan.md for workflow details.
- Open a branch from
main(ordevelopwhen that branch is in use). - Keep changes focused; match existing naming and module layout.
- Ensure
ruff check .,ruff format --check ., andpytestpass locally (or rely on pre-commit + CI). - Update docs under
docs/when behavior or public APIs change.