Add controls for configuring localization update strategies - #14316
Add controls for configuring localization update strategies#14316frode-aarstad wants to merge 17 commits into
Conversation
29f2124 to
8ca3267
Compare
|
I have some comments to this change. See my comments in issue: #14296 |
4561d20 to
0059876
Compare
0059876 to
cbbd2d8
Compare
cbbd2d8 to
fe3640e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14316 +/- ##
===========================================
- Coverage 91.75% 70.89% -20.86%
===========================================
Files 485 495 +10
Lines 34719 36195 +1476
===========================================
- Hits 31855 25661 -6194
- Misses 2864 10534 +7670
Flags with carried forward coverage won't be shown. Click here to find out more.
|
fe3640e to
1145f31
Compare
There was a problem hiding this comment.
🟡 Changes recommended
There are confirmed correctness/test-coverage issues (including a potential crash/validation error in the update-settings dialog and ineffective strategy-selection assertions due to missing combobox objectNames).
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Implements GUI support for overriding per-parameter-type update strategies (FIELD/SURFACE/GEN_KW) via a new “Update settings” dialog, and refactors the analysis module variable editing widgets/panels and related tests accordingly.
Changes:
- Refactor
AnalysisModuleEdit/AnalysisModuleVariablesPanelto support selecting localization/update strategy per parameter type, and propagate selections back into parameter configs. - Update experiment panels (Ensemble smoother / Manual update / Multiple data assimilation) to pass parameter configuration into the editor and rename UI label/title to “Update settings”.
- Rework/relocate tests: add new unit tests for the new widgets and correlation-threshold logic; remove/adjust older UI tests that no longer match the refactor.
File summaries
| File | Description |
|---|---|
| tests/ert/unit_tests/gui/run_analysis/test_analysispanel.py | Removes old unit tests for the previous panel API/behavior. |
| tests/ert/unit_tests/gui/experiments/test_multiple_data_assimilation_panel.py | Updates dialog title expectation and removes an old threshold regression UI test. |
| tests/ert/unit_tests/gui/experiments/test_manual_update.py | Updates panel construction to include parameter_configuration. |
| tests/ert/unit_tests/gui/ertwidgets/test_analysispanel.py | Adds unit tests for the refactored variables panel (numeric values + strategy selections). |
| tests/ert/unit_tests/gui/ertwidgets/test_analysismoduleedit.py | Adds unit tests for dialog open/save/cancel behavior in AnalysisModuleEdit. |
| tests/ert/unit_tests/config/test_analysis_module.py | Adds tests for correlation-threshold default/custom behavior. |
| tests/ert/ui_tests/gui/test_main_window.py | Removes a UI test that no longer matches the dialog/widget structure. |
| src/ert/gui/experiments/multiple_data_assimilation_panel.py | Wires parameter configuration into AnalysisModuleEdit and renames label to “Update settings”. |
| src/ert/gui/experiments/manual_update_panel.py | Wires parameter configuration into AnalysisModuleEdit, updates label, and updates ensemble-size handling. |
| src/ert/gui/experiments/experiment_panel.py | Passes parameter configuration into ManualUpdatePanel. |
| src/ert/gui/experiments/ensemble_smoother_panel.py | Wires parameter configuration into AnalysisModuleEdit and renames label to “Update settings”. |
| src/ert/gui/ertwidgets/analysismodulevariablespanel.py | Replaces old “bind directly to analysis module” approach with explicit state + per-type strategy comboboxes. |
| src/ert/gui/ertwidgets/analysismoduleedit.py | Replaces old closable dialog with custom modal dialog supporting per-type strategies and Save/Cancel semantics. |
Review details
Suppressed comments (2)
src/ert/gui/ertwidgets/analysismodulevariablespanel.py:72
- The QComboBox for FIELD doesn't set an objectName, but tests (and potentially other code) rely on identifying comboboxes by parameter type. Without an objectName, those assertions won't run and the widget becomes harder to query.
field_combobox = QComboBox(self)
field_combobox.setModel(_LocalizationTypeModel())
field_combobox.setCurrentIndex(
self._find_correct_index(field_combobox, "FIELD")
)
src/ert/gui/ertwidgets/analysismodulevariablespanel.py:85
- The QComboBox for SURFACE doesn't set an objectName, but tests (and potentially other code) rely on identifying comboboxes by parameter type. Without an objectName, those assertions won't run and the widget becomes harder to query.
surface_combobox = QComboBox(self)
surface_combobox.setModel(_LocalizationTypeModel())
surface_combobox.setCurrentIndex(
self._find_correct_index(surface_combobox, "SURFACE")
)
- Files reviewed: 13/13 changed files
- Comments generated: 6
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
586d318 to
2988dcd
Compare
|
Claude flagged that Manual Update and ES_MDA restart ignores dialog selection. It uses the stored config/from prior. |
587feb5 to
8cdb41a
Compare
Issue
Resolves #14296
Approach
Add controls for configuring localization update strategies per parameter type. Persist accepted threshold, truncation, and strategy changes while discarding edits when the dialog is cancelled and add GUI tests covering panel initialization and dialog behavior.
git rebase -i main --exec 'just rapid-tests')When applicable
merge screenshot-PR in ert-testdata before merging this PR.