Fix ruff config (mis-targeted prototype paths) + add lint CI - #6
Merged
Conversation
The per-file-ignores pointed at old fullwave25 prototype paths
(fullwave/shear_wave/*, fullwave/bioheat/*, fullwave/neuromodulation/*), so
none of the intended relaxations applied here and `ruff check` reported ~500
spurious issues (mostly physics naming like dX/dY/dZ that should be ignored).
- Re-point shear_wave ignores to this repo's layout: src/shearwave/{solver,
acoustic_strain,strain,radiation_force}.py and validation/**.
- Remove the bioheat/neuromodulation ignores (those modules aren't in this repo).
- Relax D401 for examples and ARG001/SIM108 for validation helper scripts.
Then fix the ~17 genuine findings that surfaced:
- auto-fixed unsorted imports, unused noqa directives, docstring sections
- wrapped over-length lines and dropped a redundant `* np.ones(...)` in a test
- noqa the intentional rho_map param in compute_radiation_force_velocity
(kept for interface parity; the Poynting formula doesn't use density)
- applied `ruff format` (2 statements re-collapsed after the shear_fdtd rename)
`ruff check .` and `ruff format --check .` now pass. Added a lint job to CI so
they stay passing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R3eMurRYQsmx58nU2yFwAF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
ruff.tomlper-file-ignores pointed at oldfullwave25prototype paths (fullwave/shear_wave/*,fullwave/bioheat/*,fullwave/neuromodulation/*), so the intended relaxations never applied to this repo andruff checkreported ~500 spurious issues (mostly physics namingdX/dY/dZ).src/shearwave/*.py,validation/**).D401for examples,ARG001/SIM108for validation helper scripts.noqa, wrapped long lines, dropped a redundant* np.ones(...)in a test,noqa'd the intentionalrho_mapparam (kept for interface parity; the Poynting formula doesn't use density), and ranruff format.ruff check+ruff format --check) so it stays clean.Test plan
ruff check .→ All checks passedruff format --check .→ all formattedpytest tests/→ 24 passed (with JAX)🤖 Generated with Claude Code
https://claude.ai/code/session_01R3eMurRYQsmx58nU2yFwAF