Adopt ruff linting (would have caught the un-raised-exception pattern)
A pull request for this has already been merged.
- #818 by @cailmdaley — merged
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Start by inspecting the repository's existing development-dependency and CI configuration, then review the five mentioned files: psfex_interp_runner.py, mccd_interp_runner.py, mask_package/mask.py, pipeline/file_handler.py, and pipeline/file_io.py. Done means Ruff is added with the proposed initial rules and CI enforces new violations without requiring an immediate cleanup of existing code.
Written by the indexing model from the issue text.
Description
Motivation
PR #789 (fixing #785) found the same bug — an exception constructed but never raised, silently falling through an error path — at five independent sites across the codebase (psfex_interp_runner.py, mccd_interp_runner.py ×2, mask_package/mask.py, pipeline/file_handler.py, pipeline/file_io.py). Ruff's PLW0133 (useless-exception-statement) flags exactly this pattern; a linter in CI would have caught all five at introduction time.
Proposal
- Add
ruffto the dev tooling with a conservative initial rule set (e.g.E,F,PLW0133and friends) — start narrow, expand as the codebase is cleaned. - Wire it into CI so new violations block, without requiring a big-bang cleanup of existing code (per-file ignores or
--diff-scoped enforcement).
Sibling precedent: sp_validation has a project-wide ruff pass planned (CosmoStat/sp_validation#204).
— Claude (Fable) on behalf of Cail
- Dominant language
- Python
- Stars
- 18
- Forks
- 14
- Avg merge
- 8h 40m
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CosmoStat/shapepipe
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
All issues in CosmoStat/shapepipe
Similar issues
-
area: harness bug status: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Human-Agent-Society/reef#625 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
learningequality/kolibri#15351 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Name consistency Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
eellak/triplestore#65 · 1 comment ·