From e0784a9c9e0ae4893f380c2634ef844152ae3dd3 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 21 Nov 2024 14:18:27 +0100 Subject: [PATCH] Move model namespace --- src/ome_zarr_models/v04/__init__.py | 12 ++++++++++++ src/ome_zarr_models/v04/{models => }/axes.py | 0 .../v04/{models => }/coordinate_transformations.py | 0 src/ome_zarr_models/v04/{models => }/labels.py | 2 +- src/ome_zarr_models/v04/models/__init__.py | 3 --- src/ome_zarr_models/v04/{models => }/multiscales.py | 6 +++--- src/ome_zarr_models/v04/{models => }/omero.py | 0 src/ome_zarr_models/v04/{models => }/plate.py | 0 src/ome_zarr_models/v04/{models => }/well.py | 0 9 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 src/ome_zarr_models/v04/__init__.py rename src/ome_zarr_models/v04/{models => }/axes.py (100%) rename src/ome_zarr_models/v04/{models => }/coordinate_transformations.py (100%) rename src/ome_zarr_models/v04/{models => }/labels.py (98%) delete mode 100644 src/ome_zarr_models/v04/models/__init__.py rename src/ome_zarr_models/v04/{models => }/multiscales.py (91%) rename src/ome_zarr_models/v04/{models => }/omero.py (100%) rename src/ome_zarr_models/v04/{models => }/plate.py (100%) rename src/ome_zarr_models/v04/{models => }/well.py (100%) diff --git a/src/ome_zarr_models/v04/__init__.py b/src/ome_zarr_models/v04/__init__.py new file mode 100644 index 0000000..1c594f2 --- /dev/null +++ b/src/ome_zarr_models/v04/__init__.py @@ -0,0 +1,12 @@ +from ome_zarr_models.v04.axes import Axis +from ome_zarr_models.v04.coordinate_transformations import ( + PathScale, + PathTranslation, + VectorScale, + VectorTranslation, +) +from ome_zarr_models.v04.multiscales import ( + Dataset, + Multiscale, + MultiscaleGroupAttrs, +) diff --git a/src/ome_zarr_models/v04/models/axes.py b/src/ome_zarr_models/v04/axes.py similarity index 100% rename from src/ome_zarr_models/v04/models/axes.py rename to src/ome_zarr_models/v04/axes.py diff --git a/src/ome_zarr_models/v04/models/coordinate_transformations.py b/src/ome_zarr_models/v04/coordinate_transformations.py similarity index 100% rename from src/ome_zarr_models/v04/models/coordinate_transformations.py rename to src/ome_zarr_models/v04/coordinate_transformations.py diff --git a/src/ome_zarr_models/v04/models/labels.py b/src/ome_zarr_models/v04/labels.py similarity index 98% rename from src/ome_zarr_models/v04/models/labels.py rename to src/ome_zarr_models/v04/labels.py index d23008e..2f068bd 100644 --- a/src/ome_zarr_models/v04/models/labels.py +++ b/src/ome_zarr_models/v04/labels.py @@ -3,7 +3,7 @@ import warnings from typing import Annotated, Counter, Hashable, Iterable, Literal from pydantic import AfterValidator, Field, model_validator -from ome_zarr_models.v04.models.multiscales import MultiscaleGroupAttrs +from ome_zarr_models.v04.multiscales import MultiscaleGroupAttrs from ome_zarr_models.base import Base ConInt = Annotated[int, Field(strict=True, ge=0, le=255)] diff --git a/src/ome_zarr_models/v04/models/__init__.py b/src/ome_zarr_models/v04/models/__init__.py deleted file mode 100644 index c739f42..0000000 --- a/src/ome_zarr_models/v04/models/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from ome_zarr_models.v04.models.axes import Axis -from ome_zarr_models.v04.models.coordinate_transformations import PathScale, PathTranslation, VectorScale, VectorTranslation -from ome_zarr_models.v04.models.multiscales import Dataset, Multiscale, MultiscaleGroupAttrs \ No newline at end of file diff --git a/src/ome_zarr_models/v04/models/multiscales.py b/src/ome_zarr_models/v04/multiscales.py similarity index 91% rename from src/ome_zarr_models/v04/models/multiscales.py rename to src/ome_zarr_models/v04/multiscales.py index 03703e6..73a61f2 100644 --- a/src/ome_zarr_models/v04/models/multiscales.py +++ b/src/ome_zarr_models/v04/multiscales.py @@ -1,8 +1,8 @@ from typing import Any from ome_zarr_models.base import Base from ome_zarr_models.utils import unique_items_validator -from ome_zarr_models.v04.models.axes import Axis -from ome_zarr_models.v04.models.coordinate_transformations import ( +from ome_zarr_models.v04.axes import Axis +from ome_zarr_models.v04.coordinate_transformations import ( PathScale, PathTranslation, VectorScale, @@ -11,7 +11,7 @@ from pydantic import Field, field_validator -from ome_zarr_models.v04.models.omero import Omero +from ome_zarr_models.v04.omero import Omero class Dataset(Base): diff --git a/src/ome_zarr_models/v04/models/omero.py b/src/ome_zarr_models/v04/omero.py similarity index 100% rename from src/ome_zarr_models/v04/models/omero.py rename to src/ome_zarr_models/v04/omero.py diff --git a/src/ome_zarr_models/v04/models/plate.py b/src/ome_zarr_models/v04/plate.py similarity index 100% rename from src/ome_zarr_models/v04/models/plate.py rename to src/ome_zarr_models/v04/plate.py diff --git a/src/ome_zarr_models/v04/models/well.py b/src/ome_zarr_models/v04/well.py similarity index 100% rename from src/ome_zarr_models/v04/models/well.py rename to src/ome_zarr_models/v04/well.py