Skip to content

Commit

Permalink
Remove unused constants in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Oct 17, 2024
1 parent 96b8fe1 commit da9495d
Showing 1 changed file with 0 additions and 91 deletions.
91 changes: 0 additions & 91 deletions tests/ert/unit_tests/config/test_ert_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,97 +28,6 @@

from .config_dict_generator import config_generators

config_defines = {
"<USER>": "TEST_USER",
"<SCRATCH>": "ert/model/scratch/ert",
"<CASE_DIR>": "the_extensive_case",
"<ECLIPSE_NAME>": "XYZ",
}

snake_oil_structure_config = {
"RUNPATH": "<SCRATCH>/<USER>/<CASE_DIR>/realization-<IENS>/iter-<ITER>",
"NUM_REALIZATIONS": 10,
"MAX_RUNTIME": 23400,
"MIN_REALIZATIONS": "50%",
"MAX_SUBMIT": 13,
"QUEUE_SYSTEM": "LSF",
"LSF_QUEUE": "mr",
"LSF_RESOURCE": "select[x86_64Linux] same[type:model]",
"MAX_RUNNING": "100",
"DATA_FILE": "eclipse/model/SNAKE_OIL.DATA",
"START": date(2017, 1, 1),
"SUMMARY": [
"WOPR:PROD",
"WOPT:PROD",
"WWPR:PROD",
"WWCT:PROD",
"WWPT:PROD",
"WBHP:PROD",
"WWIR:INJ",
"WWIT:INJ",
"WBHP:INJ",
"ROE:1",
],
"GEN_KW": ["SIGMA"],
"GEN_DATA": ["super_data"],
"ECLBASE": "eclipse/model/<ECLIPSE_NAME>-<IENS>",
"ENSPATH": "ert/output/storage/<CASE_DIR>",
"UPDATE_LOG_PATH": "../output/update_log/<CASE_DIR>",
"RUNPATH_FILE": "ert/output/run_path_file/.ert-runpath-list_<CASE_DIR>",
"REFCASE": "ert/input/refcase/SNAKE_OIL_FIELD",
"SIGMA": {
"TEMPLATE": "ert/input/templates/sigma.tmpl",
"RESULT": "coarse.sigma",
"PARAMETER": "ert/input/distributions/sigma.dist",
},
"JOBNAME": "SNAKE_OIL_STRUCTURE_<IENS>",
"INSTALL_JOB": {
"SNAKE_OIL_SIMULATOR": {
"CONFIG": "snake_oil/jobs/SNAKE_OIL_SIMULATOR",
"STDOUT": "snake_oil.stdout",
"STDERR": "snake_oil.stderr",
"EXECUTABLE": "snake_oil_simulator.py",
},
"SNAKE_OIL_NPV": {
"CONFIG": "snake_oil/jobs/SNAKE_OIL_NPV",
"STDOUT": "snake_oil_npv.stdout",
"STDERR": "snake_oil_npv.stderr",
"EXECUTABLE": "snake_oil_npv.py",
},
"SNAKE_OIL_DIFF": {
"CONFIG": "snake_oil/jobs/SNAKE_OIL_DIFF",
"STDOUT": "snake_oil_diff.stdout",
"STDERR": "snake_oil_diff.stderr",
"EXECUTABLE": "snake_oil_diff.py",
},
},
"FORWARD_MODEL": ["SNAKE_OIL_SIMULATOR", "SNAKE_OIL_NPV", "SNAKE_OIL_DIFF"],
"HISTORY_SOURCE": "REFCASE_HISTORY",
"OBS_CONFIG": "ert/input/observations/obsfiles/observations.txt",
"LOAD_WORKFLOW": [["ert/bin/workflows/MAGIC_PRINT", "MAGIC_PRINT"]],
"LOAD_WORKFLOW_JOB": [
["ert/bin/workflows/workflowjobs/bin/uber_print.py", "UBER_PRINT"],
],
"GRID": "eclipse/include/grid/CASE.EGRID",
"RUN_TEMPLATE": {
"seed_template": {
"TEMPLATE_FILE": "ert/input/templates/seed_template.txt",
"TARGET_FILE": "seed.txt",
}
},
}


def expand_config_defs(defines, config):
for define_key, define_value in defines.items():
for data_key, data_value in config.items():
if isinstance(data_value, str):
config[data_key] = data_value.replace(define_key, define_value)


# Expand all strings in snake oil structure config according to defines.
expand_config_defs(config_defines, snake_oil_structure_config)


def test_include_existing_file(tmpdir):
with tmpdir.as_cwd():
Expand Down

0 comments on commit da9495d

Please sign in to comment.