Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require Model and realizations.len() > 0
Browse files Browse the repository at this point in the history
StephanDeHoop committed Dec 17, 2024
1 parent 0e19012 commit 2c867a9
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/everest/config/everest_config.py
Original file line number Diff line number Diff line change
@@ -114,8 +114,7 @@ class EverestConfig(BaseModelWithPropertySupport): # type: ignore
default=OptimizationConfig(),
description="Optimizer options",
)
model: ModelConfig | None = Field(
default=ModelConfig(),
model: ModelConfig = Field(
description="Configuration of the Everest model",
)

2 changes: 1 addition & 1 deletion src/everest/config/model_config.py
Original file line number Diff line number Diff line change
@@ -5,10 +5,10 @@

class ModelConfig(BaseModel, extra="forbid"): # type: ignore
realizations: list[NonNegativeInt] = Field(
default_factory=lambda: [],
description="""List of realizations to use in optimization ensemble.
Typically, this is a list [0, 1, ..., n-1] of all realizations in the ensemble.""",
min_length=1,
)
data_file: str | None = Field(
default=None,

0 comments on commit 2c867a9

Please sign in to comment.