Skip to content
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

Backport commit #8740

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/getting_started/howto/plugin_system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ Notice that by using :code:`installable_forward_model_steps`, validation can be
where the methods ``validate_pre_experiment`` or ``validate_pre_realization_run`` can
throw ``ForwardModelStepValidationError`` to indicate that the configuration of the
forward model step is invalid (which ert then handles gracefully and presents nicely
to the user).
to the user). If you want to show a warning in cases where the configuration cannot be
validated pre-experiment, you can use the ``ForwardModelStepWarning.warn(...)`` method.

To provide documentation for a forward model step given with
``installable_jobs``, use the :code:`job_documentation` name. If you are the
Expand Down
2 changes: 2 additions & 0 deletions src/ert/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ForwardModelStepJSON,
ForwardModelStepPlugin,
ForwardModelStepValidationError,
ForwardModelStepWarning,
ForwardModelStepDocumentation,
)
from .data import MeasuredData
Expand All @@ -27,6 +28,7 @@
"ForwardModelStepJSON",
"ForwardModelStepPlugin",
"ForwardModelStepValidationError",
"ForwardModelStepWarning",
"JobState",
"JobStatus",
"LibresFacade",
Expand Down
2 changes: 2 additions & 0 deletions src/ert/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
ForwardModelStepJSON,
ForwardModelStepPlugin,
ForwardModelStepValidationError,
ForwardModelStepWarning,
)
from .gen_data_config import GenDataConfig
from .gen_kw_config import GenKwConfig, PriorDict, TransformFunction
Expand Down Expand Up @@ -62,6 +63,7 @@
"ForwardModelStepJSON",
"ForwardModelStepPlugin",
"ForwardModelStepValidationError",
"ForwardModelStepWarning",
"GenDataConfig",
"GenKwConfig",
"HookRuntime",
Expand Down
5 changes: 5 additions & 0 deletions src/ert/config/forward_model_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from typing_extensions import NotRequired, Unpack

from ert.config.parsing.config_errors import ConfigWarning
from ert.substitution_list import SubstitutionList

from .parsing import (
Expand All @@ -29,6 +30,10 @@ class ForwardModelStepValidationError(Exception):
"""


class ForwardModelStepWarning(ConfigWarning):
pass


class ForwardModelStepJSON(TypedDict):
"""
A dictionary containing information about how a forward model step should be run
Expand Down