From a52f1c2097a255001ec08dbe0e72cc01b3829975 Mon Sep 17 00:00:00 2001 From: StephanDeHoop Date: Mon, 21 Oct 2024 16:45:52 +0200 Subject: [PATCH] Fix failing tests --- tests/everest/test_egg_simulation.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/tests/everest/test_egg_simulation.py b/tests/everest/test_egg_simulation.py index 9facfc69334..bc09ae02aeb 100644 --- a/tests/everest/test_egg_simulation.py +++ b/tests/everest/test_egg_simulation.py @@ -5,6 +5,7 @@ import everest from ert.config import ErtConfig, QueueSystem +from ert.config.parsing import ConfigKeys as ConfigKeysErt from everest.config import EverestConfig from everest.config.export_config import ExportConfig from everest.config_keys import ConfigKeys @@ -20,6 +21,7 @@ ) CONFIG_FILE = "everest/model/config.yml" +NUM_REALIZATIONS = 3 # tied to the specified config.yml defined in CONFIG_FILE SUM_KEYS_NO_OPM = [ "YEAR", "YEARSTCPU", @@ -466,20 +468,20 @@ def sort_res_summary(ert_config): def _generate_exp_ert_config(config_path, output_dir): return { - "DEFINE": [("", config_path)], - "INSTALL_JOB": everest_default_jobs(output_dir), - "QUEUE_OPTION": [(QueueSystem.LOCAL, "MAX_RUNNING", 3)], - "QUEUE_SYSTEM": QueueSystem.LOCAL, - "NUM_REALIZATIONS": 10000, - "RUNPATH": os.path.join( + ConfigKeysErt.DEFINE: [("", config_path)], + ConfigKeysErt.INSTALL_JOB: everest_default_jobs(output_dir), + ConfigKeysErt.QUEUE_OPTION: [(QueueSystem.LOCAL, "MAX_RUNNING", 3)], + ConfigKeysErt.QUEUE_SYSTEM: QueueSystem.LOCAL, + ConfigKeysErt.NUM_REALIZATIONS: NUM_REALIZATIONS, + ConfigKeysErt.RUNPATH: os.path.join( output_dir, "egg_simulations//geo_realization_/simulation_", ), - "RUNPATH_FILE": os.path.join( + ConfigKeysErt.RUNPATH_FILE: os.path.join( os.path.realpath("everest/model"), "everest_output/.res_runpath_list", ), - "SIMULATION_JOB": [ + ConfigKeysErt.SIMULATION_JOB: [ ( "copy_directory", f"{config_path}/../../eclipse/include/" @@ -550,14 +552,14 @@ def _generate_exp_ert_config(config_path, output_dir): ), ("rf", "-s", "eclipse/model/EGG", "-o", "rf"), ], - "ENSPATH": os.path.join( + ConfigKeysErt.ENSPATH: os.path.join( os.path.realpath("everest/model"), "everest_output/simulation_results", ), - "ECLBASE": "eclipse/model/EGG", - "RANDOM_SEED": 123456, - "SUMMARY": SUM_KEYS, - "GEN_DATA": [("rf", "RESULT_FILE:rf")], + ConfigKeysErt.ECLBASE: "eclipse/model/EGG", + ConfigKeysErt.RANDOM_SEED: 123456, + ConfigKeysErt.SUMMARY: SUM_KEYS, + ConfigKeysErt.GEN_DATA: [("rf", "RESULT_FILE:rf")], }