Skip to content

Commit 162e861

Browse files
committed
Update rips module, proto files, and Python examples
1 parent 6850101 commit 162e861

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

docs/rips/generated/generated_classes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from rips.pdmobject import PdmObjectBase
33
import PdmObject_pb2
44
import grpc
5-
from typing import Optional, Dict, List, Type
5+
from typing import Optional, Dict, List, Tuple, Type
66

77
class CellFilterCollection(PdmObjectBase):
88
"""

docs/rips/instance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def __kill_process(pid: int) -> None:
9191
Kill the process with a given pid.
9292
"""
9393
if hasattr(signal, "CTRL_C_EVENT"):
94-
# windows does not have kill
95-
os.kill(pid, signal.CTRL_C_EVENT)
94+
# windows - use SIGTERM for process termination
95+
os.kill(pid, signal.SIGTERM)
9696
else:
9797
# linux/unix
9898
os.kill(pid, signal.SIGKILL)

docs/rips/tests/test_wells.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,3 +386,25 @@ def test_valve_template_invalid_completion_type(rips_instance, initialize_test):
386386
# Test invalid completion type
387387
with pytest.raises(rips.RipsError):
388388
valve_templates.add_template(completion_type="INVALID_TYPE")
389+
390+
391+
def test_import_rmswell_with_w_extension(rips_instance, initialize_test):
392+
"""Test that .w extension files are correctly imported as RMSWell format."""
393+
case_root_path = dataroot.PATH + "/TEST10K_FLT_LGR_NNC"
394+
case_path = case_root_path + "/TEST10K_FLT_LGR_NNC.EGRID"
395+
case = rips_instance.project.load_case(path=case_path)
396+
397+
well_path_file = (
398+
"../../../ApplicationLibCode/UnitTests/TestData/RifRmsWellPathReader/55_33-1.w"
399+
)
400+
well_path_names = rips_instance.project.import_well_paths([well_path_file])
401+
402+
assert len(well_path_names) == 1
403+
wells = rips_instance.project.well_paths()
404+
assert len(wells) == 1
405+
assert wells[0].name == "55_33-1"
406+
407+
# Verify well path geometry was read correctly (RMSWell format)
408+
# File has 5 points from MD 0-20m, resampled at 1.0m interval gives 21 points
409+
result = wells[0].trajectory_properties(resampling_interval=1.0)
410+
assert len(result["measured_depth"]) == 21

0 commit comments

Comments
 (0)