epyt-flow 0.7.1__py3-none-any.whl → 0.7.3__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.
- epyt_flow/VERSION +1 -1
- epyt_flow/simulation/sensor_config.py +21 -10
- {epyt_flow-0.7.1.dist-info → epyt_flow-0.7.3.dist-info}/METADATA +1 -1
- {epyt_flow-0.7.1.dist-info → epyt_flow-0.7.3.dist-info}/RECORD +7 -7
- {epyt_flow-0.7.1.dist-info → epyt_flow-0.7.3.dist-info}/WHEEL +1 -1
- {epyt_flow-0.7.1.dist-info → epyt_flow-0.7.3.dist-info}/LICENSE +0 -0
- {epyt_flow-0.7.1.dist-info → epyt_flow-0.7.3.dist-info}/top_level.txt +0 -0
epyt_flow/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.7.
|
|
1
|
+
0.7.3
|
|
@@ -33,6 +33,7 @@ MASS_UNIT_UG = 5
|
|
|
33
33
|
MASS_UNIT_MOL = 6
|
|
34
34
|
MASS_UNIT_MMOL = 7
|
|
35
35
|
TIME_UNIT_HRS = 8
|
|
36
|
+
MASS_UNIT_CUSTOM = 9
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
def areaunit_to_id(unit_desc: str) -> int:
|
|
@@ -68,10 +69,15 @@ def massunit_to_id(unit_desc: str) -> int:
|
|
|
68
69
|
`int`
|
|
69
70
|
Corresponding mass unit ID.
|
|
70
71
|
"""
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
mass_unit_dict = {"MG": MASS_UNIT_MG,
|
|
73
|
+
"UG": MASS_UNIT_UG,
|
|
74
|
+
"MOL": MASS_UNIT_MOL,
|
|
75
|
+
"MMOL": MASS_UNIT_MMOL}
|
|
76
|
+
|
|
77
|
+
if unit_desc in mass_unit_dict:
|
|
78
|
+
return mass_unit_dict[unit_desc]
|
|
79
|
+
else:
|
|
80
|
+
return MASS_UNIT_CUSTOM
|
|
75
81
|
|
|
76
82
|
|
|
77
83
|
def qualityunit_to_id(unit_desc: str) -> int:
|
|
@@ -116,10 +122,11 @@ def massunit_to_str(unit_id: int) -> str:
|
|
|
116
122
|
|
|
117
123
|
Must be one of the following constant:
|
|
118
124
|
|
|
119
|
-
- MASS_UNIT_MG
|
|
120
|
-
- MASS_UNIT_UG
|
|
121
|
-
- MASS_UNIT_MOL
|
|
122
|
-
- MASS_UNIT_MMOL
|
|
125
|
+
- MASS_UNIT_MG = 4
|
|
126
|
+
- MASS_UNIT_UG = 5
|
|
127
|
+
- MASS_UNIT_MOL = 6
|
|
128
|
+
- MASS_UNIT_MMOL = 7
|
|
129
|
+
- MASS_UNIT_CUSTOM = 9
|
|
123
130
|
|
|
124
131
|
Returns
|
|
125
132
|
-------
|
|
@@ -136,6 +143,8 @@ def massunit_to_str(unit_id: int) -> str:
|
|
|
136
143
|
return "MOL"
|
|
137
144
|
elif unit_id == MASS_UNIT_MMOL:
|
|
138
145
|
return "MMOL"
|
|
146
|
+
elif unit_id == MASS_UNIT_CUSTOM:
|
|
147
|
+
return "CUSTOM UNIT"
|
|
139
148
|
else:
|
|
140
149
|
raise ValueError(f"Unknown mass unit ID '{unit_id}'")
|
|
141
150
|
|
|
@@ -698,7 +707,8 @@ class SensorConfig(JsonSerializable):
|
|
|
698
707
|
raise ValueError("Inconsistency between 'bulk_species_mass_unit' and 'bulk_species'")
|
|
699
708
|
if any(not isinstance(mass_unit, int) for mass_unit in bulk_species_mass_unit):
|
|
700
709
|
raise TypeError("All items in 'bulk_species_mass_unit' must be an instance of 'int'")
|
|
701
|
-
if any(mass_unit not in [MASS_UNIT_MG, MASS_UNIT_UG, MASS_UNIT_MOL, MASS_UNIT_MMOL
|
|
710
|
+
if any(mass_unit not in [MASS_UNIT_MG, MASS_UNIT_UG, MASS_UNIT_MOL, MASS_UNIT_MMOL,
|
|
711
|
+
MASS_UNIT_CUSTOM]
|
|
702
712
|
for mass_unit in bulk_species_mass_unit):
|
|
703
713
|
raise ValueError("Invalid mass unit in 'bulk_species_mass_unit'")
|
|
704
714
|
|
|
@@ -707,7 +717,8 @@ class SensorConfig(JsonSerializable):
|
|
|
707
717
|
"and 'surface_species'")
|
|
708
718
|
if any(not isinstance(mass_unit, int) for mass_unit in surface_species_mass_unit):
|
|
709
719
|
raise TypeError("All items in 'surface_species_mass_unit' must be an instance of 'int'")
|
|
710
|
-
if any(mass_unit not in [MASS_UNIT_MG, MASS_UNIT_UG, MASS_UNIT_MOL, MASS_UNIT_MMOL
|
|
720
|
+
if any(mass_unit not in [MASS_UNIT_MG, MASS_UNIT_UG, MASS_UNIT_MOL, MASS_UNIT_MMOL,
|
|
721
|
+
MASS_UNIT_CUSTOM]
|
|
711
722
|
for mass_unit in surface_species_mass_unit):
|
|
712
723
|
raise ValueError("Invalid mass unit in 'surface_species_mass_unit'")
|
|
713
724
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: epyt-flow
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.3
|
|
4
4
|
Summary: EPyT-Flow -- EPANET Python Toolkit - Flow
|
|
5
5
|
Author-email: André Artelt <aartelt@techfak.uni-bielefeld.de>, "Marios S. Kyriakou" <kiriakou.marios@ucy.ac.cy>, "Stelios G. Vrachimis" <vrachimis.stelios@ucy.ac.cy>
|
|
6
6
|
License: MIT License
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
epyt_flow/VERSION,sha256=
|
|
1
|
+
epyt_flow/VERSION,sha256=nHiKg43B9r_YD6OXV6lflCYAccNQEcmgUwHaHHNQdlc,6
|
|
2
2
|
epyt_flow/__init__.py,sha256=KNDiPWiHdB9a5ZF1ipjA1uoq61TwU2ThjaStpvSLBtY,1742
|
|
3
3
|
epyt_flow/metrics.py,sha256=W-dolnrmWfoanyvg-knoe2QMUtFwV1xODp4D4EwsQ00,14261
|
|
4
4
|
epyt_flow/serialization.py,sha256=ltWcLiTw62s0KG2DSgkQBkn6CCkxy9soDGq_ENohkrI,13998
|
|
@@ -114,7 +114,7 @@ epyt_flow/simulation/parallel_simulation.py,sha256=VmC7xemjxRB_N0fx1AAQ7ux82tnyT
|
|
|
114
114
|
epyt_flow/simulation/scenario_config.py,sha256=NyadeCihpR4bpsWVPj7J-1DU2w1CEN0pAo2yh0t8Xkg,26751
|
|
115
115
|
epyt_flow/simulation/scenario_simulator.py,sha256=RnPvgEvEZO2rxXPu3jpBGTCjl7LQ6pnSjjPrRhvsMgY,110315
|
|
116
116
|
epyt_flow/simulation/scenario_visualizer.py,sha256=fpj67zl69q-byg7Oxocqhmu1S3P7B3ROCkSYzWyM--0,2187
|
|
117
|
-
epyt_flow/simulation/sensor_config.py,sha256=
|
|
117
|
+
epyt_flow/simulation/sensor_config.py,sha256=ZiTFQpyftLSVXd0p5egBxxHe47vD9af_1Tv7ppJR8Y0,92637
|
|
118
118
|
epyt_flow/simulation/events/__init__.py,sha256=tIdqzs7_Cus4X2kbZG4Jl2zs-zsk_4rnajFOCvL0zlI,185
|
|
119
119
|
epyt_flow/simulation/events/actuator_events.py,sha256=2_MPYbYO9As6fMkm5Oy9pjSB9kCvFuKpGu8ykYDAydg,7903
|
|
120
120
|
epyt_flow/simulation/events/event.py,sha256=kARPV20XCAl6zxnJwI9U7ICtZUPACO_rgAmtHm1mGCs,2603
|
|
@@ -132,8 +132,8 @@ epyt_flow/uncertainty/model_uncertainty.py,sha256=SD2sYGqj7K0Ys0Lvak4HsbP18A0Smw
|
|
|
132
132
|
epyt_flow/uncertainty/sensor_noise.py,sha256=zJVULxnxVPSSqc6UW0iwZ9O-HGf9dn4CwScPqf4yCY0,2324
|
|
133
133
|
epyt_flow/uncertainty/uncertainties.py,sha256=jzaAwv5--HGc-H4-SwB0s-pAnzhhFuc06IXck7rC5l8,17902
|
|
134
134
|
epyt_flow/uncertainty/utils.py,sha256=gq66c9-QMOxOqI6wgWLyFxjVV0fbG0_8Yzd6mQjNYNo,5315
|
|
135
|
-
epyt_flow-0.7.
|
|
136
|
-
epyt_flow-0.7.
|
|
137
|
-
epyt_flow-0.7.
|
|
138
|
-
epyt_flow-0.7.
|
|
139
|
-
epyt_flow-0.7.
|
|
135
|
+
epyt_flow-0.7.3.dist-info/LICENSE,sha256=-4hYIY2BLmCkdOv2_PehEwlnMKTCes8_oyIUXjKtkug,1076
|
|
136
|
+
epyt_flow-0.7.3.dist-info/METADATA,sha256=99ee4DSGioBMjHr18mIDadIA1U6wp-nHxo6YnaD7hU8,9420
|
|
137
|
+
epyt_flow-0.7.3.dist-info/WHEEL,sha256=a7TGlA-5DaHMRrarXjVbQagU3Man_dCnGIWMJr5kRWo,91
|
|
138
|
+
epyt_flow-0.7.3.dist-info/top_level.txt,sha256=Wh_kd7TRL8ownCw3Y3dxx-9C0iTSk6wNauv_NX9JcrY,10
|
|
139
|
+
epyt_flow-0.7.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|