Update PlotApi to use StorageApi for fetching data - #14270
Conversation
645fb56 to
0c237f4
Compare
0c237f4 to
cd7414d
Compare
cd7414d to
650fa16
Compare
650fa16 to
62662d2
Compare
62662d2 to
0229be1
Compare
0229be1 to
1c33eb5
Compare
|
Screenshots differ from baselines. A baseline update PR has been prepared: equinor/ert-testdata#96 |
|
Screenshot tests now pass. The baseline update PR equinor/ert-testdata#96 has been closed. |
|
Screenshots differ from baselines. A baseline update PR has been prepared: equinor/ert-testdata#97 |
1c33eb5 to
846cdb5
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14270 +/- ##
==========================================
+ Coverage 90.81% 90.84% +0.03%
==========================================
Files 497 497
Lines 36062 36014 -48
==========================================
- Hits 32750 32718 -32
+ Misses 3312 3296 -16
Flags with carried forward coverage won't be shown. Click here to find out more.
|
846cdb5 to
31a602a
Compare
|
Screenshot tests now pass. The baseline update PR equinor/ert-testdata#97 has been closed. |
31a602a to
453e49c
Compare
453e49c to
d340629
Compare
d340629 to
6560040
Compare
d473c67 to
c6760bc
Compare
|
Screenshot tests now pass. The baseline update PR equinor/ert-testdata#103 has been closed. |
c6760bc to
8ae9517
Compare
|
Screenshots differ from baselines. A baseline update PR has been prepared: equinor/ert-testdata#108 |
8ae9517 to
3973c8b
Compare
|
Screenshot tests now pass. The baseline update PR equinor/ert-testdata#108 has been closed. |
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR refactors the GUI plotting layer (PlotApi/PlotWindow) to fetch data via the shared storage-server client (ErtClient/SharedClient) instead of using ad-hoc HTTP client creation, aligning with issue #14244’s goal of a single reusable client for the shared server.
Changes:
- Update
PlotApito useErtClientfor experiments/ensembles/parameters/responses/gradients/observations, and move caching to per-PlotApiinstance caches. - Update
PlotWindowand related tests to call instance methods (api.data_for_parameter(...), etc.) instead of static cached functions requiringens_path. - Add
SharedClient.close_client()and ensure GUI UI tests reset the process-wide shared client between tests.
File summaries
| File | Description |
|---|---|
| tests/ert/unit_tests/gui/tools/plot/test_plot_window.py | Adjust PlotWindow tests to mock PlotApi instance methods and updated data_for_parameter signature. |
| tests/ert/unit_tests/gui/tools/plot/test_plot_api.py | Adapt PlotApi tests to new client plumbing by monkeypatching ErtClient.get_client and escaping behavior. |
| tests/ert/unit_tests/gui/tools/plot/conftest.py | Provide PlotApi fixture using an injected ErtClient wrapper over a mock request client. |
| tests/ert/ui_tests/gui/conftest.py | Add an autouse teardown fixture to close/reset the process-wide SharedClient between GUI UI tests. |
| tests/ert/performance_tests/test_dark_storage_performance.py | Update performance test client wiring to match ErtClient-based PlotApi behavior. |
| src/ert/services/shared_client.py | Add SharedClient.close_client() for explicit lifecycle reset of the singleton client. |
| src/ert/services/ert_client.py | Switch parquet decoding/caching to pandas DataFrames and expose DataFrame-returning endpoints. |
| src/ert/gui/plotting/plot_window.py | Use PlotApi instance methods for data fetching (no longer passes ens_path into static functions). |
| src/ert/gui/plotting/plot_api.py | Replace direct HTTP calls with ErtClient calls and implement per-instance caching wrappers. |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
3973c8b to
5496190
Compare
|
git commit body says "format". That is probably not intentional and can be improved. |
5496190 to
8da2d38
Compare
8da2d38 to
3bf2e5e
Compare
Issue
Resolves #14244
Approach
Short description of the approach
(Screenshot of new behavior in GUI if applicable)
git rebase -i main --exec 'just rapid-tests')Stack created with GitHub Stacks CLI • Give Feedback 💬