You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agent/rules/environment_rules.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,3 +53,8 @@ description: Strict environment and dependency rules for PyKoopman development (
53
53
-*Note*: `torus_dynamics` tests in `common` are skipped due to persistent backend conflicts in `pytest` environments despite code correctness.
54
54
-**Coverage & Extensions**: Be cautious when running full coverage (`--cov`) if the environment includes conflicting C-extensions (e.g., `PyO3` via `pydantic`/`fastapi`). Targeted coverage runs (e.g., `pytest test/common --cov=pykoopman.common`) are more stable.
55
55
-**Input Validation**: `pykoopman` classes (e.g., `forced_duffing`, `slow_manifold`) often require strict input shapes (e.g., `(n_states, n_traj)`). Always verify array dimensions in tests to avoid `IndexError`.
56
+
57
+
## 9. Code Quality & Pre-commit
58
+
-**Line Length**: Strict **88 character** limit (enforced by `flake8`/`black`). Ensure comments and code do not exceed this.
59
+
-**Unused Imports**: Remove all unused imports. `flake8` will fail commits if any are present (e.g., `F401`).
60
+
-**Variable Usage**: Remove unused variables (e.g., `F841`). Do not assign variables if they are not used (use `_` or remove assignment).
0 commit comments