Skip to content

Commit

Permalink
Add example to simulator config
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Dec 20, 2024
1 parent 1889e2a commit 5c9ccaa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/everest/config/everest_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions src/everest/config/simulator_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 5c9ccaa

Please sign in to comment.