From 7d8bb2a0bcd0828f26d7f9d0ff1167ffbfe9172d Mon Sep 17 00:00:00 2001 From: "Yngve S. Kristiansen" Date: Mon, 17 Jun 2024 14:12:17 +0200 Subject: [PATCH] Port ert forward model steps to plugin format --- .../shared/hook_implementations/__init__.py | 2 + .../forward_model_steps.py | 574 ++++++++++++++++++ .../docs/description/CAREFUL_COPY_FILE.rst | 7 - .../docs/description/COPY_DIRECTORY.rst | 5 - .../docs/description/COPY_FILE.rst | 5 - .../docs/description/DELETE_DIRECTORY.rst | 12 - .../docs/description/DELETE_FILE.rst | 5 - .../docs/description/MAKE_DIRECTORY.rst | 2 - .../docs/description/MAKE_SYMLINK.rst | 2 - .../docs/description/MOVE_FILE.rst | 3 - .../docs/description/SYMLINK.rst | 2 - .../docs/description/TEMPLATE_RENDER.rst | 3 - .../docs/examples/CAREFUL_COPY_FILE.rst | 3 - .../docs/examples/COPY_FILE.rst | 3 - .../docs/examples/ECLIPSE100.rst | 13 - .../docs/examples/ECLIPSE300.rst | 9 - .../ert/forward-models/docs/examples/FLOW.rst | 9 - .../docs/examples/TEMPLATE_RENDER.rst | 25 - 18 files changed, 576 insertions(+), 108 deletions(-) create mode 100644 src/ert/shared/hook_implementations/forward_model_steps.py delete mode 100644 src/ert/shared/share/ert/forward-models/docs/description/CAREFUL_COPY_FILE.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/description/COPY_DIRECTORY.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/description/COPY_FILE.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/description/DELETE_DIRECTORY.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/description/DELETE_FILE.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/description/MAKE_DIRECTORY.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/description/MAKE_SYMLINK.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/description/MOVE_FILE.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/description/SYMLINK.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/description/TEMPLATE_RENDER.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/examples/CAREFUL_COPY_FILE.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/examples/COPY_FILE.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/examples/ECLIPSE100.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/examples/ECLIPSE300.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/examples/FLOW.rst delete mode 100644 src/ert/shared/share/ert/forward-models/docs/examples/TEMPLATE_RENDER.rst diff --git a/src/ert/shared/hook_implementations/__init__.py b/src/ert/shared/hook_implementations/__init__.py index 32e0f5b158b..a42749a4f0b 100644 --- a/src/ert/shared/hook_implementations/__init__.py +++ b/src/ert/shared/hook_implementations/__init__.py @@ -1,3 +1,4 @@ +from .forward_model_steps import installable_forward_model_steps from .help_resources import help_links from .jobs import installable_jobs, installable_workflow_jobs, job_documentation from .site_config import site_config_lines @@ -10,4 +11,5 @@ "job_documentation", "site_config_lines", "legacy_ertscript_workflow", + "installable_forward_model_steps", ] diff --git a/src/ert/shared/hook_implementations/forward_model_steps.py b/src/ert/shared/hook_implementations/forward_model_steps.py new file mode 100644 index 00000000000..a5dfef6cb9c --- /dev/null +++ b/src/ert/shared/hook_implementations/forward_model_steps.py @@ -0,0 +1,574 @@ +import os.path +from textwrap import dedent +from typing import List, Optional, Type + +from ert import ( + ForwardModelStepJSON, + ForwardModelStepPlugin, + ForwardModelStepValidationError, +) +from ert.config.forward_model_step import ForwardModelStepDocumentation +from ert.shared.plugins.plugin_manager import hook_implementation +from ert.shared.plugins.plugin_response import plugin_response + + +class CAREFUL_COPY_FILE(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="CAREFUL_COPY_FILE", + command=[ + os.path.abspath("../share/ert/shell_scripts/copy_file.py"), + "", + "", + ], + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + description=dedent( + """ + The :code:`CAREFUL_COPY_FILE` job will copy a file. If the :code:`` + argument has a directory component, that directory will be created. + This is an extension of the normal :code:`cp` command + which will *not* create directories in this way. + This job superseded an older version called :code:`CAREFULL_COPY` + and should be used instead. + """ + ), + examples=""" +.. code-block:: bash + + FORWARD_MODEL CAREFUL_COPY_FILE(=file1, =path/to/directory/file1) +""", + category="utility.file_system", + ) + + +class COPY_DIRECTORY(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="COPY_DIRECTORY", + command=[ + os.path.abspath("../share/ert/shell_scripts/copy_directory.py"), + "", + "", + ], + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="utility.file_system", + description=""" +The job copies the directory :code:`` to the target :code:``. If +:code:`` points to a non-existing directory structure, it will be +created first. If the :code:`` folder already exist it creates a new directory within the existing one. +E.g. :code:`COPY_DIRECTORY (=foo, =bar)` creates :code:`bar/foo` if the directory +:code:`bar` already exists. If :code:`bar` does not exist it becomes a copy of :code:`foo`. + """, + examples=""" +.. code-block:: bash + + FORWARD_MODEL COPY_DIRECTORY(=dir1, =path/to/directory/dir1) +""", + ) + + +class COPY_FILE(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="COPY_FILE", + command=[ + os.path.abspath("../share/ert/shell_scripts/copy_file.py"), + "", + "", + ], + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="utility.file_system", + description=""" +The :code:`COPY_FILE` job will copy a file. If the :code:`` +argument has a directory component, that directory will be created. +This is an extension of the normal :code:`cp` command +which will *not* create directories in this way. +""", + examples=""" +.. code-block:: bash + + FORWARD_MODEL COPY_FILE(=file1, =path/to/directory/file1) +""", + ) + + +class DELETE_DIRECTORY(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="DELETE_DIRECTORY", + command=[ + os.path.abspath("../share/ert/shell_scripts/delete_directory.py"), + "", + ], + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="utility.file_system", + description=""" +The :code:`DELETE_DIRECTORY` job will recursively remove a directory +and all the files in the directory. Like the :code:`DELETE_FILE` job +it will *only* delete files and directories which are owned by the +current user. If one delete operation fails the job will continue, but +unless all delete calls succeed (parts of) the directory structure +will remain. + +.. warning:: + If the directory to delete is a symlink to a directory, it will only delete + the link and not the directory. However, if you add a trailing slash to the + directory name (the symlink), then the link itself is kept, but the directory + it links to will be removed. + +""", + examples=""" +.. code-block:: bash + + FORWARD_MODEL DELETE_DIRECTORY(=path/to/directory) +""", + ) + + +class DELETE_FILE(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="DELETE_FILE", + command=[ + os.path.abspath("../share/ert/shell_scripts/delete_file.py"), + "", + ], + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="utility.file_system", + description=""" +The :code:`DELETE_FILE` job will *only* remove files which are owned +by the current user, *even if* file system permissions would have +allowed the delete operation to proceed. The :code:`DELETE_FILE` will +*not* delete a directory, and if presented with a symbolic link it +will *only* delete the link, and not the target. +""", + examples=""" + .. code-block:: bash + + FORWARD_MODEL DELETE_FILE(=path/file path/file2 path/fileN) +""", + ) + + +class ECLIPSE100(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="ECLIPSE100", + command=[ + os.path.abspath("../share/ert/forward-models/res/script/ecl100.py"), + "", + "-v", + "", + "-n", + "", + "", + ], + default_mapping={"": 1, "": ""}, + ) + + def validate_pre_experiment(self, fm_step_json: ForwardModelStepJSON) -> None: + if "version" not in self.private_args: + raise ForwardModelStepValidationError( + "ECLIPSE100 job must be given a VERSION argument" + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="simulators.reservoir", + examples=""" +The version, number of cpu, and whether or not to ignore errors and whether or not to produce `YOUR_CASE_NAME.h5` output files can +be configured in the configuration file when adding the job, as such: + + +.. code-block:: bash + + FORWARD_MODEL ECLIPSE100(, =xxxx, ={"--ignore-errors", "--summary-conversion"}) + +The :code:`OPTS` argument is optional and can be removed, fully or partially. +In absence of :code:`--ignore-errors` eclipse will fail on errors. +Adding the flag :code:`--ignore-errors` will result in eclipse ignoring errors. + +And in absence of :code:`--summary-conversions` eclipse will run without producing `YOUR_CASE_NAME.h5` output files. +Add flag :code:`--summary-conversions` to produce `YOUR_CASE_NAME.h5` output files. +""", + ) + + +class ECLIPSE300(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="ECLIPSE300", + command=[ + os.path.abspath("../share/ert/forward-models/res/script/ecl300.py"), + "", + "-v", + "", + "-n", + "", + "", + ], + default_mapping={"": 1, "": "", "": "version"}, + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="simulators.reservoir", + examples=""" +The version, number of cpu and whether or not to ignore errors can +be configured in the configuration file when adding the job, as such: + +.. code-block:: bash + + FORWARD_MODEL ECLIPSE300(, =xxxx, ="--ignore-errors") + +The :code:`OPTS` argument is optional and can be removed, thus running eclipse +without ignoring errors +""", + ) + + +class FLOW(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="FLOW", + command=[ + os.path.abspath("../share/ert/forward-models/res/script/flow.py"), + "", + "-v", + "", + "-n", + "", + "", + ], + default_mapping={ + "": "default", + "": 1, + "": "", + }, + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="simulators.reservoir", + examples=""" +The version, number of cpu and whether or not to ignore errors can +be configured in the configuration file when adding the job, as such: + +.. code-block:: bash + + FORWARD_MODEL FLOW(, =xxxx, ="--ignore-errors") + +The :code:`OPTS` argument is optional and can be removed, thus running flow +without ignoring errors. +""", + description=""" +Forward model for OPM Flow +""", + ) + + +class MAKE_DIRECTORY(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="MAKE_DIRECTORY", + command=[ + os.path.abspath("../share/ert/shell_scripts/make_directory.py"), + "", + ], + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="utility.file_system", + description=""" +Will create the directory :code:``, with all sub +directories. +""", + examples=""" + .. code-block:: bash + + FORWARD_MODEL MAKE_DIRECTORY(=path/to/new_directory) +""", + ) + + +class MAKE_SYMLINK(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="MAKE_SYMLINK", + command=[ + os.path.abspath("../share/ert/shell_scripts/symlink.py"), + "", + "", + ], + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="utility.file_system", + description=""" +Will create a symbolic link with name :code:`` which points to +:code:``. If :code:`` already exists, it will be updated. +""", + examples=""" + .. code-block:: bash + + FORWARD_MODEL MAKE_SYMLINK(=path/to/target,=linkname) +""", + ) + + +class MOVE_FILE(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="MOVE_FILE", + command=[ + os.path.abspath("../share/ert/shell_scripts/move_file.py"), + "", + "", + ], + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="utility.file_system", + description=""" +The :code:`MOVE_FILE` job will move file to target directory. +If file already exists, this job will move file to the target directory +and then replace the existing file. +""", + examples=""" + .. code-block:: bash + + FORWARD_MODEL MOVE_FILE(=file/to/move,=to/new/path) +""", + ) + + +class RMS(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="RMS", + command=[ + os.path.abspath("../share/ert/forward-models/res/script/rms.py"), + "", + "", + "", + "-r", + "", + "-t", + "", + "-i", + "", + "-v", + "", + "-e", + "", + "", + ], + target_file="", + default_mapping={ + "": "./", + "": "./", + "": "rms/model", + "": "", + }, + exec_env={ + "PYTHONPATH": "", + "PATH_PREFIX": "", + }, + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="modelling.reservoir", + description=""" +Forward model for running a given workflow in an existing RMS-project. + +The forward model requires explicit knowledge of the version used to +produce the RMS project loaded. The Python environment is adapted to +work with Python inside RMS. +""", + examples=""" +Running the forward model +######################### + +RMS is usually incorporated in ERT configurations using statements like + +.. code-block:: bash + + DEFINE reek.rms11.0.1 + DEFINE 11.0.1 + DEFINE MAIN_WORKFLOW + FORWARD_MODEL RMS(=, =, =/../../rms/model/) + + +RMS script documentation +######################## + +The script must be invoked with minimum three positional arguments: + +Positional arguments: + IENS + Realization number + RMS_PROJECT + The RMS project we are running + RMS_WORKFLOW + The rms workflow we intend to run + +Optional arguments: + -r, --run-path RUN_PATH + The directory which will be used as cwd when running + rms + -t, --target-file TARGET_FILE + name of file which should be created/updated by rms + -i, --import-path IMPORT_PATH + the prefix of all relative paths when rms is importing + -e, --export-path EXPORT_PATH + the prefix of all relative paths when rms is exporting + -v, --version VERSION + The version of rms to use + -a, --allow-no-env + Boolean flag to allow RMS to run without a site configured + environment. WARNING: This is typically a sign of using an + unsupported version of RMS and the configuration of the + environment is now entirely on the shoulders of the user. + Consider contacting your system administrators. +""", + ) + + +class SYMLINK(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="SYMLINK", + command=[ + os.path.abspath("../share/ert/shell_scripts/symlink.py"), + "", + "", + ], + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="utility.file_system", + description=""" +Will create a symbolic link with name :code:`` which points to +:code:``. If :code:`` already exists, it will be updated. +""", + examples=""" + .. code-block:: bash + +FORWARD_MODEL SYMLINK(=path/to/target,=linkname) +""", + ) + + +class TEMPLATE_RENDER(ForwardModelStepPlugin): + def __init__(self) -> None: + super().__init__( + name="TEMPLATE_RENDER", + command=[ + os.path.abspath( + "../share/ert/forward-models/templating/script/template_render.py" + ), + "-i", + "", + "-o", + "", + "-t", + "", + ], + default_mapping={ + "": "default", + "": 1, + "": "", + }, + ) + + @staticmethod + def documentation() -> Optional[ForwardModelStepDocumentation]: + return ForwardModelStepDocumentation( + category="utility.file_system", + description=""" +Loads the data from each file (:code:`some/path/filename.xxx`) in :code:`INPUT_FILES` +and exposes it as the variable :code:`filename`. It then loads the Jinja2 +template :code:`TEMPLATE_FILE` and dumps the rendered result to :code:`OUTPUT`. +""", + examples=""" +Given an input file :code:`my_input.json`: + +.. code-block:: json + + { + "my_variable": "my_value" + } + +And a template file :code:`tmpl.jinja`: + +.. code-block:: bash + + This is written in my file together with {{my_input.my_variable}} + +This job will produce an output file: + +.. code-block:: bash + + This is written in my file together with my_value + +By invoking the :code:`FORWARD_MODEL` as such: + +.. code-block:: bash + + FORWARD_MODEL TEMPLATE_RENDER(=my_input.json, =tmpl.jinja, =output_file) +""", + ) + + +@hook_implementation +@plugin_response(plugin_name="ert") +def installable_forward_model_steps() -> List[Type[ForwardModelStepPlugin]]: + return [ + CAREFUL_COPY_FILE, + COPY_DIRECTORY, + COPY_FILE, + DELETE_DIRECTORY, + DELETE_FILE, + ECLIPSE100, + ECLIPSE300, + FLOW, + MAKE_DIRECTORY, + MAKE_SYMLINK, + MOVE_FILE, + RMS, + SYMLINK, + TEMPLATE_RENDER, + ] diff --git a/src/ert/shared/share/ert/forward-models/docs/description/CAREFUL_COPY_FILE.rst b/src/ert/shared/share/ert/forward-models/docs/description/CAREFUL_COPY_FILE.rst deleted file mode 100644 index 0fda1af3c4b..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/description/CAREFUL_COPY_FILE.rst +++ /dev/null @@ -1,7 +0,0 @@ - -The :code:`CAREFUL_COPY_FILE` job will copy a file. If the :code:`` -argument has a directory component, that directory will be created. -This is an extension of the normal :code:`cp` command -which will *not* create directories in this way. -This job superseded an older version called :code:`CAREFULL_COPY` -and should be used instead. diff --git a/src/ert/shared/share/ert/forward-models/docs/description/COPY_DIRECTORY.rst b/src/ert/shared/share/ert/forward-models/docs/description/COPY_DIRECTORY.rst deleted file mode 100644 index c495f44b091..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/description/COPY_DIRECTORY.rst +++ /dev/null @@ -1,5 +0,0 @@ -The job copies the directory :code:`` to the target :code:``. If -:code:`` points to a non-existing directory structure, it will be -created first. If the :code:`` folder already exist it creates a new directory within the existing one. -E.g. :code:`COPY_DIRECTORY (=foo, =bar)` creates :code:`bar/foo` if the directory -:code:`bar` already exists. If :code:`bar` does not exist it becomes a copy of :code:`foo`. diff --git a/src/ert/shared/share/ert/forward-models/docs/description/COPY_FILE.rst b/src/ert/shared/share/ert/forward-models/docs/description/COPY_FILE.rst deleted file mode 100644 index 0864a0daf2c..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/description/COPY_FILE.rst +++ /dev/null @@ -1,5 +0,0 @@ - -The :code:`COPY_FILE` job will copy a file. If the :code:`` -argument has a directory component, that directory will be created. -This is an extension of the normal :code:`cp` command -which will *not* create directories in this way. diff --git a/src/ert/shared/share/ert/forward-models/docs/description/DELETE_DIRECTORY.rst b/src/ert/shared/share/ert/forward-models/docs/description/DELETE_DIRECTORY.rst deleted file mode 100644 index ef4f2cd0660..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/description/DELETE_DIRECTORY.rst +++ /dev/null @@ -1,12 +0,0 @@ -The :code:`DELETE_DIRECTORY` job will recursively remove a directory -and all the files in the directory. Like the :code:`DELETE_FILE` job -it will *only* delete files and directories which are owned by the -current user. If one delete operation fails the job will continue, but -unless all delete calls succeed (parts of) the directory structure -will remain. - -.. warning:: - If the directory to delete is a symlink to a directory, it will only delete - the link and not the directory. However, if you add a trailing slash to the - directory name (the symlink), then the link itself is kept, but the directory - it links to will be removed. diff --git a/src/ert/shared/share/ert/forward-models/docs/description/DELETE_FILE.rst b/src/ert/shared/share/ert/forward-models/docs/description/DELETE_FILE.rst deleted file mode 100644 index 5571befde5f..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/description/DELETE_FILE.rst +++ /dev/null @@ -1,5 +0,0 @@ -The :code:`DELETE_FILE` job will *only* remove files which are owned -by the current user, *even if* file system permissions would have -allowed the delete operation to proceed. The :code:`DELETE_FILE` will -*not* delete a directory, and if presented with a symbolic link it -will *only* delete the link, and not the target. diff --git a/src/ert/shared/share/ert/forward-models/docs/description/MAKE_DIRECTORY.rst b/src/ert/shared/share/ert/forward-models/docs/description/MAKE_DIRECTORY.rst deleted file mode 100644 index cda996ef999..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/description/MAKE_DIRECTORY.rst +++ /dev/null @@ -1,2 +0,0 @@ -Will create the directory :code:``, with all sub -directories. diff --git a/src/ert/shared/share/ert/forward-models/docs/description/MAKE_SYMLINK.rst b/src/ert/shared/share/ert/forward-models/docs/description/MAKE_SYMLINK.rst deleted file mode 100644 index d6c06ec7997..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/description/MAKE_SYMLINK.rst +++ /dev/null @@ -1,2 +0,0 @@ -Will create a symbolic link with name :code:`` which points to -:code:``. If :code:`` already exists, it will be updated. diff --git a/src/ert/shared/share/ert/forward-models/docs/description/MOVE_FILE.rst b/src/ert/shared/share/ert/forward-models/docs/description/MOVE_FILE.rst deleted file mode 100644 index 29d58d23324..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/description/MOVE_FILE.rst +++ /dev/null @@ -1,3 +0,0 @@ -The :code:`MOVE_FILE` job will move file to target directory. -If file already exists, this job will move file to the target directory -and then replace the existing file. diff --git a/src/ert/shared/share/ert/forward-models/docs/description/SYMLINK.rst b/src/ert/shared/share/ert/forward-models/docs/description/SYMLINK.rst deleted file mode 100644 index d6c06ec7997..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/description/SYMLINK.rst +++ /dev/null @@ -1,2 +0,0 @@ -Will create a symbolic link with name :code:`` which points to -:code:``. If :code:`` already exists, it will be updated. diff --git a/src/ert/shared/share/ert/forward-models/docs/description/TEMPLATE_RENDER.rst b/src/ert/shared/share/ert/forward-models/docs/description/TEMPLATE_RENDER.rst deleted file mode 100644 index 628ee76c7d1..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/description/TEMPLATE_RENDER.rst +++ /dev/null @@ -1,3 +0,0 @@ -Loads the data from each file (:code:`some/path/filename.xxx`) in :code:`INPUT_FILES` -and exposes it as the variable :code:`filename`. It then loads the Jinja2 -template :code:`TEMPLATE_FILE` and dumps the rendered result to :code:`OUTPUT`. diff --git a/src/ert/shared/share/ert/forward-models/docs/examples/CAREFUL_COPY_FILE.rst b/src/ert/shared/share/ert/forward-models/docs/examples/CAREFUL_COPY_FILE.rst deleted file mode 100644 index aa9cbe9b68b..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/examples/CAREFUL_COPY_FILE.rst +++ /dev/null @@ -1,3 +0,0 @@ -.. code-block:: bash - - FORWARD_MODEL CAREFUL_COPY_FILE(=file1, =path/to/directory/file1) diff --git a/src/ert/shared/share/ert/forward-models/docs/examples/COPY_FILE.rst b/src/ert/shared/share/ert/forward-models/docs/examples/COPY_FILE.rst deleted file mode 100644 index 7ae76c3fab9..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/examples/COPY_FILE.rst +++ /dev/null @@ -1,3 +0,0 @@ -.. code-block:: bash - - FORWARD_MODEL COPY_FILE(=file1, =path/to/directory/file1) diff --git a/src/ert/shared/share/ert/forward-models/docs/examples/ECLIPSE100.rst b/src/ert/shared/share/ert/forward-models/docs/examples/ECLIPSE100.rst deleted file mode 100644 index bb57e38eaa4..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/examples/ECLIPSE100.rst +++ /dev/null @@ -1,13 +0,0 @@ -The version, number of cpu, and whether or not to ignore errors and whether or not to produce `YOUR_CASE_NAME.h5` output files can -be configured in the configuration file when adding the job, as such: - -.. code-block:: bash - - FORWARD_MODEL ECLIPSE100(, =xxxx, ={"--ignore-errors", "--summary-conversion"}) - -The :code:`OPTS` argument is optional and can be removed, fully or partially. -In absence of :code:`--ignore-errors` eclipse will fail on errors. -Adding the flag :code:`--ignore-errors` will result in eclipse ignoring errors. - -And in absence of :code:`--summary-conversions` eclipse will run without producing `YOUR_CASE_NAME.h5` output files. -Add flag :code:`--summary-conversions` to produce `YOUR_CASE_NAME.h5` output files. diff --git a/src/ert/shared/share/ert/forward-models/docs/examples/ECLIPSE300.rst b/src/ert/shared/share/ert/forward-models/docs/examples/ECLIPSE300.rst deleted file mode 100644 index 3cd58dab724..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/examples/ECLIPSE300.rst +++ /dev/null @@ -1,9 +0,0 @@ -The version, number of cpu and whether or not to ignore errors can -be configured in the configuration file when adding the job, as such: - -.. code-block:: bash - - FORWARD_MODEL ECLIPSE300(, =xxxx, ="--ignore-errors") - -The :code:`OPTS` argument is optional and can be removed, thus running eclipse -without ignoring errors diff --git a/src/ert/shared/share/ert/forward-models/docs/examples/FLOW.rst b/src/ert/shared/share/ert/forward-models/docs/examples/FLOW.rst deleted file mode 100644 index 77fd960686f..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/examples/FLOW.rst +++ /dev/null @@ -1,9 +0,0 @@ -The version, number of cpu and whether or not to ignore errors can -be configured in the configuration file when adding the job, as such: - -.. code-block:: bash - - FORWARD_MODEL FLOW(, =xxxx, ="--ignore-errors") - -The :code:`OPTS` argument is optional and can be removed, thus running flow -without ignoring errors. diff --git a/src/ert/shared/share/ert/forward-models/docs/examples/TEMPLATE_RENDER.rst b/src/ert/shared/share/ert/forward-models/docs/examples/TEMPLATE_RENDER.rst deleted file mode 100644 index b9b797d4d3a..00000000000 --- a/src/ert/shared/share/ert/forward-models/docs/examples/TEMPLATE_RENDER.rst +++ /dev/null @@ -1,25 +0,0 @@ -Given an input file :code:`my_input.json`: - -.. code-block:: json - - { - "my_variable": "my_value" - } - -And a template file :code:`tmpl.jinja`: - -.. code-block:: bash - - This is written in my file together with {{my_input.my_variable}} - -This job will produce an output file: - -.. code-block:: bash - - This is written in my file together with my_value - -By invoking the :code:`FORWARD_MODEL` as such: - -.. code-block:: bash - - FORWARD_MODEL TEMPLATE_RENDER(=my_input.json, =tmpl.jinja, =output_file)