-
Notifications
You must be signed in to change notification settings - Fork 123
Remove ResponseMetadata #12575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Remove ResponseMetadata #12575
Conversation
bc7d24f to
9f433b6
Compare
|
|
aac29f6 to
209b748
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12575 +/- ##
==========================================
- Coverage 90.67% 90.65% -0.03%
==========================================
Files 429 429
Lines 29801 29797 -4
==========================================
- Hits 27023 27011 -12
- Misses 2778 2786 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
09d6536 to
8b402e7
Compare
7fc7810 to
006629c
Compare
906955f to
a4df782
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request removes the ResponseMetadata class and its associated metadata property from the response configuration system. The PR refactors the codebase to use ResponseConfig objects directly instead of extracting metadata from them.
Changes:
- Removed
ResponseMetadataclass fromresponse_config.pyand replaced the abstractmetadataproperty with a newfilter_onproperty that provides server-side filtering information - Updated all response config subclasses (GenDataConfig, SummaryConfig, RFTConfig, EverestResponse) to remove their
metadataproperty implementations - Refactored the dark storage endpoints and plot API to work directly with ResponseConfig objects and their attributes
- Added comprehensive test coverage for the new
filter_onproperty behavior
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ert/config/response_config.py | Removed ResponseMetadata class and metadata property; added filter_on property with detailed documentation |
| src/ert/config/gen_data_config.py | Removed metadata property; implemented filter_on property to expose report_step filtering |
| src/ert/config/summary_config.py | Removed metadata property implementation |
| src/ert/config/rft_config.py | Removed metadata property implementation |
| src/ert/config/everest_response.py | Removed metadata property implementation |
| src/ert/config/init.py | Removed ResponseMetadata from exports |
| src/ert/dark_storage/endpoints/experiments.py | Updated to serialize response configs directly instead of metadata list |
| src/ert/gui/tools/plot/plot_api.py | Refactored to use response config directly; updated key definition logic to extract filter_on from config |
| src/ert/gui/tools/plot/plot_window.py | Updated to check response field instead of response_metadata |
| src/ert/gui/tools/plot/data_type_proxy_model.py | Updated to check response.has_finalized_keys instead of response_metadata.finalized |
| tests/ert/unit_tests/config/test_gen_data_config.py | Added new test for filter_on property functionality |
| tests/ert/unit_tests/gui/tools/plot/test_plot_api.py | Updated test expectations to use ResponseConfig instead of ResponseMetadata |
| tests/ert/unit_tests/gui/tools/plot/conftest.py | Updated mock data structure to match new ResponseConfig serialization |
| tests/ert/unit_tests/dark_storage/test_http_endpoints.py | Updated test expectations for new response structure |
| tests/ert/unit_tests/dark_storage/test_dark_storage_state.py | Updated to extract keys from nested config structure |
| tests/ert/performance_tests/test_dark_storage_performance.py | Updated to use key_info.key instead of key_info.response_metadata.response_key |
| assert gdc.report_steps_list[0] == sorted(report_steps) | ||
|
|
||
|
|
||
| def test_report_step_list_is_added_to_filter_on(): |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test name doesn't follow the specification style required by the coding guidelines. It should start with "test_that_" and describe the expected behavior or invariant being tested.
Consider renaming to something like: "test_that_filter_on_property_maps_report_steps_to_each_key"
src/ert/config/response_config.py
Outdated
| """Describe optional server-side filtering for this response. | ||
| Some responses contain an additional *discrete* dimension which is stored as a | ||
| column in the response dataset (often part of :pyattr:`primary_key`). When |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Sphinx cross-reference format is incorrect. ":pyattr:" should be ":py:attr:" for proper rendering in documentation.
| column in the response dataset (often part of :pyattr:`primary_key`). When | |
| column in the response dataset (often part of :py:attr:`primary_key`). When |
src/ert/config/gen_data_config.py
Outdated
| """Expose ``report_step`` as a discrete filter for ``GEN_DATA`` keys. | ||
| ``GEN_DATA`` responses may be produced for multiple report steps. The stored | ||
| response data includes a ``report_step`` column (see :pyattr:`primary_key`). |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Sphinx cross-reference format is incorrect. ":pyattr:" should be ":py:attr:" for proper rendering in documentation.
| response data includes a ``report_step`` column (see :pyattr:`primary_key`). | |
| response data includes a ``report_step`` column (see :py:attr:`primary_key`). |
a4df782 to
e311dc7
Compare
| }, | ||
| responses={ | ||
| response_type: [m.model_dump() for m in config.metadata] | ||
| response_type: [config.model_dump()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to have in the list?
| }, | ||
| responses={ | ||
| response_type: [m.model_dump() for m in config.metadata] | ||
| response_type: [config.model_dump()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to have in the list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
0090df1 to
ab42637
Compare
ab42637 to
bed7d5b
Compare
bed7d5b to
0b92e6e
Compare
Issue
Resolves #12547
Approach
Short description of the approach
(Screenshot of new behavior in GUI if applicable)
git rebase -i main --exec 'just rapid-tests')When applicable