Contributing
Thanks for wanting to contribute to AnyPINN! Please read our Code of Conduct before getting started.
Setup
-
Fork and clone the repo, then install dependencies:
Optional: If you use mise, run
mise installfirst to provision the pinnedpython,uv, andjustversions from.mise.toml. -
Before pushing, run the full CI check locally:
This runs lint, typecheck, and tests — the same pipeline as CI.
Tooling
Good to Know
- The
examples/directory has ready-to-run problems you can use to exercise the library end-to-end while developing. Each example has atrain.pyentry-point (uv run python train.py). exponential_decayis a minimal, core-only example (no Lightning).uv run anypinn create --list-templateslists all scaffold templates.- Keep the layer separation:
anypinn.corestays pure PyTorch, Lightning stays optional.anypinn.coremust not import fromanypinn.lightning,anypinn.problems, oranypinn.catalog. - If you change the architecture or data flow, update both
CLAUDE.mdandREADME.md.
Conventions
- Commits: Conventional Commits (
feat:,fix:,docs:,refactor:,test:,chore:) fix:triggers a patch release (e.g. 0.1.0 → 0.1.1)feat:triggers a minor release (e.g. 0.1.1 → 0.2.0)feat!:orBREAKING CHANGE:triggers a major release (e.g. 0.2.0 → 1.0.0)- Branch names:
feat/,fix/,docs/, etc. - Line length: 99
- Absolute imports only — no relative imports
- All config dataclasses:
@dataclass(frozen=True, kw_only=True)