-
Notifications
You must be signed in to change notification settings - Fork 108
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
Raise warning when summary key and no simulator job present in ert config #8666
Conversation
7b5264c
to
dda7735
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8666 +/- ##
=======================================
Coverage 91.38% 91.38%
=======================================
Files 342 342
Lines 21028 21034 +6
=======================================
+ Hits 19216 19222 +6
Misses 1812 1812
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
a0f8da8
to
d3f000a
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.
The logic itself looks good, but I think this should ideally be done in summary_config.py
as we want to avoid config-specific logic in ErtConfig
. I think you can just traverse the config_dict
in SummaryConfig.from_config_dict
, and find out whether there is an ecl or flow forward model up, and expect the tests you introduced to work the same.
62098c7
to
b857a58
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.
LGTM, consider the one comment wrt cosmetic refactor and also jobs vs fm steps, I think we mostly want to call everything forward model steps and move away from the "jobs" notation (even though ert config keywords are still directly called INSTALL_JOB etc etc).
src/ert/config/summary_config.py
Outdated
forward_model = config_dict.get(ConfigKeys.FORWARD_MODEL, []) | ||
names = [step[0] for step in forward_model] | ||
simulation_step_exists = False | ||
for job_name in names: |
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.
Would refactor this a bit to something like this:
simulation_step_exists = any(_name for _name in names if _name.lower() in ["eclipse","flow"])
and also not use job_name
and stick with fm_step_name
or step_name
, starting w/ calling the names
fm_step_names
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.
simulation_step_exists = any(_name for _name in names if _name.lower() in ["eclipse","flow"])
This looks nice and it is also equivalent to simulation_step_exists = any(_name.lower() in ["eclipse","flow"]) for _name in names
but it does not capture the same logic.
To do everything in one line it should be something like:
any(any(sim_name in _name.lower() for sim_name in ["eclipse","flow"]) for _name in names)
b857a58
to
028269b
Compare
Issue
Resolves #3004
Approach
Raise warning when summary key and no simulator job present in ert config
When applicable