pastastore 1.8.0__py3-none-any.whl → 1.10.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 +65 -11
- pastastore/connectors.py +43 -2
- pastastore/extensions/hpd.py +13 -6
- pastastore/plotting.py +289 -35
- pastastore/store.py +108 -54
- pastastore/styling.py +4 -4
- pastastore/util.py +14 -10
- pastastore/version.py +1 -1
- pastastore/yaml_interface.py +35 -8
- {pastastore-1.8.0.dist-info → pastastore-1.10.0.dist-info}/LICENSE +1 -1
- {pastastore-1.8.0.dist-info → pastastore-1.10.0.dist-info}/METADATA +16 -25
- pastastore-1.10.0.dist-info/RECORD +28 -0
- {pastastore-1.8.0.dist-info → pastastore-1.10.0.dist-info}/WHEEL +1 -1
- tests/conftest.py +1 -5
- tests/test_003_pastastore.py +26 -9
- tests/test_006_benchmark.py +0 -3
- pastastore-1.8.0.dist-info/RECORD +0 -28
- {pastastore-1.8.0.dist-info → pastastore-1.10.0.dist-info}/top_level.txt +0 -0
tests/test_003_pastastore.py
CHANGED
|
@@ -168,6 +168,7 @@ def test_create_models(pstore):
|
|
|
168
168
|
["oseries1", "oseries2"], store=True, progressbar=False
|
|
169
169
|
)
|
|
170
170
|
_ = pstore.conn.models
|
|
171
|
+
assert pstore.n_models == 2
|
|
171
172
|
|
|
172
173
|
|
|
173
174
|
@pytest.mark.dependency
|
|
@@ -252,15 +253,12 @@ def test_update_ts_settings(request, pstore):
|
|
|
252
253
|
|
|
253
254
|
ml2 = pstore.get_models(ml.name, update_ts_settings=True)
|
|
254
255
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
pstore.del_models("ml_oseries2")
|
|
262
|
-
pstore.set_check_model_series_values(True)
|
|
263
|
-
raise
|
|
256
|
+
assert ml2.oseries.settings["tmax"] == o.index[-1]
|
|
257
|
+
assert ml2.stressmodels["recharge"].prec.settings["tmax"] == tmax
|
|
258
|
+
assert ml2.stressmodels["recharge"].evap.settings["tmax"] == tmax
|
|
259
|
+
assert ml2.stressmodels["prec"].stress[0].settings["tmax"] == p2.index[-1]
|
|
260
|
+
pstore.del_models("ml_oseries2")
|
|
261
|
+
pstore.set_check_model_series_values(True)
|
|
264
262
|
|
|
265
263
|
|
|
266
264
|
# @pytest.mark.dependency()
|
|
@@ -296,6 +294,16 @@ def test_to_from_zip(pstore):
|
|
|
296
294
|
os.remove(zipname)
|
|
297
295
|
|
|
298
296
|
|
|
297
|
+
def test_load_pastastore_from_config_file(pstore):
|
|
298
|
+
if pstore.type == "pas" or pstore.type == "arcticdb":
|
|
299
|
+
path = (
|
|
300
|
+
pstore.conn.path if pstore.type == "pas" else pstore.conn.uri.split("//")[1]
|
|
301
|
+
)
|
|
302
|
+
fname = os.path.join(path, f"{pstore.conn.name}.pastastore")
|
|
303
|
+
pstore2 = pst.PastaStore.from_pastastore_config_file(fname)
|
|
304
|
+
assert not pstore2.empty
|
|
305
|
+
|
|
306
|
+
|
|
299
307
|
def test_example_pastastore():
|
|
300
308
|
from pastastore.datasets import example_pastastore
|
|
301
309
|
|
|
@@ -319,3 +327,12 @@ def test_meta_with_name(pstore):
|
|
|
319
327
|
pstore.add_stress(s, "what_i_want", kind="special", metadata=smeta)
|
|
320
328
|
assert "what_i_want" in pstore.stresses.index, "This is not right."
|
|
321
329
|
pstore.del_stress("what_i_want")
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
@pytest.mark.dependency
|
|
333
|
+
def test_models_metadata(request, pstore):
|
|
334
|
+
# depends(request, [f"test_create_models[{pstore.type}]"])
|
|
335
|
+
pstore.create_models_bulk(["oseries1", "oseries2"], store=True, progressbar=False)
|
|
336
|
+
df = pstore.models.metadata
|
|
337
|
+
assert df.index.size == 2
|
|
338
|
+
assert (df["n_stressmodels"] == 1).all()
|
tests/test_006_benchmark.py
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
docs/conf.py,sha256=XcZUTmn9fGDhhu8k3mpaLu435SpIRNpABADCCTJJuag,6291
|
|
2
|
-
pastastore/__init__.py,sha256=cWwG9-YeiI4aOU0CDBGKbQgmKmmkcPd64YwPq2rRGt0,416
|
|
3
|
-
pastastore/base.py,sha256=hOvkgACew4fpLWumLfHA6PrxLDH1EvqdWjEvFbmxJR0,46436
|
|
4
|
-
pastastore/connectors.py,sha256=QlaFcVEM_ZtOgLd3M2yZfgogcw0zNM08pVbnyRS3Mr8,48454
|
|
5
|
-
pastastore/datasets.py,sha256=FHVfmKqb8beEs9NONsWrCoJY37BmlvFLSEQ1VAFmE8A,6415
|
|
6
|
-
pastastore/plotting.py,sha256=t6gEeHVGzrwvM6q1l8V3OkklpU75O2Y4h6nKEHRWdjo,46416
|
|
7
|
-
pastastore/store.py,sha256=HZtof9gIFSW2nQpc5FHMPb1RTjgo-QzIJxueywd4jDA,65840
|
|
8
|
-
pastastore/styling.py,sha256=4xAY0FmhKrvmAGIuoMM7Uucww_X4KAxTpEoHlsxMldc,2280
|
|
9
|
-
pastastore/util.py,sha256=KCUFV4GkocWaRpG57CdxzfkTXyTEpPjnxsKehYPVN7U,28249
|
|
10
|
-
pastastore/version.py,sha256=vuqYDMX5ua14OQP04vqXH_0A_Ra2XErriiNPxgZEc5w,1205
|
|
11
|
-
pastastore/yaml_interface.py,sha256=MddELxWe8_aqJRMUydOCbjoU1-ZodzxFKYnAaqJ5SqA,29947
|
|
12
|
-
pastastore/extensions/__init__.py,sha256=lCN9xfX1qefUzUbE2FQ12c6NjLbf5HoNo-D8cGb5CTw,461
|
|
13
|
-
pastastore/extensions/accessor.py,sha256=kftQM6dqMDoySbyTKcvmkjC5gJRp465KA18G4NVXUO0,367
|
|
14
|
-
pastastore/extensions/hpd.py,sha256=fcXWb3BlWlogCbg7a2Gmha8P_eCh6zSGTyRlYp3mjXA,27466
|
|
15
|
-
tests/conftest.py,sha256=u097z7LGAnviuzXPzvER9oPjsZWqdij1CJLnW_sPY8E,5258
|
|
16
|
-
tests/test_001_import.py,sha256=g8AaJzWZ088A4B30_w-MrDfAVeeg8m78l--j7Onsklc,208
|
|
17
|
-
tests/test_002_connectors.py,sha256=k9etSRuSFVOrSEtZyxqsCF9GwIg0T7VdDJ2SjSe6i_s,7742
|
|
18
|
-
tests/test_003_pastastore.py,sha256=2nC0pU478iRbYKnVVSjh5F6PA_7SvFROwD6SABL2YSE,9370
|
|
19
|
-
tests/test_004_yaml.py,sha256=3hMNjb9s0S2rbmpyEjW6FDRAxfUZS_U1qoPl4wB-cCo,4440
|
|
20
|
-
tests/test_005_maps_plots.py,sha256=L0ppGf-cudsrdxteWy3qsV4We96DW4bCBE7c6jEm6aM,1866
|
|
21
|
-
tests/test_006_benchmark.py,sha256=yuExF35qqxhw04uYMH3OIOlGr71c4AJSJDMjGD8GefY,4983
|
|
22
|
-
tests/test_007_hpdextension.py,sha256=1QNUahq3hzqxjKbzsjofi9Yuyqe_oDGL0vWp6iouYe4,3004
|
|
23
|
-
tests/test_008_stressmodels.py,sha256=733fyCvuzjKcaLjvSMt5dTTLp-T4alzNJAToSxTIUug,4003
|
|
24
|
-
pastastore-1.8.0.dist-info/LICENSE,sha256=DtHftfUEm99KzgwLr3rQUTg8H3kAS0Z-p5WWJgLf_OY,1082
|
|
25
|
-
pastastore-1.8.0.dist-info/METADATA,sha256=nWFELMkHg9yfp76Ib1xlnPdrp7RZh-9KyhW3CO3rOVY,8032
|
|
26
|
-
pastastore-1.8.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
27
|
-
pastastore-1.8.0.dist-info/top_level.txt,sha256=1bgyMk1p23f04RK83Jju2_YAQBwyoQD_fInxoPB4YRw,22
|
|
28
|
-
pastastore-1.8.0.dist-info/RECORD,,
|
|
File without changes
|