Skip to content

Latest commit

 

History

History
19 lines (18 loc) · 2.4 KB

File metadata and controls

19 lines (18 loc) · 2.4 KB

Workflow

  1. Always run make lint and make test after adding a feature or fixing a bug
  2. Use uv run when running tests and CLI commands (e.g., uv run pytest, uv run chap)
  3. No commit attribution (no co-author or generated-by lines)
  4. Use conventional commits format for commit messages and PR titles
  5. Branch naming should follow conventional commit prefixes: feat/, fix/, docs/, refactor/, etc.
  6. No emojis in commit messages, PR descriptions, or code comments
  7. Be concise when adding code/features. Don't add stuff not specifically related to the problem/task, and avoid nice-to-have extras
  8. If you feel that the prompt is bad/unclear, always ask follow-up questions until you have high confidence you will be able to solve the problem given
  9. When adding new features or fixes, always add a test. Never access private fields or methods (starting with underscore) of a class through testing. Also, when changing code, if there are no relevant tests, consider adding a simple test for the change.
  10. When we ask you to go through some change (or finalize changes), always follow the rules in this document strictly.
  11. When making pr that has design document only, don't use docs in title.
  12. When writing tests, avoid creating new test data inline. Use existing fixtures from conftest.py files whenever possible. Only create new fixtures in conftest.py if testing edge cases not covered by existing fixtures. This improves test maintainability and reduces duplication.
  13. Never access private variables
  14. When creating Jira issues, always set at least one component
  15. When adding or removing a @backtest_plot(...) registration under chap_core/assessment/backtest_plots/, run make regen-plot-help and commit the regenerated chap_core/cli_endpoints/generated_plot_ids.py. The tests/test_generated_plot_ids.py lock-in test will fail otherwise.
  16. chap_core/__init__.py exposes data, fetch, ModelTemplateInterface, and is_debug_mode lazily via PEP 562 __getattr__ to keep CLI startup fast. When adding a new public re-export at the package root, register it in the lazy table (_LAZY_SUBMODULES or _LAZY_FROM) rather than as an eager top-level import, and make sure the symbol is also reachable under if TYPE_CHECKING: so static type checkers still see it.
  17. Unless told otherwise, always open pull requests in draft mode (gh pr create --draft). Mark a PR ready for review only when asked to.