change zarr_read_kwargs to mode argument#12205
Conversation
|
I did remove |
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 0 tests ±0 0 ✅ ±0 0s ⏱️ ±0s Results for commit e6bb507. ± Comparison against base commit 6dff73f. ♻️ This comment has been updated with latest results. |
jacobtomlinson
left a comment
There was a problem hiding this comment.
Thanks for picking this up. I'm not concerned about a deprecation given this was only merged recently, the impact will be very low.
I'd appreciate a review from someone with zarr knowledge like @dcherian @d-v-b @TomAugspurger
|
@melonora I think that this change is good but I wonder if you actually need to deprecate It seems like now the kwargs are actually being used as documented. That and just passing keyword arguments is cleaner than creating a dict. |
|
That would indeed not be required. It could be unpacked with that name though just for more clarity and I wiuld also update the docstring with the actual documentation links. I do not have access to my pc at the moment, but will do so later |
1 similar comment
This comment was marked as duplicate.
This comment was marked as duplicate.
|
@CSSFrancis changes have been performed |
|
@jacobtomlinson Do you see any further action points for me to do in this PR? |
|
FYI @will-moore |
|
@TomAugspurger Do you think this PR is good to go so it could be included in the first release of 2026? |
|
Let's get this or #12233 in today (cc @joshua-gould). Anybody mind summarizing the differences? My main goal is to ensure that code from dask<=2025.11.0 continues to work. If we can also make code from dask==2025.12.0 then great, but IMO that's secondary. |
|
@TomAugspurger in #12333 |
|
Sorry, I'm finding it a bit hard to follow all the changes :/ Does this come down to fundamental ambiguity / disagreements over what |
|
@TomAugspurger if you would like we could have a quick minicall (15 min would be enough). But in short yes, in the othere PR the read arguments get mixed with the actual However, this PR is not fully backward compatible as far as I am aware if somebody was passing on |
|
@TomAugspurger I will try to be there with the next community meeting if that is more suitable. I saw that 2026.1.0 got released, but I think it would be good to get this in sooner rather than later given the API change. We don't want people to adopt the current API too much if it gets switched back to |
|
The change that required usage of This was fixed in ome/ome-zarr-py#511 but hasn't been released yet, so it's possible that some users could be writing invalid OME-Zarr now. |
|
@will-moore yes, working on |
|
@will-moore note that that change regarding "dimension_names" is only when writing |
|
Thanks @melonora. Last request: can you add a note to the changelog with a summary of the changes here. I want to provide clear guidance to users about what they need to do, depending on their version of dask. |
|
Of course, will add it when I get to my laptop |
|
@TomAugspurger Done, can you please let me know if it is clear to you? |
mydask.html
Outdated
There was a problem hiding this comment.
Remove this (I should be able to, after reviewing).
|
Thanks @melonora. @joshua-gould are you able to check whether this fixes the issue you ran into? |
This fixes my issue, thanks. |
Great! |
|
Thanks I’ll try to get this released next week. |
|
Thanks @TomAugspurger ! |
pre-commit run --all-filesWith #12153 I forgot to update one warning. Based on issue #12204 I went back to the code state before this PR to check whether
zarr_read_kwargsis indeed the correct argument to use from now on. The problem was that**kwargswas not only used forzarr.createas stated in the docstring back then. It was also use when creating astorefrom a url. This could involve bothread_onlyandmodearguments. Havingread_onlydoes not make sense to me when writing so in this PR I added an argumentmodeand removezarr_read_kwargs.I also added some checks for
mode. Moderwill throw an error. Ifmode=="w"then theoverwriteargument forzarr.create_arrayorzarr.createwill be set toTrue. Interestingly with a sharded array and if an array is already stored at the location, this will cause a checksum error whenlock==False. I am not certain yet whether this is a bug in zarr. For nowlock==Truewhenmode=="w"prevents the issue.@jacobtomlinson @CSSFrancis @thewtex @jo-mueller