pydata / pydata/xarray

head's up about private zarr-python API usage

Open
#11,378 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic-zarr
Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

What is your issue?

The Zarr array wrapper in xarray uses zarr.Array._async_array, which is a private attribute, which makes xarray vulnerable to breaking changes if zarr changes anything about that private attribute.

For example: there's an open issue and a PR over in zarr-python about moving all the AsyncArray methods over to the Array class, with the eventual goal of phasing out the AsyncArray class entirely.

So the bad news is that the zarr.Array._async_array attribute might behave differently (e.g., emit a warning) or disappear entirely in a future release of zarr. the good news is that, if the aforementioned warnings / removal does occur, xarray will be able to use public async methods on the Array class to do whatever you are currently using _async_array to do.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in xarray/backends/zarr.py at the Zarr array wrapper around line 287, then review the linked zarr-python issue and PR about moving AsyncArray methods onto Array. Identify every use of Zarr's private _async_array attribute; done means those uses can rely on the public async Array methods once the upstream API is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.