hestia-earth-utils 0.16.11__py3-none-any.whl → 0.16.12__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/tools.py +10 -4
- hestia_earth/utils/version.py +1 -1
- {hestia_earth_utils-0.16.11.dist-info → hestia_earth_utils-0.16.12.dist-info}/METADATA +1 -1
- {hestia_earth_utils-0.16.11.dist-info → hestia_earth_utils-0.16.12.dist-info}/RECORD +8 -8
- {hestia_earth_utils-0.16.11.data → hestia_earth_utils-0.16.12.data}/scripts/hestia-format-upload +0 -0
- {hestia_earth_utils-0.16.11.data → hestia_earth_utils-0.16.12.data}/scripts/hestia-pivot-csv +0 -0
- {hestia_earth_utils-0.16.11.dist-info → hestia_earth_utils-0.16.12.dist-info}/WHEEL +0 -0
- {hestia_earth_utils-0.16.11.dist-info → hestia_earth_utils-0.16.12.dist-info}/top_level.txt +0 -0
hestia_earth/utils/tools.py
CHANGED
|
@@ -8,9 +8,14 @@ from hestia_earth.schema import NodeType
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def to_precision(number: float, digits: int = 3) -> float:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
try:
|
|
12
|
+
return (
|
|
13
|
+
0
|
|
14
|
+
if not number
|
|
15
|
+
else round(number, digits - int(floor(log10(abs(number)))) - 1)
|
|
16
|
+
)
|
|
17
|
+
except ValueError:
|
|
18
|
+
return number
|
|
14
19
|
|
|
15
20
|
|
|
16
21
|
def non_empty_value(value) -> bool:
|
|
@@ -156,7 +161,8 @@ def is_number(value):
|
|
|
156
161
|
"""
|
|
157
162
|
return all(
|
|
158
163
|
[
|
|
159
|
-
|
|
164
|
+
# True is apparently considered an `int`
|
|
165
|
+
not isinstance(value, bool),
|
|
160
166
|
any([isinstance(value, int), isinstance(value, float)]),
|
|
161
167
|
]
|
|
162
168
|
)
|
hestia_earth/utils/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "0.16.
|
|
1
|
+
VERSION = "0.16.12"
|
|
@@ -14,8 +14,8 @@ hestia_earth/utils/request.py,sha256=EfitmS13abPxfl5gSAOyHRUYhk4R2Rfv94fF9lvOT00
|
|
|
14
14
|
hestia_earth/utils/stats.py,sha256=vTNyKcMKmX0DoodM9QEG7HF8qm2Wf-4ckMWQFWZ1VgE,34729
|
|
15
15
|
hestia_earth/utils/table.py,sha256=MOJDo5fQPRDogAty_UXbO9-EXFwz97m0f7--mOM17lQ,2363
|
|
16
16
|
hestia_earth/utils/term.py,sha256=aBVYuYv55nPqJPyt5mN4Fz652s_1hwUPckNUZX0pMP8,1064
|
|
17
|
-
hestia_earth/utils/tools.py,sha256=
|
|
18
|
-
hestia_earth/utils/version.py,sha256=
|
|
17
|
+
hestia_earth/utils/tools.py,sha256=b8_ZJ4lfRVwOFXzl4_Tbah1FmrGnzDx5QVgVLQmQUz4,5372
|
|
18
|
+
hestia_earth/utils/version.py,sha256=z2tz1TqNic_wxJ0cdufZWrE4ryfXE9jZgzJKKWhdm4E,20
|
|
19
19
|
hestia_earth/utils/pivot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
hestia_earth/utils/pivot/_shared.py,sha256=8-AZAAitXU53BYpOFFGnuCy5VBSphyClgIqGU-kg6CM,1436
|
|
21
21
|
hestia_earth/utils/pivot/pivot_csv.py,sha256=TtePpo9L_GKISpQMW9dwjBv2tHHE822rb-j6_bflVOA,12251
|
|
@@ -25,9 +25,9 @@ hestia_earth/utils/storage/_azure_client.py,sha256=mseexhzjteRDzzoFe2fEXe9MYLmvj
|
|
|
25
25
|
hestia_earth/utils/storage/_local_client.py,sha256=KbYqTfniIU5R5J1m_unCQip9kOz9EGIGI0OH0QvD8eo,551
|
|
26
26
|
hestia_earth/utils/storage/_s3_client.py,sha256=8TCxiHfxE7G8kdp3CnEFrxgmPwfPyci3-blsowE2T7o,3146
|
|
27
27
|
hestia_earth/utils/storage/_sns_client.py,sha256=pvtXYw-sQ8ns3mlDz7ld9iZp3FYSm0xSXSXMJ5IPnBc,380
|
|
28
|
-
hestia_earth_utils-0.16.
|
|
29
|
-
hestia_earth_utils-0.16.
|
|
30
|
-
hestia_earth_utils-0.16.
|
|
31
|
-
hestia_earth_utils-0.16.
|
|
32
|
-
hestia_earth_utils-0.16.
|
|
33
|
-
hestia_earth_utils-0.16.
|
|
28
|
+
hestia_earth_utils-0.16.12.data/scripts/hestia-format-upload,sha256=IhLAHHPJqRgUcht-M_EUEsRMbRbMfshig07o488zscM,703
|
|
29
|
+
hestia_earth_utils-0.16.12.data/scripts/hestia-pivot-csv,sha256=0YBuGuyPO8rytod6iwWEKiQdSlr9JLuD001k6U5t6no,1163
|
|
30
|
+
hestia_earth_utils-0.16.12.dist-info/METADATA,sha256=CZegpFMoj0MWumacYaibHi1BCg6IDaJDuIDtMlEzT3A,1870
|
|
31
|
+
hestia_earth_utils-0.16.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
32
|
+
hestia_earth_utils-0.16.12.dist-info/top_level.txt,sha256=q0QxKEYx9uLpAD5ZtC7Ypq29smEPfOzEAn7Xv8XHGOQ,13
|
|
33
|
+
hestia_earth_utils-0.16.12.dist-info/RECORD,,
|
{hestia_earth_utils-0.16.11.data → hestia_earth_utils-0.16.12.data}/scripts/hestia-format-upload
RENAMED
|
File without changes
|
{hestia_earth_utils-0.16.11.data → hestia_earth_utils-0.16.12.data}/scripts/hestia-pivot-csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|