Commit Graph
412 Commits
Author SHA1 Message Date
Kristian Bendiksen 3a1ff7a1e3 CellFilters: Auto-derive combined-filter name from children
Combined filters used to always show whatever literal string the user
passed in (or the default "Combined Filter"). For programmatic creation
without a name, that string never reflected the children, leaving the
case-level "Data Filters" tree row stale when child bounds changed.

Add an m_autoDeriveName flag (default true) to RimCombinedFilter. When
on, the display name is recomputed on every relevant change — addFilter,
removeFilter, onChildAdded, onChildFilterChanged, and combineMode
toggle — by joining children's name() with " AND " / " OR ". The flag
flips to false the first time the user renames the filter via the UI
property panel or via Python (combined.user_description = "..."),
preserving any explicitly typed name verbatim from then on.

Two child-creation paths needed an extra triggerFilterChanged() so the
combined parent recomputes after the child's final name is set:
addPropertyFilterToCombinedFilter (setDefaults updates name without a
signal) and RimcCombinedFilter_addRangeFilter (Rimc applies user
params after addNewFilter).

The Rimc factory passes setAutoDeriveName(false) only when a name is
supplied. The Python example demonstrates both modes side by side, and
test_combined_filter.py adds three cases: named filter preserves its
name, auto-derived filter tracks bound mutations, and Python rename
locks the auto-derived filter.
2026-05-15 08:37:46 +02:00
Kristian Bendiksen eb70d32eb1 Python: Add scriptable Data Filters API for combined filters
Expose the case-level RimDataFilterCollection (introduced for
case-shared cell filters) to Python so scripts can build combined
filters with property-filter and IJK-range children without going
through a view.

Scriptable surface:
- RimEclipseCase.m_dataFilterCollection -> case.data_filter_collection()
- RimDataFilterCollection (object + Filters child array) -> filters()
- RimEclipsePropertyFilter (object + m_lowerBound + m_upperBound) ->
  pf.lower_bound, pf.upper_bound
- RimCellRangeFilter (object + start_index_{i,j,k}, cell_count_{i,j,k})

New CAF object methods under ProjectDataModelCommands/:
- RimcDataFilterCollection: add_combined_filter(name, combine_mode)
- RimcCombinedFilter: add_property_filter(result_variable, result_type)
  and add_range_filter(name, start_{i,j,k}, cell_count_{i,j,k}).

Bounds are not part of add_property_filter because the Python class
generator emits a bare nan literal as the default for double fields
initialised to quiet_NaN, which fails to import. Bounds are set via
the now-scriptable lower_bound/upper_bound fields after creation,
matching the update() pattern used elsewhere in the API.

RicEclipsePropertyFilterFeatureImpl::addPropertyFilterToCombinedFilter
now returns the new RimEclipsePropertyFilter* so the CAF method can
hand it back to Python. setDefaults is relaxed to be view-tolerant:
case-level filters have no Rim3dView ancestor and the eclipse case is
already wired by RimEclipsePropertyFilter::setCase via the owning
collection's onItemsChanged hook.

End-to-end coverage in tests/test_combined_filter.py: round-trip
create, mode toggle, property-filter add/mutate, range-filter
add/mutate. Example script in PythonExamples builds an AND combined
filter that gates PERMX between 100 and 20000 against a K=5..10
slice.
2026-05-15 08:37:46 +02:00
Magne Sjaastad dc20a016f7 #13987 PDM: Migrate Surface and Polygon collections to PdmNestedCollection
Port RimSurfaceCollection, RimPolygonCollection and the polygon-in-view
side onto the new caf::PdmNestedCollection framework, replacing the
per-class folder plumbing (m_subCollections field, topmost-folder flag,
add/remove/find sub-collection, factory, "new folder" command) with the
shared base.

- RimSurfaceCollection and RimPolygonCollection now derive from
  caf::PdmNestedCollection. Each constructor uses the generic folder
  icon and exposes a static createTopmost() that marks the top instance
  and applies the branded domain icon; RimOilField calls the factory.
- RimPolygonInViewCollection uses the new RimNestedMirrorCollectionInView
  helper, and a new RimPolygonContainer carries the source-side polygon
  link.
- RicNewSurfaceCollectionFeature is removed; the generic
  RicNewNestedCollectionFeature drives the "Add Folder" action against
  both collections.
- Update callers (RimAnnotationCollection, RimEnsembleSurface, polygon
  command features) and the scripting wrapper (RimcSurfaceCollection),
  plus the Python add-folder binding and polygon test.
2026-05-13 14:53:00 +02:00
Kristian Bendiksen b775f42057 #13982 Python: Demonstrate string form alongside StrEnum in examples and tests
The property/porosity/data-type arguments accept either a typed StrEnum
(rips.PropertyType.DYNAMIC_NATIVE) or a plain string ("DYNAMIC_NATIVE").
Keep both forms visible to users:

- soil_average_sync.py and input_prop_test_sync.py now use string
  arguments and point at their _async counterparts for the typed-enum
  form. The sync/async examples otherwise mirror each other, so each
  pair documents one form.

- Add test_10k_property_strings to exercise available_properties,
  active_cell_property, grid_property, and set_active_cell_property
  (including data_type="INTEGER") with strings only, so a future
  refactor that narrows the accepted types would fail the suite.
2026-05-13 13:47:40 +02:00
Kristian Bendiksen e7608536cf #13982 Python: Tighten Instance.launch/find return type and drop dead None checks
Instance.launch and Instance.find now always either return a connected
Instance or raise RipsError, so their return type narrows from
Optional[Instance] to Instance. In launch(), the unreachable `if pid:`
guard around the Popen result and the trailing `return None` are
removed; the only failure paths raise RipsError.

Update the PythonExamples that previously branched on a None return:
- Drop `if resinsight is None: exit(1)` style guards and `if resinsight
  is not None:` wrappers; dedent the body where applicable.
- export_corner_point_grid.py used the None check as a fallback to
  launch ResInsight; rewrite as try/except rips.RipsError so the
  fallback still works.
- instance_example.py is repurposed as a try/except example for
  reporting connection failure.
2026-05-13 13:47:40 +02:00
Kristian Bendiksen 1424a6dc53 #13982 Python: Add type hints to remaining methods in case.py
Extend type annotations across the rest of rips.case beyond the property
and enum methods typed in the previous commit. Adds parameter and return
types to the command wrappers (replace, export_*, create_*, import_*),
the simple getters (time_steps, reservoir_boundingbox,
distance_to_closest_fault, days_since_start, view, views, create_view,
simulation_wells, coarsening_info), the selected-cells and NNC accessors
(selected_cells*, nnc_connections*, nnc_connections_{static,dynamic,
generated}_values*), and the private grpc helpers
(__custom_init__, __request, __generate_property_input_iterator,
__generate_property_input_chunks, __nnc_connections_values_async,
__nnc_values_generator_to_list, __generate_nnc_property_input_chunks).

Uses Iterator[X] for grpc streaming responses, List[X] for collected
sequences, the proto message types from Case_pb2 / Properties_pb2 /
NNCProperties_pb2 / Definitions_pb2 for typed payloads, Optional and
Union[str, List[str]] for nullable or coerced-list parameters, and Any
for the heterogeneous _execute_command return values. No runtime
behavior changes; mypy --strict is clean on case.py.
2026-05-13 13:47:40 +02:00
Kristian Bendiksen 79914f2a00 #13982 Python: Type case API with StrEnum classes for proto enums
The previous commit auto-generated StrEnum classes for caf::AppEnum scriptable
fields, but the hand-written gRPC API in rips.case still accepted bare strings
for proto-backed enums (PropertyType, PropertyDataType, NNCPropertyType) and
the AppEnum-backed PorosityModelType.

Add a new rips.enums module with hand-written StrEnum classes for the three
proto-only enums and reuse the auto-generated PorosityModelType from
resinsight_classes. Re-export the new enums from the rips package and narrow
the parameter type hints across cell_count, cell_info_for_active_cells,
available_properties, active_cell_property, selected_cell_property,
grid_property, set_active_cell_property, set_grid_property,
active_cell_centers, active_cell_corners, set_nnc_connections_values, and
grid_property_for_positions (sync and async variants).

Existing string arguments keep working because StrEnum members are strings
and protobuf's EnumTypeWrapper.Value accepts both. A new
test_10k_grid_property_strenum asserts string and enum forms return the same
data.
2026-05-13 13:47:40 +02:00
Kristian Bendiksen 21f1330232 #13982 Python: Generate StrEnum classes for AppEnum-typed fields
Auto-generate enum.StrEnum classes from cafPdmPythonGenerator for every
caf::AppEnum-backed scriptable field, deduplicated by C++ AppEnum type.
Generated PdmObject attributes and method arguments now reference the
typed enum (e.g. self.depth_type: DepthType = DepthType.MEASURED_DEPTH)
instead of bare str. Member names are sanitized against Python keywords
and identifier rules (None -> None_, R-G -> R_G).

Existing scripts that pass plain strings keep working because StrEnum
members are strings; the wire format is unchanged.

Bumps python_requires to >=3.11 (StrEnum). Adds an Enum branch in
PdmObjectBase.__convert_to_grpc_value so future IntEnum use is also
handled.
2026-05-13 13:47:40 +02:00
Kristian Bendiksen 5e880ffc26 Refactor: migrate fourteen more collections to caf::PdmObjectCollection<T>
Migrated to the templated base, preserving each collection's existing XML
field keyword for project-file backward compatibility:

- RimEnsembleFractureStatisticsCollection
- RimEclipseInputPropertyCollection
- RimPlotDataFilterCollection
- RimGeoMechContourMapViewCollection
- RimIntersectionResultsDefinitionCollection
- RimCustomObjectiveFunctionCollection
- RimStimPlanModelTemplateCollection
- RimEnsembleWellLogsCollection
- RimEclipseContourMapViewCollection
- RimSeismicViewCollection
- RimGridInfoCollection
- RimEclipseStatisticsCaseCollection
- RimWellIASettingsCollection
- RimVfpDataCollection

External callers that accessed the old public/named array fields directly
(RimEclipseInputPropertyCollection::inputProperties,
RimEclipseStatisticsCaseCollection::cases) now use addItem/items() from
the base. RimCustomObjectiveFunction.h replaced its include of the
collection header with a forward declaration to break the new include
cycle introduced by the migration.
2026-05-11 13:42:13 +02:00
Kristian Bendiksen 5ffcb69acc #13126 RiaLogging: Use std::string_view instead of QString for logging 2026-05-08 10:11:09 +02:00
Kristian Bendiksen 96dc4df316 #9336 Python: Tolerate transient heartbeat failures
The heartbeat introduced in db871296c closed the gRPC channel after a
single missed ping (2s deadline). On Windows CI under load this fired
during normal operations, leaving every subsequent test stuck on a
dead channel.

Track consecutive failures inside the heartbeat loop and only declare
the connection lost after failure_threshold (default 3) consecutive
failures. A successful ping resets the counter. Per-ping deadline
raised from 2s to 5s, and below-threshold failures log a warning so
transient slowness is still visible.
2026-05-04 20:03:39 +02:00
Kristian Bendiksen 85fc0220c7 #9336 Python: Translate closed-channel errors and stop downgrading RipsError
After the heartbeat closes a dead-server channel, gRPC raises
ValueError("Cannot invoke RPC on closed channel!") rather than a
grpc.RpcError, which slipped past the existing pdmobject wrappers and
surfaced to the user as a bare ValueError nested in a traceback.

- pdmobject add_method decorator and _call_pdm_method_void /
  _return_value / _return_optional_value now also catch the
  closed-channel ValueError and translate it to RipsError.
- well_path.add_well_log no longer rewraps every exception as
  RuntimeError. Cleanup of temporary key-value entries still runs, but
  the original typed exception (e.g. RipsError with code/details) is
  re-raised so callers can inspect it.
2026-05-04 20:03:39 +02:00
Kristian Bendiksen f8d180f48d #9336 Python: Improve error reporting from gRPC to client
Surface gRPC failure context to Python script authors instead of
silently returning sentinel values or raising bare gRPC errors.

- RipsError now carries code/details/location and a from_rpc_error()
  helper. Existing single-arg construction stays valid.
- Stop swallowing grpc.RpcError in case.__grid_count for non-NOT_FOUND
  failures and in instance._check_connection_and_version, so the
  underlying status is propagated.
- pdmobject add_method decorator and _call_pdm_method_* attach
  code/details to the raised RipsError; existing message text is
  preserved so pytest match=... assertions keep working.
- Instance.start_heartbeat / stop_heartbeat / check_alive provide an
  opt-in background ping that flips a sticky lost-connection flag and
  raises a readable RipsError from check_alive() if the server dies.
- Server side: GetPdmObject in RiaGrpcAppService, RiaGrpcCaseService
  and RiaGrpcProjectService no longer return Status::OK with an empty
  reply when the underlying object is missing; they return NOT_FOUND
  / INTERNAL with a descriptive message. Other RiaGrpc*Service files
  audited and already return non-OK with text on error paths.
2026-05-04 20:03:39 +02:00
Kristian Bendiksen 2d88be506d #13908 Python: Add API to read well log information
Expose well logs attached to a well path through the Python API. A new
`well_path.well_logs()` returns the list of well logs, and each
`WellLog` gains `channel_names()` and `well_log_data()` for reading
channel names, measured depth, optional TVD MSL/RKB, and channel
values.

The read methods are registered on the abstract `RimWellLog` base
class and use the common `RigWellLogData` interface so they work for
imported, LAS and OSDU well logs alike.
2026-04-23 19:50:05 +02:00
Magne Sjaastad 03409aed70 #13806 Python: Add category mapping API for discrete properties
Introduce set_discrete_property_category_names on Case to bind integer
result values to text labels and optional colors. Internally it creates a
custom ColorLegend, appends one item per value (with an auto-assigned
palette color when the caller does not provide one) and registers the
legend as the default for the (case, resultName) pair.

Also add Project.color_legend_collection() as a dedicated accessor for
the project's ColorLegendCollection, pytest coverage for legend creation
and the default-legend-for-result binding, and two PythonExamples
demonstrating the end-to-end discrete property + category label flow.

#13806 Python: Silence mypy warnings for category_mapping module
2026-04-20 18:55:36 +02:00
Magne Sjaastad 75c1cedaec #13806 Python: Add API for creating discrete grid properties
Add a data_type parameter to set_active_cell_property, set_active_cell_property_async
and set_grid_property so callers can upload INTEGER-typed discrete properties in
addition to the existing FLOAT properties. Previously a discrete property required
the result name to end with "NUM"; the explicit data type makes the intent
independent of the name.

The gRPC service now forwards the selected data type to
RigCaseCellResultsData::createCategoryResult, and the Python tests cover both
float and integer property uploads.
2026-04-20 18:55:36 +02:00
Magne Sjaastad d119044854 #13881 GrpcServer: Fix crash from undefined behavior in queue shutdown and missing null guard 2026-04-16 16:43:36 +02:00
Kristian Bendiksen b707c4588b #13841 Python: Add available_properties API for regular surfaces 2026-04-13 10:53:06 +02:00
Kristian Bendiksen 68b193cd56 #13841 Python: Add get_property API for regular surfaces 2026-04-09 07:59:34 +02:00
Kristian Bendiksen a0dbbf6cb1 Remove deprecated size_t overloads from RigActiveCellInfo
Migrate all callers to use type-safe ReservoirCellIndex and
ActiveCellIndex wrappers, then remove the deprecated isActive(size_t),
cellResultIndex(size_t), and setCellResultIndex(size_t, size_t) methods.
2026-03-31 12:32:05 +02:00
Copilot 9701f695d8 Python: Expose port number in the Instance class 2026-03-23 08:59:52 +01:00
Kristian Bendiksen 614acc664a #13682 Python: Expose polygon appearance properties to Python API
Make RimPolygonAppearance scriptable so polygon visual properties
(colors, line thickness, spheres, closed state, plane lock) can be
controlled from the Python API.
2026-03-12 08:30:52 +01:00
Kristian Bendiksen 576c2179da #13682 Python: Add API for well path color
Make m_wellPathColor scriptable so it is accessible via the Python API
as well_path_color (hex string). Add a test and update the
import_well_paths_and_logs example to demonstrate setting colors.
2026-03-12 08:30:52 +01:00
Kristian Bendiksen 00b4f180a2 #13515 Fix comma-aware parsing of gRPC string values in Python
Replace naive split(", ") in __makelist() with a quote-aware state
machine that respects quoted strings and nested brackets. Also add
__unescape_string() to reverse C++ escaping, and fix strip('"') to
only remove the outer quote pair.
2026-03-06 20:56:48 +01:00
JJ 24be78f105 Tie-in valve improvements (#13661)
Support (bool, something) pairs as tuples on python side.
Support custom outlet valve md
Add python test for custom outlet valve md
Use tie-in depth as default for custom valve md
Standalone valve creation and display updates
Update MSW valve export
Add valve open/shut flag.
Add python examples
2026-03-06 12:01:14 +01:00
kriben fcff011200 Python code linting changes detected by ruff 2026-03-06 08:52:04 +01:00
Kristian Bendiksen 27042e4bab Python: Fix ruff E402 lint errors in __init__.py
Move typing import to top of file and add noqa: E402 comments
to imports that must follow the sys.path.insert call.
2026-03-06 08:52:04 +01:00
Magne Sjaastad d9e3967519 Add example on creation of regions based on existing polygons 2026-03-06 08:22:16 +01:00
Kristian Bendiksen 75bc84e146 #12452 Python: Replace logger.error with raise RipsError in instance.py
Error conditions in launch() and find() now raise RipsError instead of
logging and returning None, making failures explicit. Updated test to
expect the exception.
2026-03-05 15:58:25 +01:00
Kristian Bendiksen e4ea6ea44f #12452 Python: Replace print() with logging API in rips module 2026-03-05 15:58:25 +01:00
Magne Sjaastad fab00a3fc4 Add test case for completion data for dual porosity models
Dual porosity models reads data for completion calculations from the Fracture part of the grid model. The generated completion data contains references to IJK cells in the fracture section of the grid.
2026-02-24 14:24:15 +01:00
Kristian Bendiksen f52af2c5d0 Fix implicit int-to-bool conversion in gRPC WELSEGS export
Remove stale timeStep parameter that was silently converted to false
for exportCompletionsAfterMainBoreSegments after the function signature
was refactored. Use correct defaults instead.
2026-02-20 13:43:58 +01:00
Kristian Bendiksen 1ec53cc3f2 #13425 Fix ICD/AICD valve output in schedule generation
ICD valves now produce WSEGVALV and AICD valves now produce WSEGAICD
in the generated schedule. Three root causes were fixed:

- Create per-event valve templates with proper parameters instead of
  reusing default templates that lack orifice diameter and AICD fields
- Use perforation interval range for ICD/AICD valve positioning so
  valveLocations() returns non-empty results for the accumulator
- Add 5 AICD parameter fields to the Python API and event classes
2026-02-12 08:15:22 +01:00
Kristian Bendiksen 82e2dbc434 #13425 Fix WELSEGS date scoping: tubing events only appear at their event dates
Tubing event diameter/roughness values were leaking into earlier date
sections in the generated schedule. The WELSEGS collection functions
did not filter intervals by export date, unlike COMPSEGS and other
keywords which already received the exportDate parameter.

Thread exportDate through collectWelsegsData, collectWelsegsDataRecursively,
and collectWelsegsSegment. Add date-aware overloads of getDiameterAtMD and
getRoughnessAtMD that use isActiveOnDate to filter intervals. Update test
to verify tubing values only appear at their scheduled dates.
2026-02-12 08:15:22 +01:00
Kristian Bendiksen a4dad97024 #13425 Add time-dependent well events and schedule data generation
Implement timeline-based event system for managing temporal changes in
well completions, perforations, valves, and production controls.

Features:
- Event timeline container with date-based querying
- Six event types: PERF, VALVE, TUBING, WSTATE, WTYPE, WCONTROL
- Schedule keyword generation (DATES, COMPDAT, WELSEGS, WCONPROD, WCONINJE)
- Multi-well schedule generation support
- Python GRPC API for event management
- YAML configuration file support
- Comprehensive test suite

Implementation:
- New directory: ApplicationLibCode/ProjectDataModel/WellEvents/
- Event classes inherit from RimWellEvent base class
- RimWellEventTimeline integrated into RimWellPath
- RicScheduleDataGenerator for multi-well schedule export
- Python API: event_timeline(), add_perf_event(), add_valve_event(), etc.
- Tests verify all event types and YAML config parsing

#13425 Add date tracking to valves and diameter/roughness intervals

Add creation date fields to RimWellPathValve and RimDiameterRoughnessInterval
to support filtering objects by date during completion data export.

- Add m_useCustomStartDate and m_startDate fields
- Add enableCustomStartDate(), setCustomStartDate(), isActiveOnDate() methods
- Set creation dates when applying valve and tubing events in RimWellEventTimeline

#13425 Add date-based filtering for schedule data export

Add optional export date parameter to MSW data collection functions to filter
valves and perforations based on their creation dates during schedule export.

- Add exportDate parameter to collectWsegvalvData, collectWsegAicdData,
  collectWsegSicdData, and collectCompsegData functions
- Filter valves by checking isActiveOnDate() on the associated RimWellPathValve
- Add RimPerforationInterval reference to RicMswPerforation for date filtering
- Pass export date from RicScheduleDataGenerator through the extraction chain

This ensures segment numbers reflect the full model while only including
objects active on the export date in output keywords.

Add test to prove compsegs changes over time.

#13425 Fix mypy type checking errors in well_events.py

- Add type annotations to all function parameters
- Fix generic type hints (dict -> Dict[str, Any])
- Import Any type for proper type safety
- Add type: ignore for method reassignment
- All 31 tests pass

#13425 Add schedule-level keyword events for non-well-specific keywords

Add a new event type called "Keyword Event" for schedule-level Eclipse
keywords (RPTRST, GRUPTREE, RPTSCHED, etc.) that are NOT tied to a
specific well path. This complements the existing RimWellEventKeyword
which operates at the well level.

- Add RimKeywordEvent class inheriting from RimWellEvent with null wellPath
- Add SCHEDULE_KEYWORD enum value to EventType
- Add addKeywordEvent() method to RimWellEventTimeline
- Add AddKeywordEvent Python API method to RimcWellEventTimeline
- Update RicScheduleDataGenerator to output global keywords after well sections
- Add Python wrapper add_keyword_event() with type inference
- Add tests and examples for RPTRST, GRUPTREE keywords
2026-02-12 08:15:22 +01:00
Kristian Bendiksen f4dd29f70f Python: Fix ruff linting warnings
- Remove unused imports in test files
- Fix bare except clause to use except Exception
- Fix None comparisons to use 'is not None' / 'is None'
- Remove unused variable assignments
- Add noqa comments for intentional patterns (star imports, method
  redefinition for different classes, import after sys.path modification)
- Apply ruff formatting
2026-02-09 08:27:23 +01:00
Kristian Bendiksen 83eda0adcf Python: Replace os.spawnv with subprocess.Popen in Instance.launch
Use subprocess.Popen instead of os.spawnv to launch ResInsight, avoiding
fork() deprecation warnings in multi-threaded contexts with gRPC.
2026-02-09 08:27:23 +01:00
Kristian Bendiksen c09e09007b Python: Use spawn instead of fork for multiprocessing in tests
Set multiprocessing start method to "spawn" in conftest.py to avoid
fork() deprecation warnings when gRPC threads are present.
2026-02-09 08:27:23 +01:00
JJ 49147019a7 Python: Return names of imported properties (#13576)
* Python: Return names of imported properties
2026-02-06 19:34:34 +01:00
Kristian Bendiksen 0dfbcd34f6 #13562 Add python api for getting parent well path
Fixes #13562.
2026-02-06 13:32:22 +01:00
Kristian Bendiksen 9ad2a76f1d #13571 Python: Fix issubclass check for PDM method return types
- Use issubclass() instead of exact class name matching
- Instantiate using child class to preserve subclass type
- Enables polymorphic return types in Python API

Fixes #13571.
2026-02-06 13:32:22 +01:00
Kristian Bendiksen ed995d1891 #10749 Python: Unify TypeVars and add bound for mypy compatibility
- Unify class-level TypeVars D and X into single module-level PdmObjectT
- Add bound="PdmObjectBase" for better type safety

Fixes #10749.
2026-02-06 13:32:22 +01:00
Kristian Bendiksen 71eb461f13 #13528 Add .w extension support for RMSWell files
Files with .w extension are now interpreted as RMSWell format instead of
falling back to ASCII parsing. Added file dialog filter and Python test.
2026-02-04 18:07:10 +01:00
Kristian Bendiksen da923b5731 #10751 Fix os.kill() on Windows by using SIGTERM instead of CTRL_C_EVENT
Fixes #10751.
2026-02-04 15:00:02 +01:00
Magne Sjaastad 5356f078a5 #13435 Improve string list parsing for backslashes and quotes
Enhanced parsing in PdmFieldScriptingCapabilityIOHandler to correctly handle backslashes and escape sequences in both quoted and unquoted strings. Unquoted Windows paths now preserve backslashes, while quoted strings process escape sequences as expected. Added unit tests to verify correct handling of both cases.

Add tests for Windows-style path handling in rips API

Introduce test_windows_paths.py with two pytest tests to verify correct handling of Windows-style file paths (backslashes) in the rips Python API.
2026-02-02 16:35:53 +01:00
JJ 94c3059fd8 Add support for SICD valves (#13496)
* Add SICD parameters
* Add wsegsicd valves to completion export
* Add python method to read template info from valve
* Update tests
2026-01-29 11:16:05 +01:00
Magne Sjaastad c98777e9bb Lower log level for config and service init messages
Changed logging from info to debug for config imports, CAF logging, socket server, and gRPC server startup. OpenTelemetry initialization now only runs if enabled, with results logged at debug level.
2026-01-22 12:49:34 +01:00
Kristian Bendiksen 8b13dbcef1 #12940 Fix empty vector parsing and ReadPastEnd handling for Python GRPC
- Handle empty arrays [] in std::vector<cvf::Vec3d> parser
- Only treat ReadCorruptData as error in generic template (ReadPastEnd
  is expected for types like caf::FilePath that consume all input)
- Use strict mode (allowExtraCharacters=false) for Python GRPC parsing
2026-01-21 08:41:09 +01:00
Kristian Bendiksen 6a1c74bdfc #12940 Add option to only parse in strict mode used from python 2026-01-21 08:41:09 +01:00
Kristian Bendiksen 4ea32ba563 #12940 Add automatic rollback on validation failure for Python GRPC
Implements automatic state restoration when field validation fails during
update(). The Python object now maintains consistency with the server state
by rolling back to the last known valid values.

- Store protobuf snapshot before update attempt
- Restore both protobuf object and Python attributes on validation failure
- Add test_validation_rollback() to verify rollback behavior
- Update bool validation test to assert automatic rollback
- Provides transaction-like semantics for field updates
2026-01-21 08:41:09 +01:00