From 968f1bda72fbaa0266dd4932021c136d10e32a09 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 27 Nov 2024 22:09:14 +0000 Subject: [PATCH] Make imagespec private --- src/ome_zarr_models/v04/image.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ome_zarr_models/v04/image.py b/src/ome_zarr_models/v04/image.py index b604a9a..1d5832a 100644 --- a/src/ome_zarr_models/v04/image.py +++ b/src/ome_zarr_models/v04/image.py @@ -14,7 +14,7 @@ # Image is imported to the `ome_zarr_py.v04` namespace, so not # listed here -__all__ = ["ImageAttrs"] +__all__ = ["ImageAttrs", "Image"] def _check_arrays_compatible(data: Image) -> Image: @@ -79,7 +79,7 @@ class ImageAttrs(Base): # series MUST have the same number of entries." -class ImageSpec(GroupSpec[ImageAttrs, ArraySpec | GroupSpec]): +class _ImageSpec(GroupSpec[ImageAttrs, ArraySpec | GroupSpec]): _check_arrays_compatible = model_validator(mode="after")(_check_arrays_compatible) @@ -92,7 +92,7 @@ def __init__(self, group: zarr.Group) -> None: self._spec = self._get_spec(group) self._group = group - def _get_spec(self, node: zarr.Group) -> ImageSpec: + def _get_spec(self, node: zarr.Group) -> _ImageSpec: """ Create an instance of an OME-zarr image from a `zarr.Group`. @@ -141,7 +141,7 @@ def _get_spec(self, node: zarr.Group) -> ImageSpec: guess_inferred_members = guess.model_copy( update={"members": members_normalized.members} ) - return ImageSpec(**guess_inferred_members.model_dump()) + return _ImageSpec(**guess_inferred_members.model_dump()) @property def arrays(self) -> zarr.Group: