Repository navigation
fix: point transformations, fault-frame validation and backend matrix, stage S6 (spec 005) - #403
Merged
Merged
Conversation
…optional cell tests (wave 44)
…ator-based faulted residuals (wave 46)
This was referenced Nov 6, 2026
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 S6 of spec 005 (coordinate and fault-frame correctness), the last stage: auxiliary point transformations, fault-frame validation on R2, the backend and capability matrix, and the golden review (FR-025 to FR-027, FR-029, FR-030; SC-004, SC-010, SC-014, SC-015, SC-018). The spec, plan and tasks are in
specs/005-coordinate-frame-correctness/. All 20 S6 tasks (T089 to T108) are done. The branch adds the "Spec 005 complete" line toROADMAP.md.Changes
EuclideanTransformation(FR-025, SC-010):loop_common.math.LoopStructural.utilsre-exports it, and both import paths keep working.loop_commoncopy could not be imported at all (from . import getLogger). That import is fixed.inverse_transformfailed on ordinary point clouds and an existing test asserted the bug. It is rewritten, and that test is replaced.fit, the sign of the fitted angle for lines between -45 and 0 degrees, the reversed z in the 3D matrix, andfitsilently needing scikit-learn (it now raises a clearImportError).ROADMAP.mdandCOMPAT.mdrecord the behaviour change for 3D users.ValueError. Untransformed columns stay exactly unchanged.fitwith fewer than 2 rows sets the angle to 0._value_residuals_freshand_gradient_cosines_freshevaluate the interpolator directly at the stored positions. Before, they also applied the faults, a second time, to positions that were already fault-restored. For a faulted feature the residual compared two frames (0.080 measured, true value 0.0004 to 0.0018). This reverses S5 decision 8 for these two private methods. For a feature with no faults and no regions, numbers do not change.tests/fixtures/backend_matrix.pydefines 15 cells, 11 mandatory and 4 optional. It reads the junit files of the gate runs. A skipped or missing mandatory case is a violation. An optional cell with a missing dependency is excluded and names the dependency. The two recording-stub cells (native-boundary,surfe-boundary) are mandatory and listed apart. They are not a native or Surfe result._structured_grid_3d.pyis removed.test_p0_surfe_nans.pynow skips onsurfepy, the module the Surfe wheel installs. Fourimportorskip("sklearn")lines are removed fromtests/unit/utils/test_transformation.py, because scikit-learn is a root dependency and a mandatory cell must not skip.Behaviour changes
EuclideanTransformation.fit, the fitted-angle sign and the z direction change numbers for current 3D users.COMPAT.mdhas a migration notice.fitwithout scikit-learn raisesImportError. It does not hide the missing dependency.fitnow logs through theloop_commonlogger. A pickle made after this change stores theloop_common.math._transformationpath, so an older release cannot load it. Old pickles still load.Test plan
ruff check LoopStructural packages: passpytest packages/loop_common/tests: 418 passedpytest packages/loop_interpolation/tests: 615 passed, 47 skipped, 2 xfailedpytest(root): 2781 passed, 30 skipped (21 min 28 s). 30 skips: 14 native, 12 Surfe, 3 io modules and 1 forpyevtk.python -m tests.fixtures.backend_matrixon the three junit files: exit 0. 9 non-stub mandatory cells passed and 0 mandatory cells skipped. Excluded optional cells:native-extension(loop_interpolation_core),surfe-extension(surfepy),export-pyevtk(pyevtk).display-viewerpassed, because its dependencies are installed.verification.md("S6 rollback checks").Decisions for review
atolinpackages/loop_interpolation/tests/golden/test_golden.pyis 1e-4, not 1e-5. It comes from the S1 pull request (fix: coordinate and fault-frame correctness, stage S1 (spec 005) #392), has a code comment, and no S6 commit touches it.verification.mdrecords it as accepted. The maintainer accepted this.Notes
specs/005-coordinate-frame-correctness/run-state.json). The main ones:backend_matrix.mainexits 0 for a plain failed cell (a pytest failure still fails the gate); a selector check in the matrix tests is weak;fitaccepts 0 rows and gives a NaN translation; a BOM came back intests/unit/utils/test_transformation.py; an olderROADMAP.mdnote still says the module was "deliberately kept local".COMPAT.mdas known issues:P2Interpolator.add_gradient_constraintsraisesValueErrorfor a P2 foliation with gradient rows, and outside the support the FDI gradient is exactly 0 while the PLI gradient is NaN.black --checkrun for the whole repository.