-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
WIP: Zarr chunks refactor #4550
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add necessary imports for this function.
# Conflicts: # xarray/backends/api.py
…ad-refactor # Conflicts: # xarray/backends/apiv2.py
- to be used in apiv2 without instantiate the object
- modify signature - move default setting inside backends
…2.dataset_from_backend_dataset`
…lated error message
# Conflicts: # xarray/backends/apiv2.py
# Conflicts: # xarray/backends/apiv2.py
…arr-chunks-refactor � Conflicts: � xarray/backends/apiv2.py � xarray/core/dataset.py
re-add check on chunks type
re-add check on chunks type
…arr-chunks-refactor � Conflicts: � xarray/backends/apiv2.py
Hello @aurghs! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2020-11-02 12:07:00 UTC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This work aims to harmonize the way zarr deals with chunking to have similar behavior for all other backends and unify the code.
Most of the changes involve the new API, apiv2.py, except for some changes in the code that has been added with the merge of #4187.
main changes:
apiv2.dataset_from_backend_dataset
function.get_chunks
fromzarr
todataset
.current status:
apiv2.open_dataset
chunks='auto'
andchunks={}
now has the same beahviuorapiv2.open_dataset
for all the backends now the default chunking is provided by the backend, if it is not available it uses one big chunk.Missing points:
chunksizes
chunks
)There is one open point to be discussed yet:
dataset.chunks
andopen_dataset(..., chunks=...)
have different behaviors.dataset.chunks(chunks={})
opens the dataset with only one chunk per variable, while inopen_dataset(..., chunks={})
it usesencodings['chunks']
, when available.Note that also
chunks=None
has a different behaviour:open_dataset(..., chunks=None)
(oropen_dataset(...)
, it's the deafult) returns variables without chunks, whiledataset.chunk(chunks=None)
(ordataset.chunk()
, it's the default) has the same behavior ofdataset.chunk(chunks=None)
. Probably it's not worth changing it.isort . && black . && mypy . && flake8
whats-new.rst
api.rst