Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Feb 4, 2025
1 parent 2586b12 commit fae468e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/ert/config/queue_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions src/everest/config/everest_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,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):
Expand Down Expand Up @@ -769,7 +769,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)

Expand Down
2 changes: 1 addition & 1 deletion src/everest/config/simulator_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fae468e

Please sign in to comment.