Skip to content

Conversation

@rwegener2
Copy link

@rwegener2 rwegener2 commented Dec 14, 2024

What has been built?

This PR adds an integration test to test reading and writing xarray data in zarr. Works toward #2185

How was it done?

A new file test_xarray.py was added that includes

  1. A fixture which generates an xarray object
  2. A test which tests 4 common compressors on v2 zarr

A new environment called downstream was added in the pyproject.toml.

How can it be tested?

hatch -e downstream run run

or:
hatch -e downstream shell
pytest -k xarray

Notes

This PR is still a draft. Todos before merging:

  • parameterize the dataset() fixture for multiple datatypes and array sizes
  • parameterize the store() fixture for multiple store types
  • parameterize the test_roundtrip_v2() for multiple chunk sizes
  • use pytest importorskip as needed (for xarray)

We are still unclear on how v3 will allow the user to set compression used by xarray.Dataset.to_zarr, so we have used the v2 standard. Pending changes on communication between xarray and zarr about compression alluded to by @jhamman.

@joshmoore
Copy link
Member

Thanks, @rwegener2! I've launched the workflows.

@dstansby dstansby added the needs release notes Automatically applied to PRs which haven't added release notes label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs release notes Automatically applied to PRs which haven't added release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants