From 63e9e9c1efb169d4a5663f18c91224f248e407dd Mon Sep 17 00:00:00 2001 From: lachlangrose Date: Mon, 17 Aug 2026 14:17:32 +0930 Subject: [PATCH 1/2] ci: pin map2loop/visualisation release-please versions to fix bad auto-bump Neither package has a component-scoped release-please tag yet (they were only just added to the workspace in #301/#302), so release-please had no correct anchor for their next version and fell back to misreading one of the repo's old generic v1.6.5 LoopStructural tags as their baseline, proposing 1.6.5 for both in the open release PR instead of a proper minor bump from their real current versions (map2loop 3.3.1, loopstructuralvisualisation 0.1.17). One-time release-as pins to the correct next versions; remove once that release PR has merged and each package has its own release-please tag to anchor future bumps. --- release-please-config.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/release-please-config.json b/release-please-config.json index 3dbcbcb2..12d40ea0 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -15,11 +15,13 @@ }, "packages/map2loop": { "release-type": "python", - "component": "map2loop" + "component": "map2loop", + "release-as": "3.4.0" }, "packages/loopstructural_visualisation": { "release-type": "python", - "component": "loopstructuralvisualisation" + "component": "loopstructuralvisualisation", + "release-as": "0.2.0" } } } From 181e813851c7e7311b0cc758f98eb0eee74aefd6 Mon Sep 17 00:00:00 2001 From: lachlangrose Date: Mon, 17 Aug 2026 17:27:44 +0930 Subject: [PATCH 2/2] fix: ensuring stratigraphic order is consistent between methods + adding test --- .../modelling/core/stratigraphic_column.py | 2 +- tests/unit/modelling/test_stratigraphic_column.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/LoopStructural/modelling/core/stratigraphic_column.py b/LoopStructural/modelling/core/stratigraphic_column.py index 4f4eb003..48d5e084 100644 --- a/LoopStructural/modelling/core/stratigraphic_column.py +++ b/LoopStructural/modelling/core/stratigraphic_column.py @@ -668,7 +668,7 @@ def get_isovalues(self) -> dict[str, float]: surface_values = {} for g in reversed(self.get_groups()): v = 0 - for u in g.units: + for u in reversed(g.units): surface_values[u.name] = {'value':v,'group':g.name,'colour':u.colour} v += u.thickness return surface_values diff --git a/tests/unit/modelling/test_stratigraphic_column.py b/tests/unit/modelling/test_stratigraphic_column.py index b10ed36e..1f7fc284 100644 --- a/tests/unit/modelling/test_stratigraphic_column.py +++ b/tests/unit/modelling/test_stratigraphic_column.py @@ -430,6 +430,20 @@ def test_get_isovalues(self): assert isovalues["B"]["value"] == 0 assert isovalues["B"]["group"] == "Group_0" + def test_get_isovalues_multi_unit_group(self): + # Isovalues must match update_unit_values: the base of the oldest + # unit in a group is 0, and each unit's thickness gives the base + # value of the next (younger) unit. + column = StratigraphicColumn() + column.clear(basement=False) + column.add_unit("A", thickness=10, id=0) + column.add_unit("B", thickness=5, id=1) + column.add_unit("C", thickness=3, id=2) + isovalues = column.get_isovalues() + assert isovalues["A"]["value"] == 0 + assert isovalues["B"]["value"] == 10 + assert isovalues["C"]["value"] == 15 + class TestOrderingAndUpdates: def test_update_order_reorders_elements(self):