Skip to content

Commit

Permalink
All ex. passes
Browse files Browse the repository at this point in the history
  • Loading branch information
JB Lovland committed Jan 23, 2024
1 parent e931092 commit a97dcc2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 7 additions & 1 deletion ex.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ def read(file):

for file in (f.strip() for f in sys.stdin.readlines()):
print(file)
Root.model_validate_json(dumps(safe_load(read(file))))
try:
Root.model_validate_json(dumps(safe_load(read(file))))
except ValueError:
from pprint import pp

pp(safe_load(read(file)))
raise
3 changes: 1 addition & 2 deletions src/fmu/dataio/models/meta/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ class FMURealization(FMUDataObj):
realization: Realization



class ClassMeta(BaseModel):
class_: enums.FMUClassEnum = Field(
alias="class",
Expand Down Expand Up @@ -397,7 +396,7 @@ class FMUDataClassMeta(ClassMeta):
alias="class",
title="Metadata class",
)
fmu: Union[FMUAggregation, FMURealization]
fmu: Union[FMUAggregation, FMURealization, FMUCase]
access: SsdlAccess
data: content.AnyContent
file: File
Expand Down

0 comments on commit a97dcc2

Please sign in to comment.