File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ dependencies = [
26
26
" geopandas>=0.13.0" ,
27
27
# fiona<1.9 does not contain sql where filter
28
28
" fiona>=1.9" ,
29
- # contextily<1.0 .0 is from April 2020
30
- " contextily>=1.0 .0" ,
29
+ # contextily<1.4 .0 raises AttributeError and UnidentifiedImageError: https://github.com/Deltares/dfm_tools/issues/857
30
+ " contextily>=1.4 .0" ,
31
31
# xarray<2023.9.0 does not support multidimensional coordinates (used in e.g. HIRLAM meteo data)
32
32
" xarray>=2023.9.0" ,
33
33
# dask version is aligned with xarray
Original file line number Diff line number Diff line change 12
12
import numpy as np
13
13
import matplotlib .pyplot as plt
14
14
import dfm_tools as dfmt
15
+ import contextily as ctx
15
16
16
17
17
18
@pytest .mark .unittest
@@ -165,3 +166,16 @@ def test_xarray_decode_default_fillvals(tmp_path):
165
166
fnc_new = uds2 .grid .face_node_connectivity
166
167
167
168
assert fill_value_default in fnc_new
169
+
170
+
171
+ @pytest .mark .unittest
172
+ def test_ctx_add_basemap ():
173
+ """
174
+ tests wheter this often used function still works, it fails in contextily 1.3.0
175
+ mainly relevant to update the minimal contextily version in the pyproject.toml file sometimes
176
+ https://github.com/Deltares/dfm_tools/issues/857
177
+ """
178
+ _ , ax = plt .subplots ()
179
+ ax .set_xlim (1.8 ,3.2 )
180
+ ax .set_ylim (50.8 , 52.2 )
181
+ ctx .add_basemap (ax = ax ,crs = "EPSG:4326" ,attribution = False )
You can’t perform that action at this time.
0 commit comments