hestia-earth-utils 0.15.4__py3-none-any.whl → 0.15.5__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.
- hestia_earth/utils/blank_node.py +3 -2
- hestia_earth/utils/pipeline.py +5 -5
- hestia_earth/utils/version.py +1 -1
- {hestia_earth_utils-0.15.4.dist-info → hestia_earth_utils-0.15.5.dist-info}/METADATA +1 -1
- {hestia_earth_utils-0.15.4.dist-info → hestia_earth_utils-0.15.5.dist-info}/RECORD +9 -9
- {hestia_earth_utils-0.15.4.data → hestia_earth_utils-0.15.5.data}/scripts/hestia-format-upload +0 -0
- {hestia_earth_utils-0.15.4.data → hestia_earth_utils-0.15.5.data}/scripts/hestia-pivot-csv +0 -0
- {hestia_earth_utils-0.15.4.dist-info → hestia_earth_utils-0.15.5.dist-info}/WHEEL +0 -0
- {hestia_earth_utils-0.15.4.dist-info → hestia_earth_utils-0.15.5.dist-info}/top_level.txt +0 -0
hestia_earth/utils/blank_node.py
CHANGED
|
@@ -144,8 +144,9 @@ def get_node_value(
|
|
|
144
144
|
)] if isinstance(value, list) and len(value) > 0 else None
|
|
145
145
|
|
|
146
146
|
return reducer(value) if reducer else (
|
|
147
|
-
value if any([isinstance(value, float), isinstance(value, int), isinstance(value, bool)])
|
|
148
|
-
|
|
147
|
+
value if any([isinstance(value, float), isinstance(value, int), isinstance(value, bool)]) else
|
|
148
|
+
default if value is None else
|
|
149
|
+
value
|
|
149
150
|
)
|
|
150
151
|
|
|
151
152
|
|
hestia_earth/utils/pipeline.py
CHANGED
|
@@ -156,15 +156,15 @@ def _node_id(node: dict): return node.get('@id', node.get('id'))
|
|
|
156
156
|
def _node_path(node: dict, folder: str = ''): return join(folder, _node_type(node), f"{_node_id(node)}.jsonld")
|
|
157
157
|
|
|
158
158
|
|
|
159
|
-
def is_calculating(bucket: str, node: dict):
|
|
160
|
-
return _read_metadata(bucket, _node_path(node)).get(METADATA_PROGRESS_KEY, 'false') == 'true'
|
|
159
|
+
def is_calculating(bucket: str, node: dict, folder: str = ''):
|
|
160
|
+
return _read_metadata(bucket, _node_path(node, folder)).get(METADATA_PROGRESS_KEY, 'false') == 'true'
|
|
161
161
|
|
|
162
162
|
|
|
163
|
-
def set_calculating(bucket: str, node: dict, in_progress: bool):
|
|
164
|
-
return _update_metadata(bucket, _node_path(node), {METADATA_PROGRESS_KEY: str(in_progress).lower()})
|
|
163
|
+
def set_calculating(bucket: str, node: dict, in_progress: bool, folder: str = ''):
|
|
164
|
+
return _update_metadata(bucket, _node_path(node, folder), {METADATA_PROGRESS_KEY: str(in_progress).lower()})
|
|
165
165
|
|
|
166
166
|
|
|
167
|
-
def get_stage(bucket: str, node: dict):
|
|
167
|
+
def get_stage(bucket: str, node: dict, folder: str = CALC_FOLDER):
|
|
168
168
|
stage = _read_metadata(bucket, _node_path(node, folder=CALC_FOLDER)).get(METADATA_STAGE_KEY)
|
|
169
169
|
return int(stage) if stage else stage
|
|
170
170
|
|
hestia_earth/utils/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = '0.15.
|
|
1
|
+
VERSION = '0.15.5'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
hestia_earth/__init__.py,sha256=G-d438vPx7m_ks5e9XTtM3u7LDRO5dSSukibukWmyPM,56
|
|
2
2
|
hestia_earth/utils/__init__.py,sha256=qEFeq3yuf3lQKVseALmL8aPM8fpCS54B_5pry00M3hk,76
|
|
3
3
|
hestia_earth/utils/api.py,sha256=y0gw5pCCHNnFIhM62Hok_5eDtH3QDAZdkye_1mANMNs,9654
|
|
4
|
-
hestia_earth/utils/blank_node.py,sha256=
|
|
4
|
+
hestia_earth/utils/blank_node.py,sha256=COmhDWc9mdk2EyXJIQHw_reGM_0Drs1Onh4lNP8rxa4,7345
|
|
5
5
|
hestia_earth/utils/calculation_status.py,sha256=X7lbgVMD9luH1gj9lEcxd3_P2-u7e8ZPGCvX1czPZUo,2238
|
|
6
6
|
hestia_earth/utils/cycle.py,sha256=rFLRL9X4KQ1UrE6fEPA_gV8KmwzrZpR3Ce56zg41lRk,1326
|
|
7
7
|
hestia_earth/utils/date.py,sha256=SPQ69uxHiv1o3BqIkBKkM5XX_CmS20CB7g6u2rhsdh8,1807
|
|
@@ -10,13 +10,13 @@ hestia_earth/utils/emission.py,sha256=crHAJOQRI0NRHht0fFOFjEqcarsFqzbV4pDgk90dfM
|
|
|
10
10
|
hestia_earth/utils/lookup.py,sha256=0RLqy3HPzkbhkRaO7fYoHU0jKhAYzI6QHMptMEbqTlg,10344
|
|
11
11
|
hestia_earth/utils/lookup_utils.py,sha256=9pkJUKo3NEBspoN9yRPoDCzkxcbpnbLpC7Z0I6HiP7I,5369
|
|
12
12
|
hestia_earth/utils/model.py,sha256=uUcrF07XmBzqLni8VSaP0HoebJnQ57kk0EOmhwYMbfI,4637
|
|
13
|
-
hestia_earth/utils/pipeline.py,sha256=
|
|
13
|
+
hestia_earth/utils/pipeline.py,sha256=KDA1PBimFIUJKVytbxaXh33QGFW55I-2kcVDCRbYxn4,9277
|
|
14
14
|
hestia_earth/utils/request.py,sha256=bu7hkWKmFdXl2_Feawiam_x32whlclA9oP0asJyC69k,626
|
|
15
15
|
hestia_earth/utils/stats.py,sha256=4t3op10xDJbGxWJEY1Jtyl302PYWyMFwLpsSkMlzQn8,34667
|
|
16
16
|
hestia_earth/utils/table.py,sha256=RrTt-KF_QzjKiCpaAueoG6La1FG-Iusxw5NMDpoRBpQ,2861
|
|
17
17
|
hestia_earth/utils/term.py,sha256=6LiUSc6KX3IOkfWF6fYkQ2tENCO8ENljcdDypxU6WtA,1060
|
|
18
18
|
hestia_earth/utils/tools.py,sha256=eCppZ0gFR6RPF7TEraMLwLJnUCJb93xP0iEzFPcYpK0,4685
|
|
19
|
-
hestia_earth/utils/version.py,sha256=
|
|
19
|
+
hestia_earth/utils/version.py,sha256=pY2Xj289NO4A3rIbFygWGENP2l3wteL9fyCFESz8zI0,19
|
|
20
20
|
hestia_earth/utils/pivot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
hestia_earth/utils/pivot/_shared.py,sha256=sRE_PGe9u0-sFnCb0mdeM7vPOkFWt3-kDs8WSGQTQGk,875
|
|
22
22
|
hestia_earth/utils/pivot/pivot_csv.py,sha256=Ed-sCKEqVIFJu71AncS7zlMkHbw5V15QLd5c5B_uxiE,12296
|
|
@@ -26,12 +26,12 @@ hestia_earth/utils/storage/_azure_client.py,sha256=sevCZni04eknMql2DgUsWG23f7u0K
|
|
|
26
26
|
hestia_earth/utils/storage/_local_client.py,sha256=IbzziUKY0QS3ybHFfgEpELqvafa7hQnZ-DdGdjQuypE,515
|
|
27
27
|
hestia_earth/utils/storage/_s3_client.py,sha256=sR_HkvNmDFpLYislSUw1nffHicznCcPo1p_5cve2ExU,2216
|
|
28
28
|
hestia_earth/utils/storage/_sns_client.py,sha256=LowUatj78Egu6_Id6Rr7hZjfZx1WguS3lozB3yAwSps,347
|
|
29
|
-
hestia_earth_utils-0.15.
|
|
30
|
-
hestia_earth_utils-0.15.
|
|
29
|
+
hestia_earth_utils-0.15.5.data/scripts/hestia-format-upload,sha256=IhLAHHPJqRgUcht-M_EUEsRMbRbMfshig07o488zscM,703
|
|
30
|
+
hestia_earth_utils-0.15.5.data/scripts/hestia-pivot-csv,sha256=0YBuGuyPO8rytod6iwWEKiQdSlr9JLuD001k6U5t6no,1163
|
|
31
31
|
tests/pivot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
tests/pivot/test_pivot_csv.py,sha256=aYni7o3QDPSgtVxVCspEetotgpYHY7Lz5VHf-DR89gw,8131
|
|
33
33
|
tests/pivot/test_pivot_json.py,sha256=UYTAN4AZhzVicIYsU1A2VgJcctUXohjHppg6s-pqwcg,8287
|
|
34
|
-
hestia_earth_utils-0.15.
|
|
35
|
-
hestia_earth_utils-0.15.
|
|
36
|
-
hestia_earth_utils-0.15.
|
|
37
|
-
hestia_earth_utils-0.15.
|
|
34
|
+
hestia_earth_utils-0.15.5.dist-info/METADATA,sha256=EbkWkjevuBFHeiPK6aBme7mppB5H0HsN0cooulyOK_w,1757
|
|
35
|
+
hestia_earth_utils-0.15.5.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
36
|
+
hestia_earth_utils-0.15.5.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
|
|
37
|
+
hestia_earth_utils-0.15.5.dist-info/RECORD,,
|
{hestia_earth_utils-0.15.4.data → hestia_earth_utils-0.15.5.data}/scripts/hestia-format-upload
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|