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

Rename forward-models to forward_models #8908

Merged
merged 1 commit into from
Oct 9, 2024
Merged
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
4 changes: 2 additions & 2 deletions docs/ert/reference/configuration/site_wide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ properties of the cluster. This could be an example site config file: ::
WORKFLOW_JOB_DIRECTORY workflows/jobs/internal-gui/config

JOB_SCRIPT ../../bin/job_dispatch.py
INSTALL_JOB_DIRECTORY forward-models/res
INSTALL_JOB_DIRECTORY forward-models/shell
INSTALL_JOB_DIRECTORY forward_models/res
INSTALL_JOB_DIRECTORY forward_models/shell
8 changes: 4 additions & 4 deletions src/ert/plugins/hook_implementations/forward_model_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def __init__(self) -> None:
str(
(
Path(__file__)
/ "../../../resources/forward-models/res/script/ecl100.py"
/ "../../../resources/forward_models/res/script/ecl100.py"
).resolve()
),
"<ECLBASE>",
Expand Down Expand Up @@ -265,7 +265,7 @@ def __init__(self) -> None:
str(
(
Path(__file__)
/ "../../../resources/forward-models/res/script/ecl300.py"
/ "../../../resources/forward_models/res/script/ecl300.py"
).resolve()
),
"<ECLBASE>",
Expand Down Expand Up @@ -317,7 +317,7 @@ def __init__(self) -> None:
str(
(
Path(__file__)
/ "../../../resources/forward-models/res/script/flow.py"
/ "../../../resources/forward_models/res/script/flow.py"
).resolve()
),
"<ECLBASE>",
Expand Down Expand Up @@ -521,7 +521,7 @@ def __init__(self) -> None:
str(
(
Path(__file__)
/ "../../../resources/forward-models/templating/script/template_render.py"
/ "../../../resources/forward_models/templating/script/template_render.py"
).resolve()
),
"-i",
Expand Down
6 changes: 3 additions & 3 deletions tests/ert/unit_tests/resources/test_ecl_run_new_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from ._import_from_location import import_from_location

# import ecl_config.py and ecl_run from ert/resources/forward-models/res/script
# import ecl_config.py and ecl_run from ert/resources/forward_models/res/script
# package-data path which. These are kept out of the ert package to avoid the
# overhead of importing ert. This is necessary as these may be invoked as a
# subprocess on each realization.
Expand All @@ -25,13 +25,13 @@
ecl_config = import_from_location(
"ecl_config",
os.path.join(
SOURCE_DIR, "src/ert/resources/forward-models/res/script/ecl_config.py"
SOURCE_DIR, "src/ert/resources/forward_models/res/script/ecl_config.py"
),
)

ecl_run = import_from_location(
"ecl_run",
os.path.join(SOURCE_DIR, "src/ert/resources/forward-models/res/script/ecl_run.py"),
os.path.join(SOURCE_DIR, "src/ert/resources/forward_models/res/script/ecl_run.py"),
)


Expand Down
6 changes: 3 additions & 3 deletions tests/ert/unit_tests/resources/test_ecl_versioning_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from ._import_from_location import import_from_location

# import ecl_config and ecl_run.py from ert/forward-models/res/script
# import ecl_config and ecl_run.py from ert/forward_models/res/script
# package-data path which. These are kept out of the ert package to avoid the
# overhead of importing ert. This is necessary as these may be invoked as a
# subprocess on each realization.
Expand All @@ -18,13 +18,13 @@
ecl_config = import_from_location(
"ecl_config",
os.path.join(
SOURCE_DIR, "src/ert/resources/forward-models/res/script/ecl_config.py"
SOURCE_DIR, "src/ert/resources/forward_models/res/script/ecl_config.py"
),
)

ecl_run = import_from_location(
"ecl_run",
os.path.join(SOURCE_DIR, "src/ert/resources/forward-models/res/script/ecl_run.py"),
os.path.join(SOURCE_DIR, "src/ert/resources/forward_models/res/script/ecl_run.py"),
)


Expand Down
4 changes: 2 additions & 2 deletions tests/ert/unit_tests/resources/test_forward_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ def file_exist_and_is_executable(file_path):

def test_validate_scripts():
fm_path = (
Path(importlib.util.find_spec("ert").origin).parent / "resources/forward-models"
Path(importlib.util.find_spec("ert").origin).parent / "resources/forward_models"
)
for fm_dir in os.listdir(fm_path):
fm_dir = os.path.join(fm_path, fm_dir)
# get all sub-folder in forward-models
# get all sub-folder in forward_models
if os.path.isdir(fm_dir):
files = os.listdir(fm_dir)
for fn in files:
Expand Down
4 changes: 2 additions & 2 deletions tests/ert/unit_tests/resources/test_opm_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

ecl_config = import_from_location(
"ecl_config",
SOURCE_DIR / "src/ert/resources/forward-models/res/script/ecl_config.py",
SOURCE_DIR / "src/ert/resources/forward_models/res/script/ecl_config.py",
)

ecl_run = import_from_location(
"ecl_run",
SOURCE_DIR / "src/ert/resources/forward-models/res/script/ecl_run.py",
SOURCE_DIR / "src/ert/resources/forward_models/res/script/ecl_run.py",
)


Expand Down
6 changes: 3 additions & 3 deletions tests/ert/unit_tests/resources/test_templating.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from ._import_from_location import import_from_location

# import template_render.py from ert/forward-models/templating/script
# import template_render.py from ert/forward_models/templating/script
# package-data path which. These are kept out of the ert package to avoid the
# overhead of importing ert. This is necessary as these may be invoked as a
# subprocess on each realization.
Expand All @@ -21,7 +21,7 @@
"template_render",
os.path.join(
SOURCE_DIR,
"src/ert/resources/forward-models/templating/script/template_render.py",
"src/ert/resources/forward_models/templating/script/template_render.py",
),
)

Expand Down Expand Up @@ -221,7 +221,7 @@ def test_template_executable():
)
template_render_exec = str(
Path(importlib.util.find_spec("ert").origin).parent
/ "resources/forward-models/templating/script/template_render.py"
/ "resources/forward_models/templating/script/template_render.py"
)

subprocess.call(template_render_exec + params, shell=True, stdout=subprocess.PIPE)
Expand Down