Skip to content

Commit

Permalink
bump min version to dask>=2024.08.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Aug 17, 2024
1 parent 390863a commit a408cb0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions xarray/namedarray/daskmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,11 @@ def shuffle(
) -> DaskArray:
import dask.array

if not module_available("dask", minversion="2024.08.0"):
if not module_available("dask", minversion="2024.08.1"):
raise ValueError(
"This method is very inefficient on dask<2024.08.0. Please upgrade."
"This method is very inefficient on dask<2024.08.1. Please upgrade."
)
if chunks is not None:
raise NotImplementedError
return dask.array.shuffle(x, indexer, axis)
chunks = chunks or "auto"
if chunks != "auto":
raise NotImplementedError("Only chunks='auto' is supported at present.")
return dask.array.shuffle(x, indexer, axis, chunks=chunks)
2 changes: 1 addition & 1 deletion xarray/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _importorskip(
has_h5netcdf, requires_h5netcdf = _importorskip("h5netcdf")
has_cftime, requires_cftime = _importorskip("cftime")
has_dask, requires_dask = _importorskip("dask")
has_dask_ge_2024_08_0, _ = _importorskip("dask", minversion="2024.08.0")
has_dask_ge_2024_08_1, _ = _importorskip("dask", minversion="2024.08.1")
with warnings.catch_warnings():
warnings.filterwarnings(
"ignore",
Expand Down
6 changes: 3 additions & 3 deletions xarray/tests/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
create_test_data,
has_cftime,
has_dask,
has_dask_ge_2024_08_0,
has_dask_ge_2024_08_1,
has_flox,
raise_if_dask_computes,
requires_cftime,
Expand Down Expand Up @@ -600,7 +600,7 @@ def test_groupby_repr_datetime(obj) -> None:
],
)
def test_groupby_drops_nans(shuffle: bool, chunk: Literal[False] | dict) -> None:
if shuffle and chunk and not has_dask_ge_2024_08_0:
if shuffle and chunk and not has_dask_ge_2024_08_1:
pytest.skip()
# GH2383
# nan in 2D data variable (requires stacking)
Expand Down Expand Up @@ -1330,7 +1330,7 @@ def test_groupby_sum(self) -> None:
def test_groupby_reductions(
self, use_flox: bool, method: str, shuffle: bool, chunk: bool
) -> None:
if shuffle and chunk and not has_dask_ge_2024_08_0:
if shuffle and chunk and not has_dask_ge_2024_08_1:
pytest.skip()

array = self.da
Expand Down

0 comments on commit a408cb0

Please sign in to comment.