-
Notifications
You must be signed in to change notification settings - Fork 123
Migrate timemap/refcase dependent observations #12629
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?
Migrate timemap/refcase dependent observations #12629
Conversation
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 PR introduces a migration tool to convert deprecated HISTORY_OBSERVATION to SUMMARY_OBSERVATION and remove dependencies on TIME_MAP and REFCASE from observation configurations. The tool aims to help users migrate away from deprecated features as part of issue #12619.
Changes:
- Adds new
ert_config_migrations.pymodule with observation migration logic - Adds
convert_observationsCLI command to__main__.py
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 18 comments.
| File | Description |
|---|---|
| src/ert/config/ert_config_migrations.py | New module implementing observation migration logic including text editing, observation conversion, and configuration parsing |
| src/ert/main.py | Adds CLI subcommand convert_observations to invoke the migration tool |
cd74709 to
d486212
Compare
b71c665 to
5acb06d
Compare
5ec12c5 to
2a46e17
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12629 +/- ##
==========================================
- Coverage 90.68% 90.63% -0.05%
==========================================
Files 429 430 +1
Lines 29808 30068 +260
==========================================
+ Hits 27030 27253 +223
- Misses 2778 2815 +37
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
900c0e0 to
8bdce57
Compare
8bdce57 to
e81be7b
Compare
2cc6431 to
05a7c56
Compare
47fa2f0 to
071d13f
Compare
| declaration = ( | ||
| f"SUMMARY_OBSERVATION " | ||
| f"{obs_row['observation_key']} {{\n" | ||
| f" VALUE = {obs_row['observations']};\n" |
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.
I think it is better to add :g to the value and error, to avoid an absolute value of 0.01 getting formatted as 0.099999123456 (it will prefer exponential format sometimes, but that is maybe fine enough here)
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.
It gives some discrepancy in test_that_history_observations_values_are_fetched_from_refcase, not sure anymore... Removed the commit temporarily to just have other tests pass, can add it back if we conclude it should be there.
f3a4b9d to
1835d98
Compare
|
The documentation on HISTORY_OBSERVATION may also be deleted in this PR, as this keyword no longer works. |
8ac79ce to
c4ebe63
Compare
Avoid error from overlapping obs types
Avoid error from overlapping obs names across different response types
History observations and general observations already allow for keys being duplicate downstream, in the observation dataset. Thus, it does not make sense to allow a history obs to create 200 duplicate summary obs keys, but for the equivalent to be disallowed if explicitly done in the ert obs config.
b216a30 to
7561a15
Compare
8bd1b85 to
8a34a0b
Compare
Think that should be covered by tests, and it should be removed from |
Overview of changes
REFCASE,TIME_MAP, andHISTORY_OBSERVATIONfrom ERTREFCASEandTIME_MAPis embedded into the obs configGENERAL_OBSERVATIONcan now only be used withRESTART, usage ofDATE,HOURS,DAYScan be migrated if there is aREFCASEorTIME_MAPin the ERT config.SUMMARY_OBSERVATIONcan now only be used withDATE, usage ofRESTART,HOURS,DAYScan be migrated if there is aREFCASEorTIME_MAPin the ERT config.Nice to know:
Issue
Resolves #12619