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

Fix check for chunk_store in zarr backend #7923

Merged
merged 3 commits into from
Jun 23, 2023

Conversation

juntyr
Copy link
Contributor

@juntyr juntyr commented Jun 16, 2023

Zarr stores implement the __len__ method and thus checking if a store is truthy returns if the store is non-empty, not if the chunk_store variable is still None. With this fix, empty stores can be passed as chunk_store to the to_zarr(...) method and will actually be used.

  • Closes #xxxx
  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst

@welcome
Copy link

welcome bot commented Jun 16, 2023

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@github-actions github-actions bot added io topic-backends topic-zarr Related to zarr storage library labels Jun 16, 2023
@dcherian
Copy link
Contributor

Thanks! Can you add a test please?

@juntyr juntyr force-pushed the zarr-chunk-store-fix branch from 20e13e8 to 9687112 Compare June 22, 2023 08:56
@dcherian
Copy link
Contributor

Thanks @juntyr This is a great first contribution. Welcome to Xarray!

@dcherian dcherian requested a review from jhamman June 22, 2023 16:11
doc/whats-new.rst Outdated Show resolved Hide resolved
@dcherian
Copy link
Contributor

@TomNicholas do you want to merge this before or after tagging the release?

@dcherian dcherian added the plan to merge Final call for comments label Jun 23, 2023
@TomNicholas TomNicholas merged commit e1605f2 into pydata:main Jun 23, 2023
@welcome
Copy link

welcome bot commented Jun 23, 2023

Congratulations on completing your first pull request! Welcome to Xarray! We are proud of you, and hope to see you again! celebration gif

dstansby pushed a commit to dstansby/xarray that referenced this pull request Jun 28, 2023
* Fix check for chunk_store in zarr backend

* Add test and update whats-new

* Update the whats-new message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
io plan to merge Final call for comments topic-backends topic-zarr Related to zarr storage library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants