Skip to content

Fix misleading docstrings in fsp, CFM and rupture_propagation - #163

Merged
lispandfound merged 1 commit into
mainfrom
ai/issue-148
Oct 21, 2026
Merged

lispandfound merged 1 commit into
mainfrom
ai/issue-148

Conversation

@claude

@claude claude Bot commented Oct 21, 2026

Copy link
Copy Markdown

Closes #148

What was wrong

Several docstrings and comments contradicted the code:

  • fsp.py: segment_count was described as the number of subfaults and commented as == len(data). It is actually the number of fault segments (Nsg). nx/nz were documented as float or None, but they are parsed with :d and annotated int | None. time_window_count was described as "the time windows" when it is their count (Ntw).
  • community_fault_model.py: the module docstring said the CFM is stored in a GeoPackage, but the code loads NZ_CFM_v1_0.shp. A comment claimed traces are transformed to WGS84, but the code only swaps the axis order and tags the frame as EPSG:2193. The D90/Dfc down-dip depth fields were documented as "Not sure!".
  • rupture_propagation.py: spanning_tree_with_probabilities was annotated and documented as returning list[nx.DiGraph], but SpanningTreeIterator yields undirected nx.Graph objects.

What changed

Only docstrings, comments and the one return type hint listed in the issue. No runtime behaviour changes, so no test was added. The existing suite passes (801 tests), and ruff check/format are clean on the changed files.

Reviewer notes

  • In the fsp.py docstring, time_window_count still says float or None to match its dataclass annotation (float | None), even though the header parses it as an int. I left the annotation alone because the issue scoped this to docs.
  • The D90/Dfc descriptions ("down-dip depth estimate (km)") follow the issue's wording. Please confirm they match the CFM documentation.

🤖 Generated with Claude Code

…ation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude claude Bot added the ai-generated Opened by the scheduled Claude jobs label Oct 21, 2026
@claude
claude Bot requested a review from lispandfound October 21, 2026 13:44
@lispandfound
lispandfound merged commit fedc7f6 into main Oct 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Opened by the scheduled Claude jobs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix misleading docstrings/comments in fsp.py, community_fault_model.py and rupture_propagation.py

1 participant