Skip to content

Commit

Permalink
Make imagespec private
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Dec 1, 2024
1 parent 254997a commit 968f1bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ome_zarr_models/v04/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)


Expand All @@ -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`.
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 968f1bd

Please sign in to comment.