diff --git a/src/hdmf_zarr/zarr_utils.py b/src/hdmf_zarr/zarr_utils.py index 3e7e649a..b9f8fef9 100644 --- a/src/hdmf_zarr/zarr_utils.py +++ b/src/hdmf_zarr/zarr_utils.py @@ -34,6 +34,9 @@ class ZarrDataset(HDMFDataset): + """ + Extension of HDMFDataset to add Zarr compatibility + """ @docval({'name': 'dataset', 'type': (np.ndarray, ZarrArray, Array), 'doc': 'the Zarr file lazily evaluate'}, {'name': 'io', 'type': 'ZarrIO', 'doc': 'the IO object that was used to read the underlying dataset'}) def __init__(self, **kwargs): @@ -104,7 +107,7 @@ def get_object(self, zarr_obj): class ContainerResolverMixin(ContainerResolver): # refactor to backend/utils.py """ - A mixin for adding to Zarr reference-resolving types + A mixin for adding to Zarr reference-resolvinAbstractZarrReferenceDatasetg types the get_object method that returns Containers """ @@ -116,7 +119,10 @@ def get_object(self, zarr_obj): class AbstractZarrTableDataset(DatasetOfReferences): # Table refers to compound dataset - + """ + Extension of DatasetOfReferences to serve as the base class for resolving Zarr + references in compound datasets to either Builders and Containers. + """ @docval({'name': 'dataset', 'type': (np.ndarray, ZarrArray, Array), 'doc': 'the Zarr file lazily evaluate'}, {'name': 'io', 'type': 'ZarrIO', 'doc': 'the IO object that was used to read the underlying dataset'}, {'name': 'types', 'type': (list, tuple), @@ -150,8 +156,9 @@ def __init__(self, **kwargs): t = sub.metadata['ref'] if t is Reference: tmp.append('object') - elif t is RegionReference: - tmp.append('region') + # elif t is RegionReference: + # tmp.append('region') + # TODO: Region References are not yet supported else: tmp.append(sub.type.__name__) self.__dtype = tmp @@ -197,7 +204,10 @@ def __iter__(self): class AbstractZarrReferenceDataset(DatasetOfReferences): - + """ + Extension of DatasetOfReferences to serve as the base class for resolving Zarr + references in datasets to either Builders and Containers. + """ def __getitem__(self, arg): ref = super().__getitem__(arg) if isinstance(ref, np.ndarray): @@ -211,7 +221,12 @@ def dtype(self): class AbstractZarrRegionDataset(AbstractZarrReferenceDataset): + """ + Extension of DatasetOfReferences to serve as the base class for resolving Zarr + references in datasets to either Builders and Containers. + Note: Region References are not yet supported. + """ def __getitem__(self, arg): obj = super().__getitem__(arg) ref = self.dataset[arg] @@ -270,6 +285,8 @@ class ContainerZarrRegionDataset(ContainerResolverMixin, AbstractZarrRegionDatas """ A reference-resolving dataset for resolving region references that returns resolved references as Containers + + Note: Region References are not yet supported. """ @classmethod @@ -280,7 +297,9 @@ def get_inverse_class(cls): class BuilderZarrRegionDataset(BuilderResolverMixin, AbstractZarrRegionDataset): """ A reference-resolving dataset for resolving region references that returns - resolved references as Builders + resolved references as Builders. + + Note: Region References are not yet supported. """ @classmethod