From 13760e068de9e9b247dff081b83186c51c81c4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Eide?= Date: Tue, 4 Feb 2025 15:24:44 +0100 Subject: [PATCH] Review comments --- src/ert/config/queue_config.py | 4 +--- src/everest/config/everest_config.py | 4 ++-- src/everest/config/simulator_config.py | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ert/config/queue_config.py b/src/ert/config/queue_config.py index d8e04734968..2a8fc28434e 100644 --- a/src/ert/config/queue_config.py +++ b/src/ert/config/queue_config.py @@ -61,7 +61,7 @@ def inject_site_config_script(cls, v: str, info: ValidationInfo) -> str: # Use from plugin system if user has not specified plugin_script = None if info.context: - plugin_script = info.context.get(info.field_name) + plugin_script = info.context.get("activate_script") return plugin_script or activate_script() # Return default value @staticmethod @@ -154,8 +154,6 @@ def driver_options(self) -> dict[str, Any]: "name", "max_running", "submit_sleep", - "qstat_options", - "queue_query_timeout", } ) driver_dict["queue_name"] = driver_dict.pop("queue") diff --git a/src/everest/config/everest_config.py b/src/everest/config/everest_config.py index 359517daf8b..bf5264c98d9 100644 --- a/src/everest/config/everest_config.py +++ b/src/everest/config/everest_config.py @@ -728,7 +728,7 @@ def lint_config_dict_with_raise(config: dict): EverestConfig.model_validate(config) @classmethod - def load_file(cls, config_file: str): + def load_file(cls, config_file: str) -> Self: config_path = os.path.realpath(config_file) if not os.path.isfile(config_path): @@ -768,7 +768,7 @@ def with_plugins(cls, config_dict): if site_config: context["queue_system"] = QueueConfig.from_dict(site_config).queue_options if activate_script: - context["activate_script"] = ErtPluginManager().activate_script() + context["activate_script"] = activate_script with init_context(context): return cls(**config_dict) diff --git a/src/everest/config/simulator_config.py b/src/everest/config/simulator_config.py index 4a04c77dec8..017e12c4537 100644 --- a/src/everest/config/simulator_config.py +++ b/src/everest/config/simulator_config.py @@ -94,7 +94,7 @@ def default_local_queue(cls, v, info: ValidationInfo): if v is None: options = None if info.context: - options = info.context.get(info.field_name) + options = info.context.get("queue_system") return options or LocalQueueOptions(max_running=8) return v