Skip to content

Commit

Permalink
Revert
Browse files Browse the repository at this point in the history
  • Loading branch information
frode-aarstad committed Oct 29, 2024
1 parent bddb073 commit 5e369a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ert/cli/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def execute_workflow(
msg = "Workflow {} is not in the list of available workflows"
logger.error(msg.format(workflow_name))
return
runner = WorkflowRunner(workflow, storage)
runner = WorkflowRunner(workflow=workflow, storage=storage, ert_config=ert_config)
runner.run_blocking()
if not all(v["completed"] for v in runner.workflowReport().values()):
logger.error(f"Workflow {workflow_name} failed!")
7 changes: 6 additions & 1 deletion src/ert/workflow_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from typing_extensions import Self

from ert.config import ErtScript, ExternalErtScript, Workflow, WorkflowJob
from ert.config.ert_config import ErtConfig

if TYPE_CHECKING:
from ert.storage import Ensemble, Storage
Expand Down Expand Up @@ -111,10 +112,12 @@ def __init__(
workflow: Workflow,
storage: Optional[Storage] = None,
ensemble: Optional[Ensemble] = None,
ert_config: Optional[ErtConfig] = None,
) -> None:
self.__workflow = workflow
self.storage = storage
self.ensemble = ensemble
self.ert_config = ert_config

self.__workflow_result: Optional[bool] = None
self._workflow_executor = futures.ThreadPoolExecutor(max_workers=1)
Expand Down Expand Up @@ -151,7 +154,9 @@ def run_blocking(self) -> None:
self.__status = {}
self.__running = True
fixtures = {
k: getattr(self, k) for k in ["storage", "ensemble"] if getattr(self, k)
k: getattr(self, k)
for k in ["storage", "ensemble", "ert_config"]
if getattr(self, k)
}

for job, args in self.__workflow:
Expand Down
1 change: 0 additions & 1 deletion tests/ert/unit_tests/config/test_gen_kw_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ def test_gen_kw_is_log_or_not(
templates=ert_config.ert_templates,
model_config=ert_config.model_config,
)

assert re.match(
parameters_regex,
Path("simulations/realization-0/iter-0/parameters.txt").read_text(
Expand Down

0 comments on commit 5e369a0

Please sign in to comment.