From a8ce475df10ca99510bbeb3c62c07390788f529e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Berland?= Date: Fri, 20 Dec 2024 07:28:28 +0100 Subject: [PATCH] WIP: Add everest integration test with flow --- .github/workflows/test_ert_with_flow.yml | 15 ++++++++++++--- .../everest/egg/everest/model/config_flow.yml | 7 +------ test-data/everest/egg/everest/model/jobs/flow | 6 ------ .../everest/egg/everest/model/jobs/flow.py | 18 ------------------ 4 files changed, 13 insertions(+), 33 deletions(-) delete mode 100644 test-data/everest/egg/everest/model/jobs/flow delete mode 100755 test-data/everest/egg/everest/model/jobs/flow.py diff --git a/.github/workflows/test_ert_with_flow.yml b/.github/workflows/test_ert_with_flow.yml index 892424ae1cb..76679d4cff8 100644 --- a/.github/workflows/test_ert_with_flow.yml +++ b/.github/workflows/test_ert_with_flow.yml @@ -26,9 +26,10 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v4 - - name: Install ert + - name: Install ert and everest run: - uv pip install ".[dev]" + uv pip install ".[everest,dev]" + uv pip install git+https://github.com/equinor/everest-models - name: Install flow run: | @@ -47,6 +48,14 @@ jobs: set -e pytest tests/ert/unit_tests/resources/test_run_flow_simulator.py - cd test-data/ert/flow_example + push test-data/ert/flow_example perl -p -i -e 's/NUM_REALIZATIONS\s*12/NUM_REALIZATIONS 2/g' flow.ert ert ensemble_experiment flow.ert --disable-monitor + popd + + - name: Run everest integration test with OPM flow + run: | + set -e + pushd test-data/everest/egg/everest/model + everest run config_flow.yml + popd diff --git a/test-data/everest/egg/everest/model/config_flow.yml b/test-data/everest/egg/everest/model/config_flow.yml index 84df09e0cd8..c33d611d954 100644 --- a/test-data/everest/egg/everest/model/config_flow.yml +++ b/test-data/everest/egg/everest/model/config_flow.yml @@ -97,11 +97,6 @@ simulator: queue_system: local cores: 3 -install_jobs: - - - name: myflow - source: r{{ configpath }}/jobs/flow - install_data: - source: r{{ configpath }}/../../eclipse/include/realizations/realization-r{{ realization }}/eclipse @@ -116,5 +111,5 @@ forward_model: - well_constraints -i files/well_readydate.json -c files/wc_config.yml -rc well_rate.json -o wc_wells.json - add_templates -i wc_wells.json -c files/at_config.yml -o at_wells.json - schmerge -s eclipse/include/schedule/schedule.tmpl -i at_wells.json -o eclipse/include/schedule/schedule.sch - - myflow r{{ eclbase }} --enable-tuning + - flow r{{ eclbase }} --enable-tuning - rf -s r{{ eclbase }} -o rf diff --git a/test-data/everest/egg/everest/model/jobs/flow b/test-data/everest/egg/everest/model/jobs/flow deleted file mode 100644 index ae96ce70280..00000000000 --- a/test-data/everest/egg/everest/model/jobs/flow +++ /dev/null @@ -1,6 +0,0 @@ -EXECUTABLE ./flow.py -STDOUT flow.stdout -STDERR flow.stderr - -TARGET_FILE flow.ok -ARGLIST diff --git a/test-data/everest/egg/everest/model/jobs/flow.py b/test-data/everest/egg/everest/model/jobs/flow.py deleted file mode 100755 index 28a47a07a1d..00000000000 --- a/test-data/everest/egg/everest/model/jobs/flow.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python -import argparse -import os -import subprocess - -arg_parser = argparse.ArgumentParser(description="Run a flow job") -arg_parser.add_argument("input", help="Input directory") -arg_parser.add_argument("--flow-path", help="Path to the flow binary", default="flow") -arg_parser.add_argument("--enable-tuning", help="Enable tuning", action="store_true") -options = arg_parser.parse_args() - -call_args = [options.flow_path, options.input] -if options.enable_tuning: - call_args.append("--enable-tuning=1") -flow_process = subprocess.call(call_args, cwd=os.getcwd()) - -with open("flow.ok", "w", encoding="utf-8"): - pass