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.
@@ -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(ml):
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)
@@ -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="2024-01-31")
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("2024-01-30")
56
- assert tmintmax.loc["GMW000000036327_1", "tmax"] >= Timestamp("2024-01-20")
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="2024-01-31", normalize_datetime_index=False)
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-01-31")).all()
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("GMW000000036319_1", tmin="2024-01-01")
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