Skip to content

Fix ruff config (mis-targeted prototype paths) + add lint CI - #6

Merged
gfpinton merged 1 commit into
mainfrom
chore/ruff-config-cleanup
Jul 19, 2026
Merged

Fix ruff config (mis-targeted prototype paths) + add lint CI#6
gfpinton merged 1 commit into
mainfrom
chore/ruff-config-cleanup

Conversation

@gfpinton

Copy link
Copy Markdown
Collaborator

The ruff.toml per-file-ignores pointed at old fullwave25 prototype paths (fullwave/shear_wave/*, fullwave/bioheat/*, fullwave/neuromodulation/*), so the intended relaxations never applied to this repo and ruff check reported ~500 spurious issues (mostly physics naming dX/dY/dZ).

  • Re-point shear_wave ignores to this repo's layout (src/shearwave/*.py, validation/**).
  • Remove the bioheat/neuromodulation entries (not in this repo).
  • Relax D401 for examples, ARG001/SIM108 for validation helper scripts.
  • Fix the ~17 genuine findings that then surfaced: sorted imports, removed unused noqa, wrapped long lines, dropped a redundant * np.ones(...) in a test, noqa'd the intentional rho_map param (kept for interface parity; the Poynting formula doesn't use density), and ran ruff format.
  • Add a lint job to CI (ruff check + ruff format --check) so it stays clean.

Test plan

  • ruff check . → All checks passed
  • ruff format --check . → all formatted
  • pytest tests/ → 24 passed (with JAX)

🤖 Generated with Claude Code

https://claude.ai/code/session_01R3eMurRYQsmx58nU2yFwAF

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
@gfpinton
gfpinton merged commit 070be4a into main Jul 19, 2026
4 checks passed
@gfpinton
gfpinton deleted the chore/ruff-config-cleanup branch July 19, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant