Commit Graph
18712 Commits
Author SHA1 Message Date
Kristian Bendiksen 71fa7d2c26 #12940 Add validation for Python GRPC field updates with atomic rollback
Implements comprehensive type and range validation to prevent invalid data
from being set via Python GRPC interface. Invalid values are rejected with
clear error messages. Uses two-phase commit pattern to ensure atomic updates
where either all fields update or none do.

Validation Features:
- Type validation: Ensures field value types match (parsing errors caught)
- Range validation: Checks values against min/max constraints defined with
  setRange(), setMinValue(), setMaxValue()
- Object validation: Validates cross-field constraints via validate() override
- Atomic updates: Two-phase commit ensures all-or-nothing semantics
- Rollback on error: Failed validation leaves ALL fields at previous values
- Clear error messages: Aggregates and returns all validation failures

Implementation:
- Use std::expected<void, QString> for type-safe error handling (C++23)
- assignFieldValue(): Validates after parsing, rolls back individual field on error
- copyPdmObjectFromRipsToCaf(): Two-phase commit pattern
  - Phase 1: Validate all fields and collect changes (defer UI notifications)
  - Phase 2: If any validation fails, rollback all fields; otherwise commit all
- UpdateExistingPdmObject(): Returns grpc::INVALID_ARGUMENT with validation details

Testing:
- Comprehensive Python tests demonstrating validation behavior
- Test atomic rollback: multiple fields rolled back when one fails
- No regression in existing functionality

Documentation:
- Added validation documentation to CLAUDE.md with examples
- Explains how to set field ranges and handle validation errors in Python

