Skip to content

Commit

Permalink
Add nice docstring for icechunk.dask.store_dask (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian authored Nov 26, 2024
1 parent ec0cb97 commit f1b7693
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions icechunk-python/python/icechunk/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,29 @@ def store_dask(
split_every: int | None = None,
**store_kwargs: Any,
) -> None:
"""
A version of ``dask.array.store`` for Icechunk stores.
This method will eagerly execute writes to the Icechunk store, and will
merge the changesets corresponding to each write task. The `store` object
passed in will be updated in-place with the fully merged changeset.
Parameters
----------
store: IcechunkStore
Icechunk store to write to.
sources: list of `dask.array.Array`
List of dask arrays to write.
targets : list of `zarr.Array`
Corresponding list of Zarr array objects to write to.
regions: list of tuple of slice, optional
Corresponding region for each of `targets` to write to.
split_every: int, optional
Number of changesets to merge at a given time.
**store_kwargs:
Arbitrary keyword arguments passed to `dask.array.store`. Notably `compute`,
`return_stored`, `load_stored`, and `lock` are unsupported.
"""
stored_arrays = dask.array.store( # type: ignore[attr-defined]
sources=sources,
targets=targets, # type: ignore[arg-type]
Expand Down

0 comments on commit f1b7693

Please sign in to comment.