Skip to content

Commit

Permalink
CLN: Use FMUCase model from schema in CaseSchema (equinor#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
tnatt authored Apr 11, 2024
1 parent 111ce36 commit 6ba4b49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/fmu/dataio/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,11 @@ def generate_metadata(self) -> dict:
model=global_configuration.Model.model_validate(
self.config["model"],
),
case=internal.CaseMetadata(
case=meta.FMUCase(
name=self.casename,
uuid=str(self._case_uuid()),
uuid=self._case_uuid(),
user=meta.User(id=self.caseuser),
description=None,
),
),
tracklog=_metadata.generate_meta_tracklog(),
Expand Down
8 changes: 1 addition & 7 deletions src/fmu/dataio/datastructure/_internal/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,9 @@ class JsonSchemaMetadata(BaseModel, populate_by_name=True):
source: str = Field(default=SOURCE)


class CaseMetadata(BaseModel):
name: str
uuid: str
user: meta.User


class FMUModel(BaseModel):
model: GlobalConfigurationModel
case: CaseMetadata
case: meta.FMUCase


class PreprocessedInfo(BaseModel):
Expand Down

0 comments on commit 6ba4b49

Please sign in to comment.