Sync ruff config drift with athena-archive-api #8

Closed
opened 2026-05-03 09:21:47 +00:00 by gravityfargo · 1 comment
Owner

Context

athena-file's `ruff.toml` enforces additional rule families that the consumer (`athena-archive-api`) does not, and vice versa. Surveyed during cross-repo coupling work:

Rule family athena-file athena-archive-api
D (docstrings) included (D100-D105 ignored) excluded
TC (type-checking blocks) included excluded
TD (TODOs) included excluded
ANN (annotations) included (test/migration overrides) included (similar overrides)
line-length 120 120

Decision needed

Either:

  1. athena-archive-api adopts athena-file's stricter set — preferred long-term; catches API contract drift earlier.
  2. athena-file relaxes to match — easier short-term; loses docstring enforcement.

Recommendation: option 1. File a paired BE issue for adoption.

Acceptance criteria

  • ruff configs across both repos converged
  • CI green in both
  • Documentation update in CLAUDE.md noting the shared rule baseline
## Context athena-file's \`ruff.toml\` enforces additional rule families that the consumer (\`athena-archive-api\`) does not, and vice versa. Surveyed during cross-repo coupling work: | Rule family | athena-file | athena-archive-api | |---|---|---| | D (docstrings) | included (D100-D105 ignored) | excluded | | TC (type-checking blocks) | included | excluded | | TD (TODOs) | included | excluded | | ANN (annotations) | included (test/migration overrides) | included (similar overrides) | | line-length | 120 | 120 | ## Decision needed Either: 1. **athena-archive-api adopts athena-file's stricter set** — preferred long-term; catches API contract drift earlier. 2. **athena-file relaxes to match** — easier short-term; loses docstring enforcement. Recommendation: option 1. File a paired BE issue for adoption. ## Acceptance criteria - [ ] ruff configs across both repos converged - [ ] CI green in both - [ ] Documentation update in CLAUDE.md noting the shared rule baseline
Author
Owner

Decision: keep the divergence intentional. athena-file is a smaller library-style codebase where the stricter D (docstring) / TC (type-checking imports) / TD (TODO format) rules pay off. athena-archive-api is a much bigger app codebase (130+ src files) where those would generate hundreds of low-value lint errors and add noise without commensurate benefit. The two codebases share core rules (line length 120, double quotes, ANN annotations, ignored E501/W291 in alembic) — the divergence is in optional opinion-rules.

Closing as resolved (decision documented). Future re-evaluation should weigh cost vs. benefit per rule family rather than wholesale adoption.

Decision: keep the divergence intentional. athena-file is a smaller library-style codebase where the stricter D (docstring) / TC (type-checking imports) / TD (TODO format) rules pay off. athena-archive-api is a much bigger app codebase (130+ src files) where those would generate hundreds of low-value lint errors and add noise without commensurate benefit. The two codebases share core rules (line length 120, double quotes, ANN annotations, ignored E501/W291 in alembic) — the divergence is in optional opinion-rules. Closing as resolved (decision documented). Future re-evaluation should weigh cost vs. benefit per rule family rather than wholesale adoption.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ModernLeft/athena-file#8
No description provided.