Skip to content

Commit 5afc776

Browse files
committed
Add code quality and linting guidelines to AGENTS.md
Introduces a new section detailing code quality checks, including pre-commit usage, ruff commands for linting and formatting, and notes on linting rules and documentation exclusions.
1 parent 1fc193b commit 5afc776

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

AGENTS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@
4141
- **Custom exceptions**: Use project-specific exceptions from `causalpy.custom_exceptions`: `FormulaException`, `DataException`, `BadIndexException`
4242
- **File organization**: Experiments in `causalpy/experiments/`, PyMC models in `causalpy/pymc_models.py`, scikit-learn models in `causalpy/skl_models.py`
4343

44+
## Code quality checks
45+
46+
- **Before committing**: Always run `pre-commit run --all-files` to ensure all checks pass (linting, formatting, type checking)
47+
- **Quick check**: Run `ruff check causalpy/` for fast linting feedback during development
48+
- **Auto-fix**: Run `ruff check --fix causalpy/` to automatically fix many linting issues
49+
- **Format**: Run `ruff format causalpy/` to format code according to project standards
50+
- **Linting rules**: Project uses strict linting (F, B, UP, C4, SIM, I) to catch bugs and enforce modern Python patterns
51+
- **Note**: Documentation notebooks in `docs/` are excluded from strict linting rules
52+
4453
## Type Checking
4554

4655
- **Tool**: MyPy

0 commit comments

Comments
 (0)