From 5c9ccaa480073302f1b95be3aa09aedef38a5e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Eide?= Date: Thu, 19 Dec 2024 15:32:12 +0100 Subject: [PATCH] Add example to simulator config --- src/everest/config/everest_config.py | 6 ++++-- src/everest/config/simulator_config.py | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/everest/config/everest_config.py b/src/everest/config/everest_config.py index 505cd3e7789..db776a52ed9 100644 --- a/src/everest/config/everest_config.py +++ b/src/everest/config/everest_config.py @@ -61,7 +61,7 @@ from .objective_function_config import ObjectiveFunctionConfig from .optimization_config import OptimizationConfig from .output_constraint_config import OutputConstraintConfig -from .simulator_config import SimulatorConfig +from .simulator_config import SimulatorConfig, simulator_example from .well_config import WellConfig from .workflow_config import WorkflowConfig @@ -235,7 +235,9 @@ class EverestConfig(BaseModelWithPropertySupport): # type: ignore """, ) simulator: SimulatorConfig | None = Field( - default_factory=SimulatorConfig, description="Simulation settings" + default_factory=SimulatorConfig, + description="Simulation settings", + examples=[simulator_example], ) forward_model: list[str] | None = Field( default=None, description="List of jobs to run" diff --git a/src/everest/config/simulator_config.py b/src/everest/config/simulator_config.py index 9f02948d670..b0ab4403bc9 100644 --- a/src/everest/config/simulator_config.py +++ b/src/everest/config/simulator_config.py @@ -5,6 +5,8 @@ from .has_ert_queue_options import HasErtQueueOptions +simulator_example = {"queue_system": {"name": "local", "max_running": 3}} + class SimulatorConfig(BaseModel, HasErtQueueOptions, extra="forbid"): # type: ignore name: str | None = Field(default=None, description="Specifies which queue to use")