From 66d7730a97daec15d04ba5fbdfd7bcf2cdb44c14 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 21 Nov 2024 14:14:30 +0100 Subject: [PATCH 1/3] Move model namespace --- docs/tutorial.py | 2 +- src/ome_zarr_models/v04/__init__.py | 8 ++++++++ src/ome_zarr_models/v04/{models => }/axes.py | 0 .../v04/{models => }/coordinate_transformations.py | 0 src/ome_zarr_models/v04/{models => }/labels.py | 0 src/ome_zarr_models/v04/models/__init__.py | 3 --- src/ome_zarr_models/v04/{models => }/multiscales.py | 0 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 10 files changed, 9 insertions(+), 4 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 (100%) delete mode 100644 src/ome_zarr_models/v04/models/__init__.py rename src/ome_zarr_models/v04/{models => }/multiscales.py (100%) 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/docs/tutorial.py b/docs/tutorial.py index 3c57cb5..504db37 100644 --- a/docs/tutorial.py +++ b/docs/tutorial.py @@ -1,6 +1,6 @@ # # Tutorial -# from ome_zarr_models.v04 import Image as OMEZarrImage +from ome_zarr_models.v04.models # my_image = OMEZarrImage(path="path/to/ome/zarr/directory.ome.zarr") # print(my_image.multiscales) diff --git a/src/ome_zarr_models/v04/__init__.py b/src/ome_zarr_models/v04/__init__.py new file mode 100644 index 0000000..a142193 --- /dev/null +++ b/src/ome_zarr_models/v04/__init__.py @@ -0,0 +1,8 @@ +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 100% rename from src/ome_zarr_models/v04/models/labels.py rename to src/ome_zarr_models/v04/labels.py 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 100% rename from src/ome_zarr_models/v04/models/multiscales.py rename to src/ome_zarr_models/v04/multiscales.py 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 From fb0bc73bb84aacf96698ca4c1b0ce829b59f380e Mon Sep 17 00:00:00 2001 From: Davis Vann Bennett Date: Thu, 21 Nov 2024 15:15:06 +0100 Subject: [PATCH 2/3] bump min python --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c9e40d5..75f576d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "ome-zarr-models" dynamic = ["version"] description = "Data models for OME-Zarr" readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" dependencies = [] [project.optional-dependencies] From 7b96f0018a4d54e32e37f26e20d9ed3836b35514 Mon Sep 17 00:00:00 2001 From: Davis Vann Bennett Date: Thu, 21 Nov 2024 15:28:03 +0100 Subject: [PATCH 3/3] revert changes to docs --- docs/tutorial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.py b/docs/tutorial.py index 90285fe..0c043da 100644 --- a/docs/tutorial.py +++ b/docs/tutorial.py @@ -1,6 +1,6 @@ # # Tutorial -from ome_zarr_models.v04.models +# from ome_zarr_models.v04 import Image as OMEZarrImage # my_image = OMEZarrImage(path="path/to/ome/zarr/directory.ome.zarr") # print(my_image.multiscales)