File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,3 @@ def test_download_from_github_load_without_cache(
29
29
).load ()
30
30
ds_cache = tutorial .open_dataset (self .testfile , cache_dir = cache_dir ).load ()
31
31
assert_identical (ds_cache , ds_nocache )
32
-
33
- def test_download_rasterio_from_github_load_without_cache (
34
- self , tmp_path , monkeypatch
35
- ):
36
- cache_dir = tmp_path / tutorial ._default_cache_dir_name
37
- with pytest .warns (DeprecationWarning ):
38
- arr_nocache = tutorial .open_rasterio (
39
- "RGB.byte" , cache = False , cache_dir = cache_dir
40
- ).load ()
41
- arr_cache = tutorial .open_rasterio (
42
- "RGB.byte" , cache = True , cache_dir = cache_dir
43
- ).load ()
44
- assert_identical (arr_cache , arr_nocache )
Original file line number Diff line number Diff line change 9
9
10
10
import os
11
11
import pathlib
12
+ import warnings
12
13
from typing import TYPE_CHECKING
13
14
14
15
import numpy as np
@@ -175,6 +176,12 @@ def open_rasterio(
175
176
"""
176
177
Open a rasterio dataset from the online repository (requires internet).
177
178
179
+ .. deprecated:: 0.20.0
180
+
181
+ Deprecated in favor of rioxarray.
182
+ For information about transitioning, see:
183
+ https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html
184
+
178
185
If a local copy is found then always use that to avoid network traffic.
179
186
180
187
Available datasets:
@@ -204,6 +211,13 @@ def open_rasterio(
204
211
----------
205
212
.. [1] https://github.com/rasterio/rasterio
206
213
"""
214
+ warnings .warn (
215
+ "open_rasterio is Deprecated in favor of rioxarray. "
216
+ "For information about transitioning, see: "
217
+ "https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html" ,
218
+ DeprecationWarning ,
219
+ stacklevel = 2 ,
220
+ )
207
221
try :
208
222
import pooch
209
223
except ImportError as e :
You can’t perform that action at this time.
0 commit comments