1
0
forked from pool/python-xarray
python-xarray/local_dataset.patch
Matej Cepl 36150b10c4 - Update to 2022.10.0:
- This release brings numerous bugfixes, a change in minimum
    supported versions, and a new scatter plot method for
    DataArrays.
- Update to 2022.9.0:
  - This release brings a large number of bugfixes and
    documentation improvements, as well as an external interface
    for setting custom indexes!

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-xarray?expand=0&rev=70
2022-10-18 22:26:22 +00:00

19 lines
621 B
Diff

---
xarray/tutorial.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/xarray/tutorial.py
+++ b/xarray/tutorial.py
@@ -156,7 +156,10 @@ def open_dataset(
url = f"{base_url}/raw/{version}/{path.name}"
# retrieve the file
- filepath = pooch.retrieve(url=url, known_hash=None, path=cache_dir)
+ fname = pathlib.Path(cache_dir, path).expanduser()
+ if not fname.exists():
+ fname = None
+ filepath = pooch.retrieve(url=url, fname=fname, known_hash=None, path=cache_dir)
ds = _open_dataset(filepath, engine=engine, **kws)
if not cache:
ds = ds.load()