Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HakonSohoel
Copy link
Contributor

@HakonSohoel HakonSohoel commented Apr 11, 2025

Issue
Resolves #9699

Approach
Short description of the approach

(Screenshot of new behavior in GUI if applicable)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'just rapid-tests')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Add backport label to latest release (format: 'backport release-branch-name')

Copy link

codspeed-hq bot commented Apr 11, 2025

CodSpeed Performance Report

Merging #10610 will not alter performance

Comparing HakonSohoel:Add-documentation-for-forward_model_configuration-hook (74cd050) with main (0c99153)

Summary

✅ 25 untouched benchmarks

@HakonSohoel HakonSohoel added the release-notes:documentation PR with only changes to documentation label Apr 15, 2025
@@ -22,7 +22,7 @@ def installable_forward_model_steps() -> PluginResponse[

@no_type_check
@hook_specification
def forward_model_configuration() -> PluginResponse[list[type[ForwardModelStepPlugin]]]:
def forward_model_configuration() -> PluginResponse[dict[str, dict[str, Any]]]:
Copy link
Contributor

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?

},
}

``<config value>`` can be of any python type, but will be exported to env by calling ``str(<config value>)``.
Copy link
Contributor

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)

Copy link
Contributor

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

Forward model configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Forward model steps can be configured through the plugin system by using the ``forward_model_configuration`` hook:
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:documentation PR with only changes to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write documentation for forward model configuration
2 participants