mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-12 17:54:29 +00:00
regenerate models after fixing classvar mutation in numpydantic linkml branch
This commit is contained in:
parent
f955c2acc3
commit
19e49cf68d
127 changed files with 474 additions and 3292 deletions
|
@ -42,7 +42,7 @@ from typing import ClassVar, Dict, List, Optional, Tuple, Type, Union
|
|||
from linkml.generators import PydanticGenerator
|
||||
from linkml.generators.pydanticgen.build import SlotResult
|
||||
from linkml.generators.pydanticgen.array import ArrayRepresentation, NumpydanticArray
|
||||
from linkml.generators.pydanticgen.template import PydanticModule, Import, ObjectImport
|
||||
from linkml.generators.pydanticgen.template import PydanticModule, Import, Imports
|
||||
from linkml_runtime.linkml_model.meta import (
|
||||
Annotation,
|
||||
AnonymousSlotExpression,
|
||||
|
@ -203,7 +203,9 @@ class AfterGenerateSlot:
|
|||
slot.injected_classes = named_injects
|
||||
else:
|
||||
slot.injected_classes.extend([ModelTypeString, _get_name, NamedString])
|
||||
if slot.imports:
|
||||
if isinstance(slot.imports, list):
|
||||
slot.imports = Imports(imports=slot.imports) + NamedImports
|
||||
elif isinstance(slot.imports, Imports):
|
||||
slot.imports += NamedImports
|
||||
else:
|
||||
slot.imports = NamedImports
|
||||
|
|
|
@ -47,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -7,60 +7,14 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_0.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_2_0.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_2_0.core_nwb_device import Device
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_2_0.core_nwb_misc import IntervalSeries
|
||||
from ...core.v2_2_0.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBDataInterface,
|
||||
)
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.0"
|
||||
|
@ -99,21 +53,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -64,7 +64,8 @@ class LinkMLMeta(RootModel):
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,107 +7,21 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_0.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_2_0.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_2_0.core_nwb_epoch import TimeIntervals
|
||||
from ...core.v2_2_0.core_nwb_misc import Units
|
||||
from ...core.v2_2_0.core_nwb_device import Device
|
||||
from ...core.v2_2_0.core_nwb_ogen import OptogeneticStimulusSite
|
||||
from ...core.v2_2_0.core_nwb_ophys import ImagingPlane
|
||||
from ...core.v2_2_0.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_0.core_nwb_epoch import TimeIntervals, TimeIntervalsTimeseries
|
||||
from ...core.v2_2_0.core_nwb_ophys import (
|
||||
TwoPhotonSeries,
|
||||
RoiResponseSeries,
|
||||
DfOverF,
|
||||
Fluorescence,
|
||||
ImageSegmentation,
|
||||
ImagingPlane,
|
||||
ImagingPlaneManifold,
|
||||
ImagingPlaneOriginCoords,
|
||||
ImagingPlaneGridSpacing,
|
||||
OpticalChannel,
|
||||
MotionCorrection,
|
||||
)
|
||||
from ...core.v2_2_0.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from ...core.v2_2_0.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite
|
||||
from ...core.v2_2_0.core_nwb_icephys import (
|
||||
PatchClampSeries,
|
||||
PatchClampSeriesData,
|
||||
CurrentClampSeries,
|
||||
CurrentClampSeriesData,
|
||||
IZeroClampSeries,
|
||||
CurrentClampStimulusSeries,
|
||||
CurrentClampStimulusSeriesData,
|
||||
VoltageClampSeries,
|
||||
VoltageClampSeriesData,
|
||||
VoltageClampSeriesCapacitanceFast,
|
||||
VoltageClampSeriesCapacitanceSlow,
|
||||
VoltageClampSeriesResistanceCompBandwidth,
|
||||
VoltageClampSeriesResistanceCompCorrection,
|
||||
VoltageClampSeriesResistanceCompPrediction,
|
||||
VoltageClampSeriesWholeCellCapacitanceComp,
|
||||
VoltageClampSeriesWholeCellSeriesResistanceComp,
|
||||
VoltageClampStimulusSeries,
|
||||
VoltageClampStimulusSeriesData,
|
||||
IntracellularElectrode,
|
||||
SweepTable,
|
||||
TimeSeries,
|
||||
)
|
||||
from ...core.v2_2_0.core_nwb_ecephys import ElectrodeGroup
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_table import DynamicTable, VectorData, VectorIndex
|
||||
from ...core.v2_2_0.core_nwb_icephys import IntracellularElectrode, SweepTable
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.0"
|
||||
|
@ -146,21 +60,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,34 +5,11 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_0.core_nwb_device import Device
|
||||
from ...core.v2_2_0.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBContainer,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
|
@ -45,6 +22,7 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_table import DynamicTable, VectorIndex, VectorData
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.0"
|
||||
|
@ -87,7 +65,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,35 +7,8 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_0.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_2_0.core_nwb_base import Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.0"
|
||||
|
@ -74,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -66,7 +66,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -52,21 +52,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,45 +5,7 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...core.v2_2_0.core_nwb_device import Device
|
||||
from ...core.v2_2_0.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_0.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from ...core.v2_2_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
BaseModel,
|
||||
|
@ -54,7 +16,15 @@ from pydantic import (
|
|||
ValidationInfo,
|
||||
BeforeValidator,
|
||||
)
|
||||
from ...hdmf_common.v1_1_0.hdmf_common_table import DynamicTableRegion, DynamicTable
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_2_0.core_nwb_base import (
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
TimeSeries,
|
||||
NWBDataInterface,
|
||||
NWBContainer,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.0"
|
||||
|
@ -97,7 +67,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -47,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -7,60 +7,14 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_1.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_2_1.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_2_1.core_nwb_device import Device
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_2_1.core_nwb_misc import IntervalSeries
|
||||
from ...core.v2_2_1.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBDataInterface,
|
||||
)
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.1"
|
||||
|
@ -99,21 +53,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -64,7 +64,8 @@ class LinkMLMeta(RootModel):
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,107 +7,21 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_1.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_2_1.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_2_1.core_nwb_epoch import TimeIntervals
|
||||
from ...core.v2_2_1.core_nwb_misc import Units
|
||||
from ...core.v2_2_1.core_nwb_device import Device
|
||||
from ...core.v2_2_1.core_nwb_ogen import OptogeneticStimulusSite
|
||||
from ...core.v2_2_1.core_nwb_ophys import ImagingPlane
|
||||
from ...core.v2_2_1.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_1.core_nwb_epoch import TimeIntervals, TimeIntervalsTimeseries
|
||||
from ...core.v2_2_1.core_nwb_ophys import (
|
||||
TwoPhotonSeries,
|
||||
RoiResponseSeries,
|
||||
DfOverF,
|
||||
Fluorescence,
|
||||
ImageSegmentation,
|
||||
ImagingPlane,
|
||||
ImagingPlaneManifold,
|
||||
ImagingPlaneOriginCoords,
|
||||
ImagingPlaneGridSpacing,
|
||||
OpticalChannel,
|
||||
MotionCorrection,
|
||||
)
|
||||
from ...core.v2_2_1.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from ...core.v2_2_1.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite
|
||||
from ...core.v2_2_1.core_nwb_icephys import (
|
||||
PatchClampSeries,
|
||||
PatchClampSeriesData,
|
||||
CurrentClampSeries,
|
||||
CurrentClampSeriesData,
|
||||
IZeroClampSeries,
|
||||
CurrentClampStimulusSeries,
|
||||
CurrentClampStimulusSeriesData,
|
||||
VoltageClampSeries,
|
||||
VoltageClampSeriesData,
|
||||
VoltageClampSeriesCapacitanceFast,
|
||||
VoltageClampSeriesCapacitanceSlow,
|
||||
VoltageClampSeriesResistanceCompBandwidth,
|
||||
VoltageClampSeriesResistanceCompCorrection,
|
||||
VoltageClampSeriesResistanceCompPrediction,
|
||||
VoltageClampSeriesWholeCellCapacitanceComp,
|
||||
VoltageClampSeriesWholeCellSeriesResistanceComp,
|
||||
VoltageClampStimulusSeries,
|
||||
VoltageClampStimulusSeriesData,
|
||||
IntracellularElectrode,
|
||||
SweepTable,
|
||||
TimeSeries,
|
||||
)
|
||||
from ...core.v2_2_1.core_nwb_ecephys import ElectrodeGroup
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_table import DynamicTable, VectorData, VectorIndex
|
||||
from ...core.v2_2_1.core_nwb_icephys import IntracellularElectrode, SweepTable
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.1"
|
||||
|
@ -146,21 +60,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,34 +5,11 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_1.core_nwb_device import Device
|
||||
from ...core.v2_2_1.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBContainer,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
|
@ -45,6 +22,7 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_table import DynamicTable, VectorIndex, VectorData
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.1"
|
||||
|
@ -87,7 +65,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,35 +7,8 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_1.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_2_1.core_nwb_base import Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.1"
|
||||
|
@ -74,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -66,7 +66,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -52,21 +52,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,45 +5,7 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...core.v2_2_1.core_nwb_device import Device
|
||||
from ...core.v2_2_1.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_1.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from ...core.v2_2_1.core_nwb_image import ImageSeries, ImageSeriesExternalFile
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
BaseModel,
|
||||
|
@ -54,7 +16,15 @@ from pydantic import (
|
|||
ValidationInfo,
|
||||
BeforeValidator,
|
||||
)
|
||||
from ...hdmf_common.v1_1_2.hdmf_common_table import DynamicTableRegion, DynamicTable
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_2_1.core_nwb_base import (
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
TimeSeries,
|
||||
NWBDataInterface,
|
||||
NWBContainer,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.1"
|
||||
|
@ -97,7 +67,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -47,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -7,60 +7,14 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_2.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_2_2.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_2_2.core_nwb_device import Device
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_2_2.core_nwb_misc import IntervalSeries
|
||||
from ...core.v2_2_2.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBDataInterface,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.2"
|
||||
|
@ -99,21 +53,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -64,7 +64,8 @@ class LinkMLMeta(RootModel):
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,103 +7,21 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_2.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_2_2.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_2_2.core_nwb_epoch import TimeIntervals
|
||||
from ...core.v2_2_2.core_nwb_misc import Units
|
||||
from ...core.v2_2_2.core_nwb_device import Device
|
||||
from ...core.v2_2_2.core_nwb_ogen import OptogeneticStimulusSite
|
||||
from ...core.v2_2_2.core_nwb_ophys import ImagingPlane
|
||||
from ...core.v2_2_2.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_2.core_nwb_epoch import TimeIntervals, TimeIntervalsTimeseries
|
||||
from ...core.v2_2_2.core_nwb_ophys import (
|
||||
TwoPhotonSeries,
|
||||
RoiResponseSeries,
|
||||
DfOverF,
|
||||
Fluorescence,
|
||||
ImageSegmentation,
|
||||
ImagingPlane,
|
||||
MotionCorrection,
|
||||
)
|
||||
from ...core.v2_2_2.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from ...core.v2_2_2.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite
|
||||
from ...core.v2_2_2.core_nwb_icephys import (
|
||||
PatchClampSeries,
|
||||
PatchClampSeriesData,
|
||||
CurrentClampSeries,
|
||||
CurrentClampSeriesData,
|
||||
IZeroClampSeries,
|
||||
CurrentClampStimulusSeries,
|
||||
CurrentClampStimulusSeriesData,
|
||||
VoltageClampSeries,
|
||||
VoltageClampSeriesData,
|
||||
VoltageClampSeriesCapacitanceFast,
|
||||
VoltageClampSeriesCapacitanceSlow,
|
||||
VoltageClampSeriesResistanceCompBandwidth,
|
||||
VoltageClampSeriesResistanceCompCorrection,
|
||||
VoltageClampSeriesResistanceCompPrediction,
|
||||
VoltageClampSeriesWholeCellCapacitanceComp,
|
||||
VoltageClampSeriesWholeCellSeriesResistanceComp,
|
||||
VoltageClampStimulusSeries,
|
||||
VoltageClampStimulusSeriesData,
|
||||
IntracellularElectrode,
|
||||
SweepTable,
|
||||
TimeSeries,
|
||||
)
|
||||
from ...core.v2_2_2.core_nwb_ecephys import ElectrodeGroup
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import DynamicTable, VectorData, VectorIndex
|
||||
from ...core.v2_2_2.core_nwb_icephys import IntracellularElectrode, SweepTable
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.2"
|
||||
|
@ -142,21 +60,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,34 +5,11 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_2.core_nwb_device import Device
|
||||
from ...core.v2_2_2.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBContainer,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
|
@ -45,6 +22,7 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import DynamicTable, VectorIndex, VectorData
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.2"
|
||||
|
@ -87,7 +65,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,35 +7,8 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_2.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_2_2.core_nwb_base import Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.2"
|
||||
|
@ -74,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -66,7 +66,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -52,21 +52,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,45 +5,7 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...core.v2_2_2.core_nwb_device import Device
|
||||
from ...core.v2_2_2.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_2.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from ...core.v2_2_2.core_nwb_image import ImageSeries, ImageSeriesExternalFile
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
BaseModel,
|
||||
|
@ -55,6 +17,14 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import DynamicTableRegion, DynamicTable
|
||||
from ...core.v2_2_2.core_nwb_base import (
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
TimeSeries,
|
||||
NWBDataInterface,
|
||||
NWBContainer,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.2"
|
||||
|
@ -97,7 +67,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -47,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -47,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -7,60 +7,14 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_4.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_2_4.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_2_4.core_nwb_device import Device
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_2_4.core_nwb_misc import IntervalSeries
|
||||
from ...core.v2_2_4.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBDataInterface,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.4"
|
||||
|
@ -99,21 +53,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -64,7 +64,8 @@ class LinkMLMeta(RootModel):
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,109 +7,22 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_4.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_2_4.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_2_4.core_nwb_epoch import TimeIntervals
|
||||
from ...core.v2_2_4.core_nwb_misc import Units
|
||||
from ...core.v2_2_4.core_nwb_device import Device
|
||||
from ...core.v2_2_4.core_nwb_ogen import OptogeneticStimulusSite
|
||||
from ...core.v2_2_4.core_nwb_ophys import ImagingPlane
|
||||
from ...core.v2_2_4.core_nwb_ecephys import ElectrodeGroup
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import DynamicTable, VectorData, VectorIndex
|
||||
from ...core.v2_2_4.core_nwb_icephys import IntracellularElectrode, SweepTable
|
||||
from ...core.v2_2_4.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
TimeSeries,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_4.core_nwb_epoch import TimeIntervals, TimeIntervalsTimeseries
|
||||
from ...core.v2_2_4.core_nwb_ophys import (
|
||||
TwoPhotonSeries,
|
||||
RoiResponseSeries,
|
||||
DfOverF,
|
||||
Fluorescence,
|
||||
ImageSegmentation,
|
||||
PlaneSegmentation,
|
||||
PlaneSegmentationImageMask,
|
||||
PlaneSegmentationPixelMask,
|
||||
PlaneSegmentationVoxelMask,
|
||||
ImagingPlane,
|
||||
OpticalChannel,
|
||||
MotionCorrection,
|
||||
CorrectedImageStack,
|
||||
)
|
||||
from ...core.v2_2_4.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from ...core.v2_2_4.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite
|
||||
from ...core.v2_2_4.core_nwb_icephys import (
|
||||
PatchClampSeries,
|
||||
PatchClampSeriesData,
|
||||
CurrentClampSeries,
|
||||
CurrentClampSeriesData,
|
||||
IZeroClampSeries,
|
||||
CurrentClampStimulusSeries,
|
||||
CurrentClampStimulusSeriesData,
|
||||
VoltageClampSeries,
|
||||
VoltageClampSeriesData,
|
||||
VoltageClampSeriesCapacitanceFast,
|
||||
VoltageClampSeriesCapacitanceSlow,
|
||||
VoltageClampSeriesResistanceCompBandwidth,
|
||||
VoltageClampSeriesResistanceCompCorrection,
|
||||
VoltageClampSeriesResistanceCompPrediction,
|
||||
VoltageClampSeriesWholeCellCapacitanceComp,
|
||||
VoltageClampSeriesWholeCellSeriesResistanceComp,
|
||||
VoltageClampStimulusSeries,
|
||||
VoltageClampStimulusSeriesData,
|
||||
IntracellularElectrode,
|
||||
SweepTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.4"
|
||||
|
@ -148,21 +61,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,34 +5,11 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_4.core_nwb_device import Device
|
||||
from ...core.v2_2_4.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBContainer,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
|
@ -45,6 +22,7 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import DynamicTable, VectorIndex, VectorData
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.4"
|
||||
|
@ -87,7 +65,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,35 +7,8 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_4.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_2_4.core_nwb_base import Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.4"
|
||||
|
@ -74,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -66,7 +66,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -52,21 +52,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,45 +5,6 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...core.v2_2_4.core_nwb_device import Device
|
||||
from ...core.v2_2_4.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_4.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
BaseModel,
|
||||
|
@ -55,6 +16,20 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
VectorIndex,
|
||||
VectorData,
|
||||
)
|
||||
from ...core.v2_2_4.core_nwb_image import ImageSeries, ImageSeriesExternalFile
|
||||
from ...core.v2_2_4.core_nwb_base import (
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
TimeSeries,
|
||||
NWBDataInterface,
|
||||
NWBContainer,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.4"
|
||||
|
@ -97,7 +72,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -47,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -47,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -7,60 +7,14 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_5.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_2_5.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_2_5.core_nwb_device import Device
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_2_5.core_nwb_misc import IntervalSeries
|
||||
from ...core.v2_2_5.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBDataInterface,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.5"
|
||||
|
@ -99,21 +53,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -64,7 +64,8 @@ class LinkMLMeta(RootModel):
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,109 +7,22 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_5.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_2_5.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_2_5.core_nwb_epoch import TimeIntervals
|
||||
from ...core.v2_2_5.core_nwb_misc import Units
|
||||
from ...core.v2_2_5.core_nwb_device import Device
|
||||
from ...core.v2_2_5.core_nwb_ogen import OptogeneticStimulusSite
|
||||
from ...core.v2_2_5.core_nwb_ophys import ImagingPlane
|
||||
from ...core.v2_2_5.core_nwb_ecephys import ElectrodeGroup
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import DynamicTable, VectorData, VectorIndex
|
||||
from ...core.v2_2_5.core_nwb_icephys import IntracellularElectrode, SweepTable
|
||||
from ...core.v2_2_5.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
TimeSeries,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_5.core_nwb_epoch import TimeIntervals, TimeIntervalsTimeseries
|
||||
from ...core.v2_2_5.core_nwb_ophys import (
|
||||
TwoPhotonSeries,
|
||||
RoiResponseSeries,
|
||||
DfOverF,
|
||||
Fluorescence,
|
||||
ImageSegmentation,
|
||||
PlaneSegmentation,
|
||||
PlaneSegmentationImageMask,
|
||||
PlaneSegmentationPixelMask,
|
||||
PlaneSegmentationVoxelMask,
|
||||
ImagingPlane,
|
||||
OpticalChannel,
|
||||
MotionCorrection,
|
||||
CorrectedImageStack,
|
||||
)
|
||||
from ...core.v2_2_5.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from ...core.v2_2_5.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite
|
||||
from ...core.v2_2_5.core_nwb_icephys import (
|
||||
PatchClampSeries,
|
||||
PatchClampSeriesData,
|
||||
CurrentClampSeries,
|
||||
CurrentClampSeriesData,
|
||||
IZeroClampSeries,
|
||||
CurrentClampStimulusSeries,
|
||||
CurrentClampStimulusSeriesData,
|
||||
VoltageClampSeries,
|
||||
VoltageClampSeriesData,
|
||||
VoltageClampSeriesCapacitanceFast,
|
||||
VoltageClampSeriesCapacitanceSlow,
|
||||
VoltageClampSeriesResistanceCompBandwidth,
|
||||
VoltageClampSeriesResistanceCompCorrection,
|
||||
VoltageClampSeriesResistanceCompPrediction,
|
||||
VoltageClampSeriesWholeCellCapacitanceComp,
|
||||
VoltageClampSeriesWholeCellSeriesResistanceComp,
|
||||
VoltageClampStimulusSeries,
|
||||
VoltageClampStimulusSeriesData,
|
||||
IntracellularElectrode,
|
||||
SweepTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.5"
|
||||
|
@ -148,21 +61,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,34 +5,11 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_5.core_nwb_device import Device
|
||||
from ...core.v2_2_5.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBContainer,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
|
@ -45,6 +22,7 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import DynamicTable, VectorIndex, VectorData
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.5"
|
||||
|
@ -87,7 +65,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,35 +7,8 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_2_5.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_2_5.core_nwb_base import Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.5"
|
||||
|
@ -74,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -66,7 +66,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -52,21 +52,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,45 +5,6 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...core.v2_2_5.core_nwb_device import Device
|
||||
from ...core.v2_2_5.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_sparse import (
|
||||
CSRMatrix,
|
||||
CSRMatrixIndices,
|
||||
CSRMatrixIndptr,
|
||||
CSRMatrixData,
|
||||
)
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
Data,
|
||||
Index,
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
Container,
|
||||
DynamicTable,
|
||||
)
|
||||
from ...core.v2_2_5.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
BaseModel,
|
||||
|
@ -55,6 +16,20 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_1_3.hdmf_common_table import (
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
VectorIndex,
|
||||
VectorData,
|
||||
)
|
||||
from ...core.v2_2_5.core_nwb_image import ImageSeries, ImageSeriesExternalFile
|
||||
from ...core.v2_2_5.core_nwb_base import (
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
TimeSeries,
|
||||
NWBDataInterface,
|
||||
NWBContainer,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.2.5"
|
||||
|
@ -97,7 +72,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -47,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -48,21 +48,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -7,54 +7,14 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_3_0.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_3_0.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_3_0.core_nwb_device import Device
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_3_0.core_nwb_misc import IntervalSeries
|
||||
from ...core.v2_3_0.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBDataInterface,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.3.0"
|
||||
|
@ -93,21 +53,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -64,7 +64,8 @@ class LinkMLMeta(RootModel):
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,103 +7,22 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_3_0.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_3_0.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_3_0.core_nwb_epoch import TimeIntervals
|
||||
from ...core.v2_3_0.core_nwb_misc import Units
|
||||
from ...core.v2_3_0.core_nwb_device import Device
|
||||
from ...core.v2_3_0.core_nwb_ogen import OptogeneticStimulusSite
|
||||
from ...core.v2_3_0.core_nwb_ophys import ImagingPlane
|
||||
from ...core.v2_3_0.core_nwb_ecephys import ElectrodeGroup
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import DynamicTable, VectorData
|
||||
from ...core.v2_3_0.core_nwb_icephys import IntracellularElectrode, SweepTable
|
||||
from ...core.v2_3_0.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
TimeSeries,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from ...core.v2_3_0.core_nwb_epoch import TimeIntervals, TimeIntervalsTimeseries
|
||||
from ...core.v2_3_0.core_nwb_ophys import (
|
||||
TwoPhotonSeries,
|
||||
RoiResponseSeries,
|
||||
DfOverF,
|
||||
Fluorescence,
|
||||
ImageSegmentation,
|
||||
PlaneSegmentation,
|
||||
PlaneSegmentationImageMask,
|
||||
PlaneSegmentationPixelMask,
|
||||
PlaneSegmentationVoxelMask,
|
||||
ImagingPlane,
|
||||
OpticalChannel,
|
||||
MotionCorrection,
|
||||
CorrectedImageStack,
|
||||
)
|
||||
from ...core.v2_3_0.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from ...core.v2_3_0.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite
|
||||
from ...core.v2_3_0.core_nwb_icephys import (
|
||||
PatchClampSeries,
|
||||
PatchClampSeriesData,
|
||||
CurrentClampSeries,
|
||||
CurrentClampSeriesData,
|
||||
IZeroClampSeries,
|
||||
CurrentClampStimulusSeries,
|
||||
CurrentClampStimulusSeriesData,
|
||||
VoltageClampSeries,
|
||||
VoltageClampSeriesData,
|
||||
VoltageClampSeriesCapacitanceFast,
|
||||
VoltageClampSeriesCapacitanceSlow,
|
||||
VoltageClampSeriesResistanceCompBandwidth,
|
||||
VoltageClampSeriesResistanceCompCorrection,
|
||||
VoltageClampSeriesResistanceCompPrediction,
|
||||
VoltageClampSeriesWholeCellCapacitanceComp,
|
||||
VoltageClampSeriesWholeCellSeriesResistanceComp,
|
||||
VoltageClampStimulusSeries,
|
||||
VoltageClampStimulusSeriesData,
|
||||
IntracellularElectrode,
|
||||
SweepTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.3.0"
|
||||
|
@ -142,21 +61,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,28 +5,11 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from ...core.v2_3_0.core_nwb_device import Device
|
||||
from ...core.v2_3_0.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBContainer,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
|
@ -39,6 +22,7 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import DynamicTable, VectorIndex, VectorData
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.3.0"
|
||||
|
@ -81,7 +65,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,30 +7,8 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_3_0.core_nwb_device import Device
|
||||
from ...core.v2_3_0.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_3_0.core_nwb_base import Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.3.0"
|
||||
|
@ -69,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -66,7 +66,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -52,21 +52,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,39 +5,6 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...core.v2_3_0.core_nwb_device import Device
|
||||
from ...core.v2_3_0.core_nwb_base import (
|
||||
NWBData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from ...core.v2_3_0.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
BaseModel,
|
||||
|
@ -49,6 +16,20 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
VectorIndex,
|
||||
VectorData,
|
||||
)
|
||||
from ...core.v2_3_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile
|
||||
from ...core.v2_3_0.core_nwb_base import (
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
TimeSeries,
|
||||
NWBDataInterface,
|
||||
NWBContainer,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.3.0"
|
||||
|
@ -91,7 +72,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -47,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -48,21 +48,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -7,55 +7,14 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_4_0.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_4_0.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_4_0.core_nwb_device import Device
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_4_0.core_nwb_misc import IntervalSeries
|
||||
from ...core.v2_4_0.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBDataInterface,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.4.0"
|
||||
|
@ -94,21 +53,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -64,7 +64,8 @@ class LinkMLMeta(RootModel):
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,116 +7,30 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_4_0.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_4_0.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_4_0.core_nwb_epoch import TimeIntervals
|
||||
from ...core.v2_4_0.core_nwb_misc import Units
|
||||
from ...core.v2_4_0.core_nwb_device import Device
|
||||
from ...core.v2_4_0.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from ...core.v2_4_0.core_nwb_epoch import TimeIntervals, TimeIntervalsTimeseries
|
||||
from ...core.v2_4_0.core_nwb_ophys import (
|
||||
TwoPhotonSeries,
|
||||
RoiResponseSeries,
|
||||
DfOverF,
|
||||
Fluorescence,
|
||||
ImageSegmentation,
|
||||
PlaneSegmentation,
|
||||
PlaneSegmentationImageMask,
|
||||
PlaneSegmentationPixelMask,
|
||||
PlaneSegmentationVoxelMask,
|
||||
ImagingPlane,
|
||||
OpticalChannel,
|
||||
MotionCorrection,
|
||||
CorrectedImageStack,
|
||||
)
|
||||
from ...core.v2_4_0.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from ...core.v2_4_0.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite
|
||||
from ...core.v2_4_0.core_nwb_ogen import OptogeneticStimulusSite
|
||||
from ...core.v2_4_0.core_nwb_ophys import ImagingPlane
|
||||
from ...core.v2_4_0.core_nwb_ecephys import ElectrodeGroup
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import DynamicTable, VectorData
|
||||
from ...core.v2_4_0.core_nwb_icephys import (
|
||||
PatchClampSeries,
|
||||
PatchClampSeriesData,
|
||||
CurrentClampSeries,
|
||||
CurrentClampSeriesData,
|
||||
IZeroClampSeries,
|
||||
CurrentClampStimulusSeries,
|
||||
CurrentClampStimulusSeriesData,
|
||||
VoltageClampSeries,
|
||||
VoltageClampSeriesData,
|
||||
VoltageClampSeriesCapacitanceFast,
|
||||
VoltageClampSeriesCapacitanceSlow,
|
||||
VoltageClampSeriesResistanceCompBandwidth,
|
||||
VoltageClampSeriesResistanceCompCorrection,
|
||||
VoltageClampSeriesResistanceCompPrediction,
|
||||
VoltageClampSeriesWholeCellCapacitanceComp,
|
||||
VoltageClampSeriesWholeCellSeriesResistanceComp,
|
||||
VoltageClampStimulusSeries,
|
||||
VoltageClampStimulusSeriesData,
|
||||
IntracellularElectrode,
|
||||
SweepTable,
|
||||
IntracellularElectrodesTable,
|
||||
IntracellularStimuliTable,
|
||||
IntracellularResponsesTable,
|
||||
IntracellularRecordingsTable,
|
||||
SimultaneousRecordingsTable,
|
||||
SimultaneousRecordingsTableRecordings,
|
||||
SequentialRecordingsTable,
|
||||
SequentialRecordingsTableSimultaneousRecordings,
|
||||
RepetitionsTable,
|
||||
RepetitionsTableSequentialRecordings,
|
||||
ExperimentalConditionsTable,
|
||||
ExperimentalConditionsTableRepetitions,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_4_0.core_nwb_base import (
|
||||
NWBData,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
ProcessingModule,
|
||||
TimeSeries,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.4.0"
|
||||
|
@ -155,21 +69,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,29 +5,12 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from ...core.v2_4_0.core_nwb_device import Device
|
||||
from ...core.v2_4_0.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBContainer,
|
||||
TimeSeriesReferenceVectorData,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
|
@ -40,6 +23,13 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
DynamicTable,
|
||||
VectorIndex,
|
||||
VectorData,
|
||||
AlignedDynamicTable,
|
||||
DynamicTableRegion,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.4.0"
|
||||
|
@ -82,7 +72,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,31 +7,8 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_4_0.core_nwb_device import Device
|
||||
from ...core.v2_4_0.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_4_0.core_nwb_base import Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.4.0"
|
||||
|
@ -70,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -66,7 +66,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -52,21 +52,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,40 +5,6 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...core.v2_4_0.core_nwb_device import Device
|
||||
from ...core.v2_4_0.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from ...core.v2_4_0.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
BaseModel,
|
||||
|
@ -50,6 +16,20 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
VectorIndex,
|
||||
VectorData,
|
||||
)
|
||||
from ...core.v2_4_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile
|
||||
from ...core.v2_4_0.core_nwb_base import (
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
TimeSeries,
|
||||
NWBDataInterface,
|
||||
NWBContainer,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.4.0"
|
||||
|
@ -92,7 +72,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -47,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
@ -168,6 +169,9 @@ class ImageReferences(NWBData):
|
|||
)
|
||||
|
||||
name: str = Field(...)
|
||||
image: List[Image] = Field(
|
||||
..., description="""Ordered dataset of references to Image objects."""
|
||||
)
|
||||
|
||||
|
||||
class NWBContainer(Container):
|
||||
|
|
|
@ -7,56 +7,14 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_5_0.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_5_0.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_5_0.core_nwb_device import Device
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_5_0.core_nwb_misc import IntervalSeries
|
||||
from ...core.v2_5_0.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
ImageReferences,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBDataInterface,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.5.0"
|
||||
|
@ -95,21 +53,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -64,7 +64,8 @@ class LinkMLMeta(RootModel):
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,117 +7,31 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_5_0.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_5_0.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_5_0.core_nwb_device import Device
|
||||
from ...core.v2_5_0.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
ImageReferences,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from ...core.v2_5_0.core_nwb_epoch import TimeIntervals
|
||||
from ...core.v2_5_0.core_nwb_ophys import (
|
||||
TwoPhotonSeries,
|
||||
RoiResponseSeries,
|
||||
DfOverF,
|
||||
Fluorescence,
|
||||
ImageSegmentation,
|
||||
PlaneSegmentation,
|
||||
PlaneSegmentationImageMask,
|
||||
PlaneSegmentationPixelMask,
|
||||
PlaneSegmentationVoxelMask,
|
||||
ImagingPlane,
|
||||
OpticalChannel,
|
||||
MotionCorrection,
|
||||
CorrectedImageStack,
|
||||
)
|
||||
from ...core.v2_5_0.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from ...core.v2_5_0.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite
|
||||
from ...core.v2_5_0.core_nwb_misc import Units
|
||||
from ...core.v2_5_0.core_nwb_device import Device
|
||||
from ...core.v2_5_0.core_nwb_ogen import OptogeneticStimulusSite
|
||||
from ...core.v2_5_0.core_nwb_ophys import ImagingPlane
|
||||
from ...core.v2_5_0.core_nwb_ecephys import ElectrodeGroup
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import DynamicTable, VectorData
|
||||
from ...core.v2_5_0.core_nwb_icephys import (
|
||||
PatchClampSeries,
|
||||
PatchClampSeriesData,
|
||||
CurrentClampSeries,
|
||||
CurrentClampSeriesData,
|
||||
IZeroClampSeries,
|
||||
CurrentClampStimulusSeries,
|
||||
CurrentClampStimulusSeriesData,
|
||||
VoltageClampSeries,
|
||||
VoltageClampSeriesData,
|
||||
VoltageClampSeriesCapacitanceFast,
|
||||
VoltageClampSeriesCapacitanceSlow,
|
||||
VoltageClampSeriesResistanceCompBandwidth,
|
||||
VoltageClampSeriesResistanceCompCorrection,
|
||||
VoltageClampSeriesResistanceCompPrediction,
|
||||
VoltageClampSeriesWholeCellCapacitanceComp,
|
||||
VoltageClampSeriesWholeCellSeriesResistanceComp,
|
||||
VoltageClampStimulusSeries,
|
||||
VoltageClampStimulusSeriesData,
|
||||
IntracellularElectrode,
|
||||
SweepTable,
|
||||
IntracellularElectrodesTable,
|
||||
IntracellularStimuliTable,
|
||||
IntracellularResponsesTable,
|
||||
IntracellularRecordingsTable,
|
||||
SimultaneousRecordingsTable,
|
||||
SimultaneousRecordingsTableRecordings,
|
||||
SequentialRecordingsTable,
|
||||
SequentialRecordingsTableSimultaneousRecordings,
|
||||
RepetitionsTable,
|
||||
RepetitionsTableSequentialRecordings,
|
||||
ExperimentalConditionsTable,
|
||||
ExperimentalConditionsTableRepetitions,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_5_0.core_nwb_base import (
|
||||
NWBData,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
ProcessingModule,
|
||||
TimeSeries,
|
||||
Images,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.5.0"
|
||||
|
@ -156,21 +70,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,30 +5,12 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from ...core.v2_5_0.core_nwb_device import Device
|
||||
from ...core.v2_5_0.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
ImageReferences,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBContainer,
|
||||
TimeSeriesReferenceVectorData,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
|
@ -41,6 +23,13 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
DynamicTable,
|
||||
VectorIndex,
|
||||
VectorData,
|
||||
AlignedDynamicTable,
|
||||
DynamicTableRegion,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.5.0"
|
||||
|
@ -83,7 +72,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,32 +7,8 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_5_0.core_nwb_device import Device
|
||||
from ...core.v2_5_0.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
ImageReferences,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_5_0.core_nwb_base import Image, TimeSeries, TimeSeriesStartingTime, TimeSeriesSync
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.5.0"
|
||||
|
@ -71,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -66,7 +66,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -52,21 +52,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,41 +5,6 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...core.v2_5_0.core_nwb_device import Device
|
||||
from ...core.v2_5_0.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
ImageReferences,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from ...core.v2_5_0.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
BaseModel,
|
||||
|
@ -51,6 +16,20 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
VectorIndex,
|
||||
VectorData,
|
||||
)
|
||||
from ...core.v2_5_0.core_nwb_image import ImageSeries, ImageSeriesExternalFile
|
||||
from ...core.v2_5_0.core_nwb_base import (
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
TimeSeries,
|
||||
NWBDataInterface,
|
||||
NWBContainer,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.5.0"
|
||||
|
@ -93,7 +72,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -47,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
@ -168,6 +169,9 @@ class ImageReferences(NWBData):
|
|||
)
|
||||
|
||||
name: str = Field(...)
|
||||
image: List[Image] = Field(
|
||||
..., description="""Ordered dataset of references to Image objects."""
|
||||
)
|
||||
|
||||
|
||||
class NWBContainer(Container):
|
||||
|
|
|
@ -7,56 +7,14 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_6_0_alpha.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_6_0_alpha.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_6_0_alpha.core_nwb_device import Device
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_6_0_alpha.core_nwb_misc import IntervalSeries
|
||||
from ...core.v2_6_0_alpha.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
ImageReferences,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBDataInterface,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.6.0-alpha"
|
||||
|
@ -95,21 +53,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -64,7 +64,8 @@ class LinkMLMeta(RootModel):
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -60,7 +60,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,118 +7,31 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_6_0_alpha.core_nwb_misc import (
|
||||
AbstractFeatureSeries,
|
||||
AbstractFeatureSeriesData,
|
||||
AnnotationSeries,
|
||||
IntervalSeries,
|
||||
DecompositionSeries,
|
||||
DecompositionSeriesData,
|
||||
DecompositionSeriesBands,
|
||||
Units,
|
||||
UnitsSpikeTimes,
|
||||
)
|
||||
from ...core.v2_6_0_alpha.core_nwb_ecephys import (
|
||||
ElectricalSeries,
|
||||
SpikeEventSeries,
|
||||
FeatureExtraction,
|
||||
EventDetection,
|
||||
EventWaveform,
|
||||
FilteredEphys,
|
||||
LFP,
|
||||
ElectrodeGroup,
|
||||
ElectrodeGroupPosition,
|
||||
ClusterWaveforms,
|
||||
Clustering,
|
||||
)
|
||||
from ...core.v2_6_0_alpha.core_nwb_device import Device
|
||||
from ...core.v2_6_0_alpha.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
ImageReferences,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from ...core.v2_6_0_alpha.core_nwb_epoch import TimeIntervals
|
||||
from ...core.v2_6_0_alpha.core_nwb_ophys import (
|
||||
OnePhotonSeries,
|
||||
TwoPhotonSeries,
|
||||
RoiResponseSeries,
|
||||
DfOverF,
|
||||
Fluorescence,
|
||||
ImageSegmentation,
|
||||
PlaneSegmentation,
|
||||
PlaneSegmentationImageMask,
|
||||
PlaneSegmentationPixelMask,
|
||||
PlaneSegmentationVoxelMask,
|
||||
ImagingPlane,
|
||||
OpticalChannel,
|
||||
MotionCorrection,
|
||||
CorrectedImageStack,
|
||||
)
|
||||
from ...core.v2_6_0_alpha.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from ...core.v2_6_0_alpha.core_nwb_ogen import OptogeneticSeries, OptogeneticStimulusSite
|
||||
from ...core.v2_6_0_alpha.core_nwb_misc import Units
|
||||
from ...core.v2_6_0_alpha.core_nwb_device import Device
|
||||
from ...core.v2_6_0_alpha.core_nwb_ogen import OptogeneticStimulusSite
|
||||
from ...core.v2_6_0_alpha.core_nwb_ophys import ImagingPlane
|
||||
from ...core.v2_6_0_alpha.core_nwb_ecephys import ElectrodeGroup
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import DynamicTable, VectorData
|
||||
from ...core.v2_6_0_alpha.core_nwb_icephys import (
|
||||
PatchClampSeries,
|
||||
PatchClampSeriesData,
|
||||
CurrentClampSeries,
|
||||
CurrentClampSeriesData,
|
||||
IZeroClampSeries,
|
||||
CurrentClampStimulusSeries,
|
||||
CurrentClampStimulusSeriesData,
|
||||
VoltageClampSeries,
|
||||
VoltageClampSeriesData,
|
||||
VoltageClampSeriesCapacitanceFast,
|
||||
VoltageClampSeriesCapacitanceSlow,
|
||||
VoltageClampSeriesResistanceCompBandwidth,
|
||||
VoltageClampSeriesResistanceCompCorrection,
|
||||
VoltageClampSeriesResistanceCompPrediction,
|
||||
VoltageClampSeriesWholeCellCapacitanceComp,
|
||||
VoltageClampSeriesWholeCellSeriesResistanceComp,
|
||||
VoltageClampStimulusSeries,
|
||||
VoltageClampStimulusSeriesData,
|
||||
IntracellularElectrode,
|
||||
SweepTable,
|
||||
IntracellularElectrodesTable,
|
||||
IntracellularStimuliTable,
|
||||
IntracellularResponsesTable,
|
||||
IntracellularRecordingsTable,
|
||||
SimultaneousRecordingsTable,
|
||||
SimultaneousRecordingsTableRecordings,
|
||||
SequentialRecordingsTable,
|
||||
SequentialRecordingsTableSimultaneousRecordings,
|
||||
RepetitionsTable,
|
||||
RepetitionsTableSequentialRecordings,
|
||||
ExperimentalConditionsTable,
|
||||
ExperimentalConditionsTableRepetitions,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_6_0_alpha.core_nwb_base import (
|
||||
NWBData,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
ProcessingModule,
|
||||
TimeSeries,
|
||||
Images,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.6.0-alpha"
|
||||
|
@ -157,21 +70,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,30 +5,12 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from ...core.v2_6_0_alpha.core_nwb_device import Device
|
||||
from ...core.v2_6_0_alpha.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
ImageReferences,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
NWBContainer,
|
||||
TimeSeriesReferenceVectorData,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
|
@ -41,6 +23,13 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
DynamicTable,
|
||||
VectorIndex,
|
||||
VectorData,
|
||||
AlignedDynamicTable,
|
||||
DynamicTableRegion,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.6.0-alpha"
|
||||
|
@ -83,7 +72,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -7,32 +7,13 @@ import sys
|
|||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator
|
||||
import numpy as np
|
||||
from ...core.v2_6_0_alpha.core_nwb_device import Device
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...core.v2_6_0_alpha.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
ImageReferences,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.6.0-alpha"
|
||||
|
@ -71,21 +52,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -66,7 +66,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -52,21 +52,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
|
@ -5,41 +5,6 @@ from enum import Enum
|
|||
import re
|
||||
import sys
|
||||
import numpy as np
|
||||
from ...core.v2_6_0_alpha.core_nwb_device import Device
|
||||
from ...core.v2_6_0_alpha.core_nwb_base import (
|
||||
NWBData,
|
||||
TimeSeriesReferenceVectorData,
|
||||
Image,
|
||||
ImageReferences,
|
||||
NWBContainer,
|
||||
NWBDataInterface,
|
||||
TimeSeries,
|
||||
TimeSeriesData,
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
ProcessingModule,
|
||||
Images,
|
||||
)
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_sparse import CSRMatrix, CSRMatrixData
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_base import Data, Container, SimpleMultiContainer
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
VectorData,
|
||||
VectorIndex,
|
||||
ElementIdentifiers,
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
AlignedDynamicTable,
|
||||
)
|
||||
from ...core.v2_6_0_alpha.core_nwb_image import (
|
||||
GrayscaleImage,
|
||||
RGBImage,
|
||||
RGBAImage,
|
||||
ImageSeries,
|
||||
ImageSeriesExternalFile,
|
||||
ImageMaskSeries,
|
||||
OpticalSeries,
|
||||
IndexSeries,
|
||||
)
|
||||
from typing import Any, ClassVar, List, Literal, Dict, Optional, Union, Annotated, Type, TypeVar
|
||||
from pydantic import (
|
||||
BaseModel,
|
||||
|
@ -51,6 +16,20 @@ from pydantic import (
|
|||
BeforeValidator,
|
||||
)
|
||||
from numpydantic import NDArray, Shape
|
||||
from ...hdmf_common.v1_5_0.hdmf_common_table import (
|
||||
DynamicTableRegion,
|
||||
DynamicTable,
|
||||
VectorIndex,
|
||||
VectorData,
|
||||
)
|
||||
from ...core.v2_6_0_alpha.core_nwb_image import ImageSeries, ImageSeriesExternalFile
|
||||
from ...core.v2_6_0_alpha.core_nwb_base import (
|
||||
TimeSeriesStartingTime,
|
||||
TimeSeriesSync,
|
||||
TimeSeries,
|
||||
NWBDataInterface,
|
||||
NWBContainer,
|
||||
)
|
||||
|
||||
metamodel_version = "None"
|
||||
version = "2.6.0-alpha"
|
||||
|
@ -93,7 +72,8 @@ NUMPYDANTIC_VERSION = "1.2.1"
|
|||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
def _get_name(item: ModelType | dict, info: ValidationInfo) -> Union[ModelType, dict]:
|
||||
"""Get the name of the slot that refers to this object"""
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
|
|
|
@ -47,21 +47,6 @@ class LinkMLMeta(RootModel):
|
|||
|
||||
|
||||
NUMPYDANTIC_VERSION = "1.2.1"
|
||||
|
||||
ModelType = TypeVar("ModelType", bound=Type[BaseModel])
|
||||
|
||||
|
||||
def _get_name(item: BaseModel | dict, info: ValidationInfo):
|
||||
assert isinstance(item, (BaseModel, dict))
|
||||
name = info.field_name
|
||||
if isinstance(item, BaseModel):
|
||||
item.name = name
|
||||
else:
|
||||
item["name"] = name
|
||||
return item
|
||||
|
||||
|
||||
Named = Annotated[ModelType, BeforeValidator(_get_name)]
|
||||
linkml_meta = LinkMLMeta(
|
||||
{
|
||||
"annotations": {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue