Add allowed_keyword arguments to fm_steps - #14104
Open
larsevj wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14104 +/- ##
==========================================
- Coverage 91.94% 91.93% -0.02%
==========================================
Files 482 482
Lines 33493 33507 +14
==========================================
+ Hits 30794 30803 +9
- Misses 2699 2704 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
|
berland
reviewed
Aug 5, 2026
| arglist: The arglist with which the executable is invoked | ||
| required_keywords: Keywords that are required to be supplied by the user | ||
| allowed_keywords: Keywords that may be supplied by the user. If unset, | ||
| any keyword is allowed. |
Contributor
There was a problem hiding this comment.
Unset means None. Better to be precise about that, and maybe explicitly state that an empty list is not the same as "unset".
larsevj
force-pushed
the
add_allowed_keywords_fm_steps
branch
from
August 7, 2026 13:27
e1a2d23 to
d683bb7
Compare
larsevj
marked this pull request as ready for review
August 7, 2026 13:27
Contributor
There was a problem hiding this comment.
Pull request overview
Adds opt-in validation for plugin forward-model keyword arguments.
Changes:
- Introduces
allowed_keywordsand aggregated keyword validation. - Applies strict validation to reservoir simulator steps.
- Adds tests, documentation, and updated serialization snapshots.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/ert/config/forward_model_step.py |
Defines and validates allowed keywords. |
src/ert/config/ert_config.py |
Runs allowed and required keyword checks. |
src/ert/plugins/hook_implementations/forward_model_steps.py |
Restricts reservoir simulator keywords. |
tests/ert/unit_tests/config/test_forward_model.py |
Tests keyword contracts and simulator validation. |
docs/ert/getting_started/howto/plugin_system.rst |
Documents the plugin API. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_single_test_run_matches_snapshot/snake_oilsnake_oil.ert/snake_oil.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_single_test_run_matches_snapshot/poly_examplepoly.ert/poly.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_single_test_run_matches_snapshot/heat_equationconfig.ert/config.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_manual_update_matches_snapshot/snake_oilsnake_oil.ert/snake_oil.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_manual_update_matches_snapshot/poly_examplepoly.ert/poly.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_manual_update_matches_snapshot/heat_equationconfig.ert/config.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_evaluate_ensemble_matches_snapshot/snake_oilsnake_oil.ert/snake_oil.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_evaluate_ensemble_matches_snapshot/poly_examplepoly.ert/poly.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_evaluate_ensemble_matches_snapshot/heat_equationconfig.ert/config.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_esmda_matches_snapshot/snake_oilsnake_oil.ert/snake_oil.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_esmda_matches_snapshot/poly_examplepoly.ert/poly.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_esmda_matches_snapshot/heat_equationconfig.ert/config.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_ensemble_smoother_matches_snapshot/snake_oilsnake_oil.ert/snake_oil.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_ensemble_smoother_matches_snapshot/poly_examplepoly.ert/poly.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_ensemble_smoother_matches_snapshot/heat_equationconfig.ert/config.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_ensemble_experiment_matches_snapshot/snake_oilsnake_oil.ert/snake_oil.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_ensemble_experiment_matches_snapshot/poly_examplepoly.ert/poly.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_ensemble_experiment_matches_snapshot/heat_equationconfig.ert/config.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_enif_matches_snapshot/snake_oilsnake_oil.ert/snake_oil.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_enif_matches_snapshot/poly_examplepoly.ert/poly.json |
Updates serialized schema snapshot. |
tests/ert/unit_tests/run_models/snapshots/test_experiment_serialization/test_that_dumped_enif_matches_snapshot/heat_equationconfig.ert/config.json |
Updates serialized schema snapshot. |
Collaborator
Author
|
For flow and eclipse this would change a warning to a ConfigValidationError now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Resolves #12281
git rebase -i main --exec 'just rapid-tests')When applicable
merge screenshot-PR in ert-testdata before merging this PR.