Maintain Python Template
Make catalog-driven changes without creating a choice that renders but cannot run.
Change Workflow
- Inspect
catalog/components.yml,catalog/presets.yml,copier.yml, the relevant files undertemplate/, and existing tests before editing. - Define the component metadata and compatibility constraints in the catalog first. Keep each choice in exactly one architectural role unless it genuinely serves several roles.
- Wire Copier defaults and choices to the catalog. Preserve the three simple presets and reject incompatible combinations with an actionable validator message.
- Add functional source, dependency, configuration, test, README, and environment-variable templates for the component. Avoid placeholder-only integrations.
- Run
uv run python scripts/compile_catalog.py --check. If generated files are stale, run the command without--check, review all generated changes, then check again. - Add focused repository tests and generate at least one representative project. Validate its imports or endpoints, not only file presence.
- Run the gates in
validate-python-stackbefore proposing delivery.
Invariants
catalog/generated/catalog.json,catalog/generated/choices.yml, anddocs/reference/*.mdare compiler outputs; edit their sources instead.- Generated projects use a
srclayout,uv, Ruff, pytest, typing, and reproducible dependency bounds. - Optional layers must disappear cleanly when disabled.
- Conditional template path components must remain short enough to render on Windows.
- A deploy target keeps Docker portability; cloud IaC is limited to supported target/provider pairs.