File tree Expand file tree Collapse file tree 3 files changed +36
-4
lines changed Expand file tree Collapse file tree 3 files changed +36
-4
lines changed Original file line number Diff line number Diff line change 33
33
- ci/envs/39-minimal.yaml
34
34
- ci/envs/311-no-expr.yaml
35
35
- ci/envs/311-latest.yaml
36
+ - ci/envs/311-latest-no-expr.yaml
36
37
- ci/envs/312-latest.yaml
37
38
38
39
include :
Original file line number Diff line number Diff line change
1
+ name : test
2
+ channels :
3
+ - conda-forge
4
+ dependencies :
5
+ # required dependencies
6
+ - python=3.11
7
+ - dask-core
8
+ - geopandas
9
+ - pyproj=3.4
10
+ - packaging
11
+ # test dependencies
12
+ - pytest
13
+ - pytest-cov
14
+ - hilbertcurve
15
+ - s3fs
16
+ - moto<5 # <5 pin because of https://github.com/dask/dask/issues/10869
17
+ - flask # needed for moto server
18
+ # optional dependencies
19
+ - pyarrow
20
+ - pyogrio>=0.4
21
+ - pygeohash
22
+ - pip
23
+ - pip :
24
+ - pymorton
Original file line number Diff line number Diff line change 1
1
import uuid
2
2
from packaging .version import Version
3
3
4
+ import pandas as pd
5
+
4
6
import dask
5
7
from dask import config
6
8
7
- # Check if dask-dataframe is using dask-expr (default of None means True as well)
9
+ # Check if dask-dataframe is using dask-expr (mimix the logic of dask.dataframe
10
+ # _dask_expr_enabled() - default of None means True as well if dask-expr is available)
8
11
QUERY_PLANNING_ON = config .get ("dataframe.query-planning" , False )
9
12
if QUERY_PLANNING_ON is None :
10
- import pandas as pd
11
-
12
13
if Version (pd .__version__ ).major < 2 :
13
14
QUERY_PLANNING_ON = False
14
15
else :
15
- QUERY_PLANNING_ON = True
16
+ try :
17
+ import dask_expr # noqa: F401
18
+ except ImportError :
19
+ # dask will raise error or warning depending on the config
20
+ QUERY_PLANNING_ON = False
21
+ else :
22
+ QUERY_PLANNING_ON = True
16
23
17
24
18
25
from dask .base import normalize_token
You can’t perform that action at this time.
0 commit comments