Skip to content

Upgrade zarr-python dependency to 3.0#275

Merged
ziw-liu merged 21 commits intozarr3-devfrom
273-use-zarr-python-3
May 19, 2025
Merged

Upgrade zarr-python dependency to 3.0#275
ziw-liu merged 21 commits intozarr3-devfrom
273-use-zarr-python-3

Conversation

@aliddell
Copy link
Copy Markdown
Collaborator

@aliddell aliddell commented Mar 3, 2025

No description provided.

@aliddell aliddell linked an issue Mar 3, 2025 that may be closed by this pull request
@aliddell aliddell requested a review from ziw-liu March 3, 2025 21:07
@ziw-liu ziw-liu added NGFF maintenance Project tooling, config, dependencies, build system labels Mar 4, 2025
@ziw-liu ziw-liu added this to the 0.3.0 milestone Mar 4, 2025
@ziw-liu
Copy link
Copy Markdown
Contributor

ziw-liu commented Mar 4, 2025

@aliddell I noticed that your editor uses 8-spaces indentation. We use black-format and 4-space indentation in this repo. Please see the contributing guide for information about setting up the styling and linting tools.

Comment thread iohub/ngff/nodes.py
**self._create_compressor_options(chunks),
)
)
img_arr[...] = data
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breakage seems unintended from upstream discussion. We can revert after zarr-developers/zarr-python#2819 is released.

@aliddell
Copy link
Copy Markdown
Collaborator Author

aliddell commented Mar 11, 2025

We still have 592 591 tests failing. Of those, 589 are showing the same error

TypeError: Unsupported type for store_like: 'ZarrTiffStore'

which looks like an internal issue in tifffile. Two more (both variants of test_cli_convert_ome_tiff) are failing, also due to tifffile, e.g.,

E       AssertionError: 
E       assert 1 == 0
E        +  where 1 = <Result TypeError("Unsupported type for store_like: 'ZarrTiffStore'")>.exit_code

which just leaves one failing test, test_rename_wells, which is what was failing just before I left. This is fixed as of 61045d4.

There are likely references to the NGFF version that don't handle "0.5" or have it as an option. That needs tests.

@ziw-liu
Copy link
Copy Markdown
Contributor

ziw-liu commented Mar 11, 2025

Thanks @aliddell! I believe the tifffile error is due to how zarr changed its interface to implement third-party storage types. We either need to wait for cgohlke/tifffile#282 or change the way we implement OME-TIFF support. However I think it's a relatively self-contained issue, and as long as the OME-Zarr part is migrated, we can continue to work on bridging acquire-zarr and iohub via Zarr v3/OME-Zarr v0.5.

Comment thread iohub/_deprecated/zarrfile.py
ziw-liu added 7 commits April 4, 2025 13:49
* use fsspec as a wrapper for ZarrTiffStore

* update deprecated readers and tests

* document the helper function

* add back the binary check after a flag

* use kwarg for file mode in reader

* restore dtype attribute

* restore opening zarr with dask

* stringify path name

* remove redundant dtype
it doesn't matter what the order is
Comment thread tests/ngff/test_ngff.py Outdated
@ziw-liu ziw-liu marked this pull request as ready for review April 4, 2025 21:26
@JoOkuma JoOkuma mentioned this pull request Apr 4, 2025
Comment thread iohub/ngff/nodes.py
>>> new_plate = Plate.from_positions("combined.zarr", fovs)
"""
# TODO: remove when zarr-python adds back `copy_store`
raise NotImplementedError(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocked by upstream regression zarr-developers/zarr-python#2407

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracked in #300.

@ziw-liu ziw-liu changed the base branch from main to zarr3-dev May 19, 2025 18:32
Copy link
Copy Markdown
Contributor

@ziw-liu ziw-liu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will use a dev branch for now to contain the user-facing changes given the upstream constraints.

@ziw-liu ziw-liu merged commit 88f90cf into zarr3-dev May 19, 2025
7 checks passed
@ziw-liu ziw-liu deleted the 273-use-zarr-python-3 branch May 19, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Project tooling, config, dependencies, build system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use zarr-python 3

2 participants