Skip to content

Commit 78ae72d

Browse files
Merge pull request #910 from ecmwf/feature/merge-0-19-1-into-develop
Merge 0.19.1 into develop
2 parents 921043c + 194bdf9 commit 78ae72d

File tree

3 files changed

+27
-16
lines changed

3 files changed

+27
-16
lines changed

docs/release_notes/version_0.19_updates.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
Version 0.19 Updates
33
/////////////////////////
44

5+
6+
7+
Version 0.19.1
8+
===============
9+
10+
Fixes
11+
++++++++
12+
13+
- Fixed a bug in the CDS source when could load not cached data when no network connection was available (:pr:`907`).
14+
15+
516
Version 0.19.0
617
===============
718

src/earthkit/data/sources/cds.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ def __init__(self, dataset, *args, request=None, prompt=True, **kwargs):
101101
)
102102
self.request = request_builder.requests
103103

104-
self.client() # Trigger password prompt before threading
105-
106104
# Download each request in parallel when the config allows it
107105
retriever = FileRequestRetriever(self, retriever=self._retrieve_one)
108106
self.path = retriever.retrieve(self.request, self.dataset)

tests/sources/test_cds.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_cds_grib_kwargs():
6565
@pytest.mark.download
6666
@pytest.mark.skipif(NO_CDS, reason="No access to CDS")
6767
@pytest.mark.timeout(CDS_TIMEOUT)
68-
def test_cds_grib_dict():
68+
def test_cds_grib_dict_1():
6969
s = from_source(
7070
"cds",
7171
"reanalysis-era5-single-levels",
@@ -85,19 +85,21 @@ def test_cds_grib_dict():
8585
@pytest.mark.download
8686
@pytest.mark.skipif(NO_CDS, reason="No access to CDS")
8787
@pytest.mark.timeout(CDS_TIMEOUT)
88-
def test_cds_grib_invalid_args_kwargs():
89-
with pytest.raises(TypeError):
90-
from_source(
91-
"cds",
92-
"reanalysis-era5-single-levels",
93-
dict(
94-
variable=["2t", "msl"],
95-
product_type="reanalysis",
96-
area=[50, -50, 20, 50],
97-
date="2012-12-12",
98-
),
99-
time="12:00",
100-
)
88+
def test_cds_grib_dict_2():
89+
s = from_source(
90+
"cds",
91+
"reanalysis-era5-single-levels",
92+
dict(
93+
variable=["2t", "msl"],
94+
product_type="reanalysis",
95+
area=[50, -50, 20, 50],
96+
date="2012-12-12",
97+
),
98+
time="12:00",
99+
)
100+
101+
assert len(s) == 2
102+
assert s.metadata("param") == ["2t", "msl"]
101103

102104

103105
@pytest.mark.long_test

0 commit comments

Comments
 (0)