-
Notifications
You must be signed in to change notification settings - Fork 121
Document forward_model_configuration hook #10610
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
Document forward_model_configuration hook #10610
Conversation
CodSpeed Performance ReportMerging #10610 will not alter performanceComparing Summary
|
| @no_type_check | ||
| @hook_specification | ||
| def forward_model_configuration() -> PluginResponse[list[type[ForwardModelStepPlugin]]]: | ||
| def forward_model_configuration() -> PluginResponse[dict[str, dict[str, Any]]]: |
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.
Was this not caught by mypy?
Should it be in a separate commit with a separate message?
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.
Created separate commit for this👌
| }, | ||
| } | ||
| ``<config value>`` can be of any python type, but will be exported to env by calling ``str(<config value>)``. |
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.
We should also mention that config_key is case-insensitive (at least upper-cased, check tests)
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.
Not really case-insensitive, but the environment variables are upper-case no matter what is put in the configuration
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.
👌
| Forward model configuration | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Forward model steps can be configured through the plugin system by using the ``forward_model_configuration`` hook: |
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.
This introduction should mention that the configuration is about specific environment variables that Ert will inject when starting the forward model.
74cd050 to
f9bd43e
Compare
| } | ||
| * ``<config value>`` can be of any python type, but will be exported to env by calling ``str(<config value>)``. | ||
| * ``config_key`` will always exposed as upper case environment variables. |
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.
always be exposed
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Forward model steps can be configured through the plugin system by using the ``forward_model_configuration`` hook. | ||
| For each forward model step name in the config dict, a set of configuration parameters spesific to that forward model can be spesified. |
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.
spesific -> specific
spesified -> specified
f9bd43e to
d03c803
Compare
berland
left a comment
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.
yay!
Issue
Resolves #9699
Approach
Short description of the approach
(Screenshot of new behavior in GUI if applicable)
git rebase -i main --exec 'just rapid-tests')When applicable