Skip to content

Commit

Permalink
Rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Nov 5, 2024
1 parent 4eff9db commit 96d830f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/everest/bin/everest_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from everest.detached import (
ServerStatus,
everserver_status,
generate_everserver_ert_config,
generate_everserver_config,
server_is_running,
start_server,
wait_for_server,
Expand Down Expand Up @@ -98,7 +98,7 @@ async def run_everest(options):
logger.info("Everest forward model contains job {}".format(job_name))

makedirs_if_needed(options.config.output_dir, roll_if_exists=True)
server_config = generate_everserver_ert_config(options.config)
server_config = generate_everserver_config(options.config)
await start_server(options.config, server_config)
print("Waiting for server ...")
wait_for_server(options.config, timeout=600)
Expand Down
2 changes: 1 addition & 1 deletion src/everest/detached/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def _find_res_queue_system(config: EverestConfig):
return QueueSystem(queue_system.upper())


def generate_everserver_ert_config(config: EverestConfig, debug_mode: bool = False):
def generate_everserver_config(config: EverestConfig, debug_mode: bool = False):
queue_system = _find_res_queue_system(config)

queue_options = {}
Expand Down
14 changes: 7 additions & 7 deletions tests/everest/test_detached.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
_find_res_queue_system,
_generate_queue_options,
everserver_status,
generate_everserver_ert_config,
generate_everserver_config,
server_is_running,
start_server,
stop_server,
Expand Down Expand Up @@ -265,7 +265,7 @@ def _get_reference_config():

def test_detached_mode_config_base(copy_math_func_test_data_to_tmp):
everest_config, reference = _get_reference_config()
ert_config = generate_everserver_ert_config(everest_config)
ert_config = generate_everserver_config(everest_config)

assert ert_config is not None
assert ert_config == reference
Expand All @@ -290,7 +290,7 @@ def test_everserver_queue_config_equal_to_run_config(
if name is not None:
simulator_config.update({"name": name})
everest_config.simulator = SimulatorConfig(**simulator_config)
server_ert_config = generate_everserver_ert_config(everest_config)
server_ert_config = generate_everserver_config(everest_config)
ert_config = _everest_to_ert_config_dict(everest_config)

server_queue_option = server_ert_config["QUEUE_OPTION"]
Expand All @@ -313,7 +313,7 @@ def test_everserver_queue_config_equal_to_run_config(

def test_detached_mode_config_debug(copy_math_func_test_data_to_tmp):
everest_config, reference = _get_reference_config()
ert_config = generate_everserver_ert_config(everest_config, debug_mode=True)
ert_config = generate_everserver_config(everest_config, debug_mode=True)

reference["SIMULATION_JOB"][0].append("--debug")

Expand All @@ -329,7 +329,7 @@ def test_detached_mode_config_only_sim(copy_math_func_test_data_to_tmp, queue_sy
queue_options = [(queue_system.upper(), "MAX_RUNNING", 1)]
reference.setdefault("QUEUE_OPTION", []).extend(queue_options)
everest_config.simulator = SimulatorConfig(**{CK.QUEUE_SYSTEM: queue_system})
ert_config = generate_everserver_ert_config(everest_config)
ert_config = generate_everserver_config(everest_config)
assert ert_config is not None
assert ert_config == reference

Expand All @@ -343,7 +343,7 @@ def test_detached_mode_config_error(copy_math_func_test_data_to_tmp):

everest_config.server = ServerConfig(name="server", queue_system="lsf")
with pytest.raises(ValueError):
generate_everserver_ert_config(everest_config)
generate_everserver_config(everest_config)


def test_detached_mode_config_queue_name(copy_math_func_test_data_to_tmp):
Expand All @@ -357,7 +357,7 @@ def test_detached_mode_config_queue_name(copy_math_func_test_data_to_tmp):
everest_config.simulator = SimulatorConfig(queue_system="lsf")
everest_config.server = ServerConfig(queue_system="lsf", name=queue_name)

ert_config = generate_everserver_ert_config(everest_config)
ert_config = generate_everserver_config(everest_config)
assert ert_config is not None
assert ert_config == reference

Expand Down
4 changes: 2 additions & 2 deletions tests/everest/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from everest.config import EverestConfig
from everest.detached import (
context_stop_and_wait,
generate_everserver_ert_config,
generate_everserver_config,
start_server,
wait_for_context,
wait_for_server,
Expand All @@ -32,7 +32,7 @@ def test_logging_setup(copy_math_func_test_data_to_tmp):

wait_for_context()
ert_config = ErtConfig.with_plugins().from_dict(
generate_everserver_ert_config(everest_config, True)
generate_everserver_config(everest_config, True)
)
makedirs_if_needed(everest_config.output_dir, roll_if_exists=True)
with open_storage(ert_config.ens_path, "w") as storage:
Expand Down

0 comments on commit 96d830f

Please sign in to comment.