Skip to content

Mods - #36

Merged
claudio525 merged 6 commits into
mainfrom
readme
Aug 12, 2026
Merged

Mods#36
claudio525 merged 6 commits into
mainfrom
readme

Conversation

@claudio525

@claudio525 claudio525 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
  • Updates README to explain structure of rupture scenarios and how this is stored in the database
  • Adds method to get all rupture_ids for a given fault system
  • Switches to using meta-ci-action
  • Updates docstrings such that numpydocs check passes

@claudio525

Copy link
Copy Markdown
Contributor Author

@claude review

@claude

claude Bot commented Aug 6, 2026

Copy link
Copy Markdown

Claude finished @claudio525's task in 1m 26s —— View job


Review complete

  • Gather context (diff, CLAUDE.md/REVIEW.md, prior review comments)
  • Review README.md changes
  • Review nshmdb/nshmdb.py changes
  • Review nshmdb/query.py changes
  • Post inline findings and summary

Findings: 0 critical, 0 major, 0 minor

This PR is primarily documentation (expanded README domain model / schema explanation) plus small mechanical changes:

  • nshmdb/nshmdb.py, nshmdb/query.py: Optional[X]X | None modernization and defaultdict(lambda: [])defaultdict(list) — no behavioral change.
  • nshmdb/nshmdb.py: new get_rupture_ids(fault_system) method — follows the same pattern as the existing get_fault_ids/get_fault_names methods (parameterized query, set comprehension over fetchall()), consistent with the rest of the class.
  • I cross-checked the new README "Database schema" section against nshmdb/schema/schema.sql — table names, key columns, and relationships (parent_fault → fault → fault_plane, fault ↔ rupture via rupture_faults, fault → magnitude_frequency_distribution) all match the actual schema.

No logic errors, security issues, or edge-case regressions found in this diff. Minor/non-blocking style note: a few docstrings in nshmdb.py/query.py still say Optional[...] in prose even though the Optional import was removed (e.g. nshmdb.py:662-668, query.py:236-242) — purely cosmetic, not a defect.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project documentation and makes small API/typing improvements to the nshmdb Python package used to query the NSHM 2022 SQLite database.

Changes:

  • Expanded README.md with a clearer domain model description and schema/relationship diagrams.
  • Updated type annotations to use Python 3.11+ union syntax (X | None) in the query engine and DB wrapper.
  • Added NSHMDB.get_rupture_ids(...) to list rupture NSHM IDs by fault system, optionally excluding zero-rate ruptures.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
README.md Adds domain model explanation and schema/relationship documentation for the database.
nshmdb/query.py Modernizes typing (Optional[...] → `...
nshmdb/nshmdb.py Modernizes typing, simplifies a defaultdict initialization, and adds a rupture-ID listing helper API.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md
Comment thread nshmdb/nshmdb.py
Comment thread nshmdb/nshmdb.py Outdated
@claudio525 claudio525 changed the title Readme Mods Aug 11, 2026
@claudio525
claudio525 merged commit 7054ede into main Aug 12, 2026
5 checks passed
@claudio525
claudio525 deleted the readme branch August 12, 2026 22:18
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.

3 participants