Skip to content

chore: handle new zarr dtype API #100

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

Merged
merged 7 commits into from
Jul 15, 2025
Merged

chore: handle new zarr dtype API #100

merged 7 commits into from
Jul 15, 2025

Conversation

ilan-gold
Copy link
Collaborator

@ilan-gold ilan-gold commented Jun 23, 2025

Towards handling zarr-developers/zarr-python#2874

I slimmed down the tests that only test for metadata and don't actually go beyond pipeline creation in b9116f5. I kept the tests that don't pass through the rust, but still need redirection (structured data types, vlen strings etc.) because I think

(a) we may in theory support them at some point and
(b) it does touch the pipeline code, if only somewhat minimally. And at the end of the day, we are promising roundtripping with those types, even if it is just a "fallback."

I would also make this round of updates a 0.2 release (incl. #103 and #104 in theory as well).

@d-v-b
Copy link

d-v-b commented Jun 23, 2025

i hope it's not a terrible experience!

@ilan-gold
Copy link
Collaborator Author

So far, it was not so bad to get the tests to "pass" but now I want to see what we lost/gained in terms of coverage :)

tests/test_v2.py Outdated
) -> None:
with config.set(
{
"array.v2_default_filters.bytes": [{"id": "vlen-bytes"}],
"array.v2_default_compressor.bytes": None,
}
):
store = zarr.storage.LocalStore(tmp_path)
store = zarr.storage.MemoryStore()
Copy link
Collaborator Author

@ilan-gold ilan-gold Jun 23, 2025

Choose a reason for hiding this comment

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

So this "passes" in so far as it gets caught by our dtype check for things currently unhandled by rust (normally MemoryStore would error when it hits the rust code). I think there could be some value in removing some of these tests to make it clear what we are testing for. I think this suite was a good start because it told us "do things work or not" which was a concern for a while, but I think the package may be sufficiently hardened and behavior clarified that we could cut away some of these sorts of tests that don't actually pass through the rust code.

@ilan-gold ilan-gold changed the title (chore): handle new zarr dtype API chore: handle new zarr dtype API Jul 15, 2025
@ilan-gold ilan-gold requested a review from LDeakin July 15, 2025 10:17
@ilan-gold ilan-gold marked this pull request as ready for review July 15, 2025 10:17
@ilan-gold ilan-gold merged commit 51664a7 into main Jul 15, 2025
16 checks passed
@ilan-gold ilan-gold deleted the ig/zarr_python_new_dtypes branch July 15, 2025 12:18
@ilan-gold
Copy link
Collaborator Author

Also tested against anndata's tests with 3.1 and everything passes (except tests not involving local stores)

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

Successfully merging this pull request may close these issues.

3 participants