Repository navigation
fix: world locations for display, export and intrusion classification; deprecate rescale and scale, stage S4 (spec 005) - #401
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
…5 S4 (wave 25) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
… (wave 26) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
…5 S4 (wave 27) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
…nd intrusion classification; deprecate rescale and scale (005 S4, wave 28) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
…ion for 005 (wave 29) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
…ve 31) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
…t; name Loop2DView.add_data in the S4 docs Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XADRvJ98bJ8Ey8Rw98F3j1
6 of 7 tasks
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.
Summary
Stage S4 of spec 005 (coordinate and fault-frame correctness): display, data export and intrusion classification use the stored world locations (FR-022), and
GeologicalModel.rescaleandscaleare deprecated (FR-033). The spec, plan and tasks are inspecs/005-coordinate-frame-correctness/. All 18 S4 tasks (T051 to T068) are done. S5 and S6 are not planned yet.Changes
GeologicalFeature.get_datano longer callsmodel.rescaleon the builder rows. The rows are world data, so the call moved them by the local origin and rotated them a second time. With a local origin of(100,200,300)the point(102,203,304)was shown at(202,403,604).Loop2DView.add_dataandModelExporter.savenow get the world locations.IntrusionFrameBuilder._network_model_valuesevaluates the model at the world X, Y and Z of the network data.set_intrusion_steps_parametersuses it. Before, the classification read the unit at a shifted point.GeologicalModel.rescaleandscalekeep their behaviour and signature, and emit oneDeprecationWarningthat namesbounding_box.reprojectandbounding_box.project. The tier stays "stable".COMPAT.mdhas two new rows in the deprecation table (earliest removal: 2 minor releases after the first release that warns).ROADMAP.mdandAPI.mdrecord it.model.rescalecalls inexporters.pyare gone (they did nothing; threeif real_coords:lines that only held them are gone too).ModelExporter.get_block_modelusesbounding_box.reproject. The faulted intrusion example no longer applies a second conversion.stacklevel=3in both warnings, because the@public_apiwrapper adds a frame. A test checks that the warning names the caller file.scalehas always copied its input, soinplace=Truenever changed the caller array. S4 keeps this (FR-033: keep behaviour).Behaviour change
get_data()locations change for models with a non-zero local origin or a rotation: they are now the world locations. With an identity frame nothing changes. Intrusion models in a translated frame can classify their network data differently, because the classification is now read at the right points.COMPAT.mdhas a migration notice. Users who corrected the display by shifting their data now see a shifted display.Test plan
ruff check LoopStructural packages: passpytest packages/loop_common/tests packages/loop_interpolation/tests: 912 passed, 47 skipped, 2 xfailedpytest(root), run withpyevtkon the path: 2066 passed, 4 skipped, 1 failed. The failure wastest_exporters.py::test_write_vol_gocad_is_broken_for_real_bounding_box. It also fails without the S4 changes. Two classes are namedLoopValueErrorandpytest.raisesmatched the wrong one. The last commit fixes the test (it now accepts both classes). The file passes (13 passed). I did not re-run the full root suite after this commit and after the end-review fix.tests/unit/modelling/test_world_location_consumers.py(display, export, intrusion classification, call-site test ofset_intrusion_steps_parameters, 2D fault ellipse,rescaleandscalewarnings, no library caller warns). Before the fix, 18 of 19 cells of the first three tests failed (the passing cell is the identity frame).verification.md("S4 rollback checks").Notes
verification.mdandrun-state.json): the ellipse test checks only againstfault.fault_centre; oneimportorskip("pyevtk")sits in the middle of a test; stale line numbers in a grep note.black --checkreports 3 library files that were not Black-clean before S4.loopstructuralvisualisationis not on the path; the exporter tests skip withoutpyevtk.