Skip to content

Commit

Permalink
Move template_render.py up two levels
Browse files Browse the repository at this point in the history
The subdirectories serve no real purpose. There is not going
to be a lot of other forward models in here.
  • Loading branch information
berland committed Oct 18, 2024
1 parent e5a183d commit e2ba5be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def __init__(self) -> None:
str(
(
Path(__file__)
/ "../../../resources/forward_models/templating/script/template_render.py"
/ "../../../resources/forward_models/template_render.py"
).resolve()
),
"-i",
Expand Down
12 changes: 6 additions & 6 deletions tests/ert/unit_tests/resources/test_templating.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@

from ._import_from_location import import_from_location

# 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.
# import template_render.py from ert/forward_models 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.


template_render = import_from_location(
"template_render",
os.path.join(
SOURCE_DIR,
"src/ert/resources/forward_models/templating/script/template_render.py",
"src/ert/resources/forward_models/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/template_render.py"
)

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

0 comments on commit e2ba5be

Please sign in to comment.