Built on validation infrastructure from commit f342ca77 (PdmFieldHandle and
PdmObjectHandle validation support).
2026-01-21 08:41:09 +01:00
Magne Sjaastad 980fde7c23 Bump to 2025.12.1-dev.04 2026-01-20 18:37:53 +01:00
Magne Sjaastad 4b9f94efb8 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.
2026-01-20 18:21:56 +01:00
Magne Sjaastad a6ce2b3a65 Use range-based for loop 2026-01-20 18:21:56 +01:00
Magne Sjaastad 2a129e3700 Call base addSurface explicitly in RimEnsembleSurface ctor
Explicitly invoke RimSurfaceCollection::addSurface when adding
statistic surfaces in RimEnsembleSurface's constructor. This
clarifies method resolution and ensures the correct base class
implementation is used.
2026-01-20 18:21:56 +01:00
Magne Sjaastad 5041dffb4d Refactor MSW segment scaling to use named constants
Replaced hardcoded scaling factors for MSW segment radius, marker length, and marker radius with named constants. This improves code readability and maintainability by centralizing visualization parameters for MSW segments and boundary markers.
2026-01-20 14:13:22 +01:00
Magne Sjaastad ae8cc0ecad Add MSW_SEGMENT well path component type and support
Introduce MSW_SEGMENT to WellPathComponentType enum, assign DARK_CYAN color, update sorting order, and add plotting logic with column features and rectangular marker for visualization.
2026-01-20 14:13:22 +01:00
Magne Sjaastad cb9f3eb07a Add visualization and picking for MSW segments in well path
Introduce support for rendering MSW (Multi-Stage Well) segments in well path visualizations, including alternating color cylinders and boundary markers. Integrate MSW segment display into both regular and flattened geometry builders. Add picking support in the viewer: when an MSW segment is selected, display its properties (segment number, branch, MD range, diameter) and select it in the UI. Also, increase perforation visualization radius for improved clarity.
2026-01-20 14:13:22 +01:00
Magne Sjaastad 4b3ebd2a95 Add MSW segment support to well path completions/collection
Introduce MSW segment collection to RimWellPathCompletions, including UI tree integration and completion list updates. Add MSW Eclipse case and show bands fields to RimWellPathCollection, with new UI controls and update logic. Implement segment update and visualization methods, option calculation for Eclipse case selection, and update headers and includes accordingly.
2026-01-20 14:13:22 +01:00
Magne Sjaastad 0aec220869 Added note to always use parentheses when accessing field values for proper type management. 2026-01-20 14:13:22 +01:00
Magne Sjaastad d53f71ae45 Add MSW segment support for WELSEGS-based visualization
Introduce RimMswSegment and RimMswSegmentCollection classes to manage and visualize Multi-Segment Well (MSW) segments from Eclipse WELSEGS data. Update WelsegsRow to include source well name for correct segment grouping. Integrate new classes into the build system and UI, enabling accurate 3D well path representation and improved segment management in ResInsight.
2026-01-20 14:13:22 +01:00
JJ b87579961b Add support for using alias names for result names (#13453)
* Add alias editing to UI
* Enable result aliases for both eclipse and roff results
* Update python script to work on Windows
* Add Python interface for result aliases
* Add python test
2026-01-20 14:12:27 +01:00
Magne Sjaastad 303c781341 Remove cell result data API from RimEclipseView
Deleted m_cellResultData field and related methods from RimEclipseView, including UI handling and scriptable access. Also removed cell_result_data.py, eliminating direct scripting access to cell result data.

These functions are supported on a case in functions set_grid_property() and grid_property()
2026-01-20 13:50:27 +01:00
magnesj 4966a179cb Fixes by clang-format 2026-01-20 13:44:06 +01:00
Magne Sjaastad ed759bf39a Adds telemetry for gRPC command and PDM calls
Improves observability by adding telemetry events for gRPC command executions and PDM object method calls.

These events include details such as command names, status, errors,
warnings, and the class of PDM objects involved. This enhances the ability
to monitor and diagnose issues within the gRPC services.
2026-01-20 13:44:06 +01:00
Magne Sjaastad 71a90a8cb9 Enhances telemetry data with user info
Adds username hashing for privacy-preserving telemetry and includes full username for crash reports to aid debugging.
Also incorporates OS information into crash reports for better diagnostics.
2026-01-20 13:44:06 +01:00
Kristian Bendiksen d00d3f20b1 #13282 Histogram Plots: Add option for Logarithmic axis scale
Fixes #13282.
2026-01-20 11:44:01 +01:00
Kristian Bendiksen 75371d3471 #13326 Ensemble Well Target Mapping: Make polygons visible in Contour Map
Fixes #13326.
2026-01-19 18:56:39 +01:00
Magne Sjaastad 9851afc621 #2070 AppFwk : Disable default IO for proxy fields
Proxy fields usually reads and transforms data from other sources, usually other Pdm fields. This commit disables IO for proxy fields in the constructor. If XML serialization is required, this must be set on the proxy field, like this

field.xmlCapability()->setIOWritable(true)
field.xmlCapability()->setIOReadable(true)
2026-01-19 16:10:14 +01:00
Magne Sjaastad d4a64b4033 #13402 Fixes parsing of well names with colons
Improves the parsing logic for well names in Eclipse
summary addresses, allowing well names to contain colons.

Previously, the parsing would incorrectly split well names
at colons.

Adds a unit test to verify correct parsing of well names with
colons.
2026-01-19 16:08:59 +01:00
magnesj 5ea1a34c53 Python code linting changes detected by black 2026-01-18 21:46:02 +01:00
Magne Sjaastad 50fc65c5fb #13055 Skip error data export for ensemble curves in Show Plot Data 2026-01-15 12:15:35 +01:00
Magne Sjaastad 2d4df3abf4 #13392 Summary Plot: Wrong values for "Time From Simulation Start"
The ensemble curve values are cached for performance reasons. Include the time settings in the hash function used to control the cache. This will make sure that the curve values are recreated when the time setting changes.
2026-01-15 12:15:35 +01:00
JJ 5bb431ef33 Improve handling of data keywords in deck files. (#13423)
* Handle data keywords, and use data flag to check if a result with a given name should be added or not to the output file.
2026-01-14 12:06:59 +01:00
Magne Sjaastad f06bd7f129 Fix missing display of legends in Qt 6.9
Updates the Qwt subproject to the latest commit to incorporate necessary fixes and improvements for legend-related issues in Qt6.
2026-01-13 17:15:33 +01:00
Kristian Bendiksen cff710754b Bump version to dev.03 2026-01-13 10:44:55 +01:00
Kristian Bendiksen a71fb9ad19 #13398 Python: Add API for custom well path segments
Add Python GRPC interface support for creating and managing custom segment
intervals for multi-segment wells. This provides API parity with the existing
GUI functionality.

Changes:
- Add createInterval() method to RimCustomSegmentIntervalCollection
- Add GRPC method addCustomSegmentInterval to RimcWellPathCompletionSettings
- Add validation to prevent creating intervals with start_md >= end_md
- Add Python test test_custom_segment_intervals.py with validation test
- Add usage example to modeled_well_path.py

Follows the pattern established by diameter roughness intervals.

Fixes #13398.
2026-01-13 10:44:55 +01:00
Kristian Bendiksen e34d36ee99 Simulation Input: Support more well keywords. 2026-01-12 17:19:38 +01:00
Kristian Bendiksen 1c9c5a85ad #13333 Simulation Input: Add EDITNNC export functionality for sector models 2026-01-12 17:19:38 +01:00
Kristian Bendiksen e681b4603a Refactor: use RigBoundingBoxIjk in RigActiveCellInfo. 2026-01-12 09:58:55 +01:00
Kristian Bendiksen 11dfdc2c21 Refactor: convert RigBoundingBoxIjk to template class. 2026-01-12 09:58:55 +01:00
Kristian Bendiksen 15ef5e4701 Refactor: use bounding box more. 2026-01-12 09:58:55 +01:00
Kristian Bendiksen a4ade9e595 Remove duplicated code. 2026-01-12 09:58:55 +01:00
Kristian Bendiksen 2836885850 Refactor: avoid using VecIjk1 internally. 2026-01-12 09:58:55 +01:00
Kristian Bendiksen b7d940a0a2 RigBoundingBox: add contains method with tests. 2026-01-12 09:58:55 +01:00
Kristian Bendiksen 816aef2f2c Grid: Add utility method for cell index from VecIjk0. 2026-01-12 09:58:55 +01:00
Magne Sjaastad 88c17224a0 Add Python example 2026-01-12 09:32:42 +01:00
Magne Sjaastad c6ed12be92 Adds MSW name grouping pattern functionality
Implements a new command to set the MSW grouping pattern, and ensures that the pattern is only updated if a new value is set.
2026-01-12 09:32:42 +01:00
Magne Sjaastad e79ff8e7a7 Add MSW grouping options to RimWellPathCollection
Introduce "MSW Grouping" feature to allow users to control how multi-segmented wells are grouped by name. Adds a new enum for grouping mode (use preferences, custom, disabled), new fields for grouping mode and pattern, and updates UI and logic to support these options. This provides greater flexibility and user control over well path grouping, especially for multi-lateral wells.
2026-01-12 09:32:42 +01:00
jonjenssen 3821434022 Support removing user specified keywords from output sector model. 2026-01-12 08:13:43 +01:00
Magne Sjaastad 1101d74b69 Use azure caching for clang-tidy job 2026-01-12 07:48:53 +01:00
Magne Sjaastad 1ae6f40a98 Rename Ubuntu 24.04 gcc-14 to Ubuntu 24.04 gcc 2026-01-12 07:27:40 +01:00
Magne Sjaastad cfd634e206 Updates PDM UI label positioning
Updates the way UI label positions are set for PDM fields.
2026-01-08 21:44:58 +01:00
Magne Sjaastad b9f09c41d7 Documents PDM UI editor attribute migration
Explains the migration from the old `defineEditorAttribute`
pattern to the new `setAttribute` pattern using type-safe
Keys structs in the PDM UI editor.

Highlights the benefits of the new pattern, including type
safety, IDE support, self-documentation, maintainability,
and validation.

Provides examples of common attribute usage for different
editor types. Clarifies backward compatibility, noting the
coexistence of both patterns during migration.
2026-01-08 21:44:58 +01:00
Magne Sjaastad 526a0f0b43 Replaces direct attribute access with map-based system
Migrates UI editor attribute definitions from direct member access in `defineEditorAttribute` to a map-based system using `setAttribute`.
2026-01-08 21:44:58 +01:00
Magne Sjaastad 6e23037bb8 Refactors PdmUiItemInfo and PdmOptionItemInfo
Refactors PdmUiItem and moves PdmUiItemInfo and PdmOptionItemInfo classes.

Adds attribute support as a replacement for defineEditorAttributes
2026-01-08 21:44:58 +01:00
Kristian Bendiksen 51b9508483 #11807 Update completion export reference for Clipper2
Updates the unified completion export reference data to match Clipper2's
output. The Clipper2 upgrade introduces small numerical precision improvements
(4th-6th decimal places) in fishbone/perforation calculations due to better
intersection algorithms and edge case handling.
2026-01-07 16:07:09 +01:00
Kristian BendiksenandMagne Sjaastad d80ada607f #11807 Upgrade to Clipper2
Replaces the deprecated Clipper library with the actively maintained Clipper2 library.

Removes the local copy of the Clipper library and uses vcpkg to manage the dependency.

Fixes #11807

Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2026-01-07 16:07:09 +01:00
jonjenssen 1181799ec2 Fix crash when selecting a cell in 2d intersection view by adding null pointer guards. 2026-01-06 19:21:36 +01:00
Jon Jenssen 51b1bbda6c Update OpenVDS to latest version 3.4.9 2026-01-06 19:21:10 +01:00