Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking 3.0 Release Blockers #2412

Open
28 of 34 tasks
jhamman opened this issue Oct 18, 2024 · 7 comments
Open
28 of 34 tasks

Tracking 3.0 Release Blockers #2412

jhamman opened this issue Oct 18, 2024 · 7 comments
Milestone

Comments

@jhamman
Copy link
Member

jhamman commented Oct 18, 2024

We are now in the last mile of the 3.0 refactor. This issue is tracking what we are considering release blockers: There is also a milestone for After 3.0.0 where we are putting tickets that can come later.

Docs

Array

Group

Top level API

Store API

Testing / CI

This is non exhaustive but these are the major known issues. Feel free to post additional tickets and we can evaluate if they are really blockers.

@jhamman jhamman added the V3 label Oct 18, 2024
@jhamman jhamman added this to the 3.0.0 milestone Oct 18, 2024
@jhamman jhamman pinned this issue Oct 18, 2024
@DimitriPapadopoulos
Copy link
Contributor

@will-moore
Copy link

Hi,
Thanks for all the work towards v3.
I wanted to check if this is a blocker / existing issue etc or if I should create one...?
This is using main branch 680142f :

import zarr
from zarr.storage import LocalStore

path = "root.zarr"
fmt = 2
store = LocalStore(path, mode="w")
root = zarr.group(store=store, zarr_format=fmt)

root_group = zarr.open(f"{path}", zarr_format=fmt)

Gives me:

$ python test_open_v2_group.py 
Traceback (most recent call last):
  File "/Users/wmoore/Desktop/ZARR/ome-zarr-py/test_open_v2_group.py", line 48, in <module>
    root_group = zarr.open(f"{path}", zarr_format=fmt)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/_compat.py", line 43, in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/api/synchronous.py", line 77, in open
    obj = sync(
          ^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/core/sync.py", line 141, in sync
    raise return_result
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/core/sync.py", line 100, in _runner
    return await coro
           ^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/api/asynchronous.py", line 308, in open
    return await open_array(store=store_path, zarr_format=zarr_format, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/api/asynchronous.py", line 1077, in open_array
    return await AsyncArray.open(store_path, zarr_format=zarr_format)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/core/array.py", line 680, in open
    metadata_dict = await get_array_metadata(store_path, zarr_format=zarr_format)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/core/array.py", line 135, in get_array_metadata
    raise FileNotFoundError(store_path)
FileNotFoundError: file://root.zarr

@d-v-b
Copy link
Contributor

d-v-b commented Nov 7, 2024

Hi, Thanks for all the work towards v3. I wanted to check if this is a blocker / existing issue etc or if I should create one...? This is using main branch 680142f :

import zarr
from zarr.storage import LocalStore

path = "root.zarr"
fmt = 2
store = LocalStore(path, mode="w")
root = zarr.group(store=store, zarr_format=fmt)

root_group = zarr.open(f"{path}", zarr_format=fmt)

Gives me:

$ python test_open_v2_group.py 
Traceback (most recent call last):
  File "/Users/wmoore/Desktop/ZARR/ome-zarr-py/test_open_v2_group.py", line 48, in <module>
    root_group = zarr.open(f"{path}", zarr_format=fmt)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/_compat.py", line 43, in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/api/synchronous.py", line 77, in open
    obj = sync(
          ^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/core/sync.py", line 141, in sync
    raise return_result
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/core/sync.py", line 100, in _runner
    return await coro
           ^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/api/asynchronous.py", line 308, in open
    return await open_array(store=store_path, zarr_format=zarr_format, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/api/asynchronous.py", line 1077, in open_array
    return await AsyncArray.open(store_path, zarr_format=zarr_format)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/core/array.py", line 680, in open
    metadata_dict = await get_array_metadata(store_path, zarr_format=zarr_format)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/core/array.py", line 135, in get_array_metadata
    raise FileNotFoundError(store_path)
FileNotFoundError: file://root.zarr

It looks like you are not passing the store instance to zarr.open. Does
root_group = zarr.open(store, path=path, zarr_format=fmt) work?

@will-moore
Copy link

If I pass in both the store and the path, it fails with FileNotFoundError: file://root.zarr/root.zarr, so it looks like I don't need both? It also seems I want to create a store with read mode. But this is still failing (but works with fmt = 3)...

read_store = LocalStore(path)
root_group = zarr.open(read_store, zarr_format=fmt)
FileNotFoundError: file://root.zarr
$ python test_open_v2_group.py 
Traceback (most recent call last):
  File "/Users/wmoore/Desktop/ZARR/ome-zarr-py/test_open_v2_group.py", line 49, in <module>
    root_group = zarr.open(read_store, zarr_format=fmt)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/_compat.py", line 43, in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/api/synchronous.py", line 77, in open
    obj = sync(
          ^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/core/sync.py", line 141, in sync
    raise return_result
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/core/sync.py", line 100, in _runner
    return await coro
           ^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/api/asynchronous.py", line 308, in open
    return await open_array(store=store_path, zarr_format=zarr_format, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/api/asynchronous.py", line 1077, in open_array
    return await AsyncArray.open(store_path, zarr_format=zarr_format)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/core/array.py", line 680, in open
    metadata_dict = await get_array_metadata(store_path, zarr_format=zarr_format)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/wmoore/Desktop/ZARR_PYTHON/zarr-python/src/zarr/core/array.py", line 135, in get_array_metadata
    raise FileNotFoundError(store_path)
FileNotFoundError: file://root.zarr

@d-v-b
Copy link
Contributor

d-v-b commented Nov 7, 2024

ugh, this flow should definitely be super easy, sorry that it's not working. If I have some time tonight I will dig into this.

@will-moore
Copy link

@d-v-b with this change, that test passes for me and fixes about 100 failing tests at ome/ome-zarr-py#404

diff --git a/src/zarr/api/asynchronous.py b/src/zarr/api/asynchronous.py
index 40f9b8d5..8dc69250 100644
--- a/src/zarr/api/asynchronous.py
+++ b/src/zarr/api/asynchronous.py
@@ -306,7 +306,7 @@ async def open(
 
     try:
         return await open_array(store=store_path, zarr_format=zarr_format, **kwargs)
-    except (KeyError, NodeTypeValidationError):
+    except (KeyError, NodeTypeValidationError, FileNotFoundError):
         # KeyError for a missing key
         # NodeTypeValidationError for failing to parse node metadata as an array when it's
         # actually a group

@maxrjones
Copy link
Member

maxrjones commented Dec 19, 2024

Thanks for all your work on Zarr Python 3.0!

I know this is truly the last quarter mile (or km) before v3.0 and apologize for being so last minute, but since this is the last shot for potential user facing API changes I wanted to promote #2437 as something to settle before the release. In particular, I think it's important to make an explicit decision on whether the tuple(int, int) representation will remain (start, length) vs (start, stop) and whether suffix requests should be denoted by negative integers vs. a typed dict. If people are open to following the same approach as Kyle proposes in #2437 (comment), I would be glad to try implementing this suggestion over the holidays to ensure there are no severe memory/time consequences. I'm +1 on Kyle's idea based on the number of people who have misunderstood the current semantics and the apparent negligible performance impact of more intuitive typing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

6 participants