Skip to content

Commit

Permalink
Silence dask doctest warning (#8734)
Browse files Browse the repository at this point in the history
* Silence dask doctest warning

Closes #8732. Not the most elegant implementation but it's only temporary
  • Loading branch information
max-sixty authored Feb 10, 2024
1 parent 6187d80 commit aab2291
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ci/requirements/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- cartopy
- cftime
- dask-core
- dask-expr # dask raises a deprecation warning without this, breaking doctests
- distributed
- flox
- fsspec!=2021.7.0
Expand All @@ -32,7 +33,7 @@ dependencies:
- pip
- pooch
- pre-commit
- pyarrow # pandas makes a deprecation warning without this, breaking doctests
- pyarrow # pandas raises a deprecation warning without this, breaking doctests
- pydap
- pytest
- pytest-cov
Expand Down
8 changes: 8 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ def add_standard_imports(doctest_namespace, tmpdir):

# always switch to the temporary directory, so files get written there
tmpdir.chdir()

# Avoid the dask deprecation warning, can remove if CI passes without this.
try:
import dask
except ImportError:
pass
else:
dask.config.set({"dataframe.query-planning": True})

0 comments on commit aab2291

Please sign in to comment.