Skip to content

Really unsimplify this time#15

Merged
lispandfound merged 6 commits intomainfrom
unsimplify
Apr 7, 2025
Merged

Really unsimplify this time#15
lispandfound merged 6 commits intomainfrom
unsimplify

Conversation

@lispandfound
Copy link
Collaborator

@lispandfound lispandfound commented Apr 7, 2025

Previously I removed the shapely simplification. This change missed an additional change I made to do the only simplification that is actually necessary: removing repeated points in the fault trace. Without that necessary check the script will crash when generating a database. This PR adds the missing repeat point removal. This only affects one fault in the NSHMDB, Irishman Creek, Subsection 2. You now get a warning that some simplification has occurred, along with a diff of the simplified trace vs the old trace.

Warning: Fault trace for Irishman Creek, Subsection 2 was altered.
Old: (5131154.191632377, 1396502.863913299)  (5131154.191632377, 1396502.863913299)  (5128105.839916997, 1390381.8099286489)  (5125765.814896873, 1386520.0119176009)
New:                                         (5131154.191632377, 1396502.863913299)  (5128105.839916997, 1390381.8099286489)  (5125765.814896873, 1386520.0119176009)

As you you can see, the fault trace in this instance has been simplified because the first point in the Irishman Creek fault matches the second point in the Irishman Creek fault. No other warnings should be produced in this generation.

@lispandfound
Copy link
Collaborator Author

I've also added a full test run of the NSHMDB to the test suite to ensure that this cannot happen again. It, at this stage, just checks that you can generate a database. It'd be nice to actually extract this DB as a build artifact and publish a release every time it is merged to master.

@lispandfound lispandfound requested a review from Copilot April 7, 2025 22:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

tests/test_nshmdb_generator.py:25

  • [nitpick] Consider asserting that the warning message is produced when fault trace simplification occurs to improve test coverage for the new functionality.
def test_nshmdb_generator_runs(tmp_path: Path):

@lispandfound lispandfound merged commit 0c9c5b3 into main Apr 7, 2025
5 checks passed
@lispandfound lispandfound deleted the unsimplify branch April 7, 2025 23:41
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.

4 participants