2023-08-25 07:52:12 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
from datetime import datetime, date
|
|
|
|
from enum import Enum
|
|
|
|
from typing import List, Dict, Optional, Any, Union
|
|
|
|
from pydantic import BaseModel as BaseModel, Field
|
2023-08-29 05:16:58 +00:00
|
|
|
from nptyping import NDArray, Shape, Float, Float32, Double, Float64, LongLong, Int64, Int, Int32, Int16, Short, Int8, UInt, UInt32, UInt16, UInt8, UInt64, Number, String, Unicode, Unicode, Unicode, String, Bool, Datetime64
|
2023-08-25 07:52:12 +00:00
|
|
|
import sys
|
|
|
|
if sys.version_info >= (3, 8):
|
|
|
|
from typing import Literal
|
|
|
|
else:
|
|
|
|
from typing_extensions import Literal
|
|
|
|
|
|
|
|
|
2023-08-29 05:16:58 +00:00
|
|
|
|
2023-08-25 07:52:12 +00:00
|
|
|
metamodel_version = "None"
|
|
|
|
version = "None"
|
|
|
|
|
|
|
|
class WeakRefShimBaseModel(BaseModel):
|
|
|
|
__slots__ = '__weakref__'
|
|
|
|
|
|
|
|
class ConfiguredBaseModel(WeakRefShimBaseModel,
|
|
|
|
validate_assignment = True,
|
|
|
|
validate_all = True,
|
|
|
|
underscore_attrs_are_private = True,
|
|
|
|
extra = 'forbid',
|
|
|
|
arbitrary_types_allowed = True,
|
|
|
|
use_enum_values = True):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class Data(ConfiguredBaseModel):
|
|
|
|
"""
|
|
|
|
An abstract data type for a dataset.
|
|
|
|
"""
|
|
|
|
None
|
|
|
|
|
|
|
|
|
|
|
|
class Container(ConfiguredBaseModel):
|
|
|
|
"""
|
|
|
|
An abstract data type for a group storing collections of data and metadata. Base type for all data and metadata containers.
|
|
|
|
"""
|
|
|
|
None
|
|
|
|
|
|
|
|
|
|
|
|
class SimpleMultiContainer(Container):
|
|
|
|
"""
|
|
|
|
A simple Container for holding onto multiple containers.
|
|
|
|
"""
|
|
|
|
Data: Optional[List[Data]] = Field(default_factory=list, description="""Data objects held within this SimpleMultiContainer.""")
|
|
|
|
Container: Optional[List[Container]] = Field(default_factory=list, description="""Container objects held within this SimpleMultiContainer.""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Update forward refs
|
|
|
|
# see https://pydantic-docs.helpmanual.io/usage/postponed_annotations/
|
|
|
|
Data.update_forward_refs()
|
|
|
|
Container.update_forward_refs()
|
|
|
|
SimpleMultiContainer.update_forward_refs()
|