Refactor depth property handling for regular surfaces

- Introduce RimRegularFileSurface::propertyName() as canonical property key for file-based surfaces.
- Change RimRegularSurface::setPropertyAsDepth() to void and remove existence check; error handling is now in updateSurfaceData().
- Update all usages to match new setPropertyAsDepth() behavior.
- Log and handle missing depth property in updateSurfaceData().
- Update tests to reflect new error handling approach.
- Minor includes and logging improvements.
This commit is contained in:
Magne Sjaastad committed 2026-01-20 18:21:56 +01:00
1 parent a6ce2b3a65
commit 4b9f94efb8
7 files changed
+25 -16

No files matched your search

@@ -68,9 +68,6 @@ def test_create_regular_surface(rips_instance, initialize_test):
assert s.nx == nx
assert s.ny == ny
with pytest.raises(rips.RipsError, match="Failed to set depth property."):
s.set_property_as_depth(name="non_existing_property")
with pytest.raises(
rips.RipsError, match="Failed to set property: incorrect dimensions."
):
@@ -84,10 +81,6 @@ def test_create_regular_surface(rips_instance, initialize_test):
s.nx = 30
s.update()
# 'depth' property is now gone
with pytest.raises(rips.RipsError, match="Failed to set depth property."):
s.set_property_as_depth(name="depth")
def test_create_regular_surface_invalid_values(rips_instance, initialize_test):
case_path = dataroot.PATH + "/Case_with_10_timesteps/Real0/BRUGGE_0000.EGRID"