pastastore 1.7.2__py3-none-any.whl → 1.8.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pastastore/base.py +41 -637
- pastastore/connectors.py +876 -18
- pastastore/extensions/hpd.py +2 -2
- pastastore/store.py +238 -110
- pastastore/util.py +1 -1
- pastastore/version.py +1 -1
- {pastastore-1.7.2.dist-info → pastastore-1.8.0.dist-info}/METADATA +40 -39
- {pastastore-1.7.2.dist-info → pastastore-1.8.0.dist-info}/RECORD +13 -13
- {pastastore-1.7.2.dist-info → pastastore-1.8.0.dist-info}/WHEEL +1 -1
- tests/test_003_pastastore.py +2 -1
- tests/test_007_hpdextension.py +10 -8
- {pastastore-1.7.2.dist-info → pastastore-1.8.0.dist-info}/LICENSE +0 -0
- {pastastore-1.7.2.dist-info → pastastore-1.8.0.dist-info}/top_level.txt +0 -0
tests/test_003_pastastore.py
CHANGED
|
@@ -210,7 +210,8 @@ def test_solve_models_parallel(request, pstore):
|
|
|
210
210
|
def test_apply(request, pstore):
|
|
211
211
|
depends(request, [f"test_solve_models_and_get_stats[{pstore.type}]"])
|
|
212
212
|
|
|
213
|
-
def func(
|
|
213
|
+
def func(ml_name):
|
|
214
|
+
ml = pstore.conn.get_models(ml_name)
|
|
214
215
|
return ml.parameters.loc["recharge_A", "optimal"]
|
|
215
216
|
|
|
216
217
|
result = pstore.apply("models", func)
|
tests/test_007_hpdextension.py
CHANGED
|
@@ -25,7 +25,7 @@ def test_hpd_download_precipitation_from_knmi():
|
|
|
25
25
|
activate_hydropandas_extension()
|
|
26
26
|
pstore = pst.PastaStore()
|
|
27
27
|
pstore.hpd.download_knmi_precipitation(
|
|
28
|
-
stns=[260], tmin="2022-01-01", tmax="2022-01-31"
|
|
28
|
+
stns=[260], meteo_var="RH", tmin="2022-01-01", tmax="2022-01-31"
|
|
29
29
|
)
|
|
30
30
|
assert pstore.n_stresses == 1
|
|
31
31
|
|
|
@@ -50,10 +50,10 @@ def test_update_oseries():
|
|
|
50
50
|
activate_hydropandas_extension()
|
|
51
51
|
|
|
52
52
|
pstore = pst.PastaStore.from_zip("tests/data/test_hpd_update.zip")
|
|
53
|
-
pstore.hpd.update_bro_gmw(tmax="
|
|
53
|
+
pstore.hpd.update_bro_gmw(tmax="2022-02-28")
|
|
54
54
|
tmintmax = pstore.get_tmin_tmax("oseries")
|
|
55
|
-
assert tmintmax.loc["GMW000000036319_1", "tmax"] >= Timestamp("
|
|
56
|
-
assert tmintmax.loc["GMW000000036327_1", "tmax"] >= Timestamp("
|
|
55
|
+
assert tmintmax.loc["GMW000000036319_1", "tmax"] >= Timestamp("2022-02-27")
|
|
56
|
+
assert tmintmax.loc["GMW000000036327_1", "tmax"] >= Timestamp("2022-02-27")
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
@pytest.mark.xfail(reason="KNMI is being flaky, so allow this test to xfail/xpass.")
|
|
@@ -64,9 +64,9 @@ def test_update_stresses():
|
|
|
64
64
|
activate_hydropandas_extension()
|
|
65
65
|
|
|
66
66
|
pstore = pst.PastaStore.from_zip("tests/data/test_hpd_update.zip")
|
|
67
|
-
pstore.hpd.update_knmi_meteo(tmax="
|
|
67
|
+
pstore.hpd.update_knmi_meteo(tmax="2022-02-28", normalize_datetime_index=True)
|
|
68
68
|
tmintmax = pstore.get_tmin_tmax("stresses")
|
|
69
|
-
assert (tmintmax["tmax"] >= Timestamp("2024-
|
|
69
|
+
assert (tmintmax["tmax"] >= Timestamp("2024-02-27")).all()
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
@pytest.mark.xfail(reason="KNMI is being flaky, so allow this test to xfail/xpass.")
|
|
@@ -78,8 +78,10 @@ def test_nearest_stresses():
|
|
|
78
78
|
|
|
79
79
|
pstore = pst.PastaStore.from_zip("tests/data/test_hpd_update.zip")
|
|
80
80
|
pstore.hpd.download_nearest_knmi_precipitation(
|
|
81
|
-
"GMW000000036319_1", tmin="2024-01-01"
|
|
81
|
+
"GMW000000036319_1", tmin="2024-01-01", tmax="2024-01-31"
|
|
82
82
|
)
|
|
83
83
|
assert "RD_GROOT-AMMERS" in pstore.stresses_names
|
|
84
|
-
pstore.hpd.download_nearest_knmi_evaporation(
|
|
84
|
+
pstore.hpd.download_nearest_knmi_evaporation(
|
|
85
|
+
"GMW000000036319_1", tmin="2024-01-01", tmax="2024-01-31"
|
|
86
|
+
)
|
|
85
87
|
assert "EV24_CABAUW-MAST" in pstore.stresses_names
|
|
File without changes
|
|
File without changes
|