From 03f7f43adeccba1893356cfcc85814849332e821 Mon Sep 17 00:00:00 2001 From: mbstadler Date: Fri, 10 Jan 2025 09:26:26 +0100 Subject: [PATCH 1/2] bump version to 0.4.0 Co-authored-by: Charlotte Soneson Co-authored-by: Michael Stadler --- pyproject.toml | 2 +- src/ez_zarr/__init__.py | 2 +- src/ez_zarr/ome_zarr.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5acfdb8..1e79986 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" [project] name = "ez_zarr" -version = "0.3.5" +version = "0.4.0" description = "Give easy, high-level access to ome-zarr filesets." readme = { file = "README.md", content-type = "text/markdown" } authors = [ diff --git a/src/ez_zarr/__init__.py b/src/ez_zarr/__init__.py index a6d99e7..c9291fc 100644 --- a/src/ez_zarr/__init__.py +++ b/src/ez_zarr/__init__.py @@ -1,2 +1,2 @@ -__version__ = '0.3.5' +__version__ = '0.4.0' __author__ = 'Silvia Barbiero, Michael Stadler, Charlotte Soneson' diff --git a/src/ez_zarr/ome_zarr.py b/src/ez_zarr/ome_zarr.py index 2b27b83..8bb7166 100644 --- a/src/ez_zarr/ome_zarr.py +++ b/src/ez_zarr/ome_zarr.py @@ -9,7 +9,7 @@ __all__ = ['Image', 'ImageList', 'create_name_row_col', 'create_name_plate_A01', 'import_plate'] -__version__ = '0.3.5' +__version__ = '0.4.0' __author__ = 'Silvia Barbiero, Michael Stadler, Charlotte Soneson' From f3e06e760b71efc845c6535bd122178ec6f0df89 Mon Sep 17 00:00:00 2001 From: mbstadler Date: Fri, 10 Jan 2025 09:27:32 +0100 Subject: [PATCH 2/2] use zarr_group['key'] instead of zarr_group.key (update to zarr v3) Co-authored-by: Charlotte Soneson Co-authored-by: Michael Stadler --- src/ez_zarr/ome_zarr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ez_zarr/ome_zarr.py b/src/ez_zarr/ome_zarr.py index 8bb7166..eae66ba 100644 --- a/src/ez_zarr/ome_zarr.py +++ b/src/ez_zarr/ome_zarr.py @@ -175,10 +175,10 @@ def __init__(self, path: str, self.ndim = self.array_dict[list(self.array_dict.keys())[0]].ndim self.label_names = [] if 'labels' in list(self.zarr_group.group_keys()): - self.label_names = [x for x in self.zarr_group.labels.group_keys()] + self.label_names = [x for x in self.zarr_group['labels'].group_keys()] self.table_names = [] if 'tables' in list(self.zarr_group.group_keys()): - self.table_names = [x for x in self.zarr_group.tables.group_keys()] + self.table_names = [x for x in self.zarr_group['tables'].group_keys()] if not skip_checks: # make sure that it does not contain any further groups @@ -190,7 +190,7 @@ def __init__(self, path: str, raise ValueError(f"{self.path} does not contain a 'multiscales' attribute") # ... load multiscales dictionaries self.multiscales_image: dict[str, Any] = self._load_multiscale_info(self.zarr_group, skip_checks) - self.multiscales_labels: dict[str, dict[str, Any]] = {x: self._load_multiscale_info(self.zarr_group.labels[x], skip_checks) for x in self.label_names} + self.multiscales_labels: dict[str, dict[str, Any]] = {x: self._load_multiscale_info(self.zarr_group['labels'][x], skip_checks) for x in self.label_names} # ... extract pyramid levels by decreasing resolution self.pyramid_levels_image: list[str] = Image._extract_paths_by_decreasing_resolution(self.multiscales_image['datasets']) self.pyramid_levels_labels: dict[str, list[str]] = {x: Image._extract_paths_by_decreasing_resolution(self.multiscales_labels[x]['datasets']) for x in self.label_names}