hestia-earth-utils 0.16.3__tar.gz → 0.16.4__tar.gz
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-0.16.3/hestia_earth_utils.egg-info → hestia_earth_utils-0.16.4}/PKG-INFO +1 -1
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/csv_utils.py +3 -5
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/lookup.py +0 -3
- hestia_earth_utils-0.16.4/hestia_earth/utils/version.py +1 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4/hestia_earth_utils.egg-info}/PKG-INFO +1 -1
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_lookup.py +7 -0
- hestia_earth_utils-0.16.3/hestia_earth/utils/version.py +0 -1
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/MANIFEST.in +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/README.md +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/bin/hestia-format-upload +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/bin/hestia-pivot-csv +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/__init__.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/api.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/blank_node.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/calculation_status.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/cycle.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/date.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/descriptive_stats.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/emission.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/lookup_utils.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/model.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/pipeline.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/pivot/__init__.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/pivot/_shared.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/pivot/pivot_csv.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/pivot/pivot_json.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/request.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/stats.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/storage/__init__.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/storage/_azure_client.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/storage/_local_client.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/storage/_s3_client.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/storage/_sns_client.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/table.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/term.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/tools.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth_utils.egg-info/SOURCES.txt +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth_utils.egg-info/dependency_links.txt +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth_utils.egg-info/requires.txt +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth_utils.egg-info/top_level.txt +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/setup.cfg +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/setup.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_api.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_blank_node.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_calculation_status.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_cycle.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_date.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_descriptive_stats.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_emission.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_lookup_utils.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_model.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_pipeline.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_request.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_stats.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_table.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_term.py +0 -0
- {hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/tests/test_tools.py +0 -0
|
@@ -26,12 +26,10 @@ def _text_to_csv(csv_content: str):
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def _csv_reader_converter(field_str_bytes):
|
|
29
|
-
field_str = field_str_bytes if isinstance(field_str_bytes, str) else field_str_bytes.decode('utf-8')
|
|
30
|
-
reader = _text_to_csv(field_str)
|
|
31
|
-
|
|
32
29
|
try:
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
field_str = field_str_bytes if isinstance(field_str_bytes, str) else field_str_bytes.decode('utf-8')
|
|
31
|
+
return _replace_missing_values(field_str)
|
|
32
|
+
except Exception:
|
|
35
33
|
return str(_MISSING)
|
|
36
34
|
|
|
37
35
|
|
|
@@ -2,7 +2,6 @@ from functools import reduce
|
|
|
2
2
|
from typing import Union
|
|
3
3
|
import requests
|
|
4
4
|
import numpy
|
|
5
|
-
import traceback
|
|
6
5
|
|
|
7
6
|
from .storage import _load_from_storage
|
|
8
7
|
from .request import request_url, web_url
|
|
@@ -92,8 +91,6 @@ def download_lookup(filename: str, keep_in_memory: bool = True, build_index: boo
|
|
|
92
91
|
try:
|
|
93
92
|
return _memory_wrapper(filename, load) if keep_in_memory else load()
|
|
94
93
|
except Exception:
|
|
95
|
-
stack = traceback.format_exc()
|
|
96
|
-
print(stack)
|
|
97
94
|
return None
|
|
98
95
|
|
|
99
96
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = '0.16.4'
|
|
@@ -154,3 +154,10 @@ def test_get_data_advanced():
|
|
|
154
154
|
lookup = download_lookup('liveAnimal.csv')
|
|
155
155
|
value = get_table_value(lookup, 'termid', 'sheepRam', column_name('ratioCPregnancyNetEnergyPregnancyIpcc2019'))
|
|
156
156
|
assert value == ''
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def test_grouping_with_comma():
|
|
160
|
+
lookup = download_lookup('animalProduct.csv')
|
|
161
|
+
term_id = 'meatChickenReadyToCookWeight'
|
|
162
|
+
value = get_table_value(lookup, 'termid', term_id, column_name('animalProductGroupingFAO'))
|
|
163
|
+
assert value == 'Meat of chickens, fresh or chilled'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = '0.16.3'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/calculation_status.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/descriptive_stats.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/pivot/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/pivot/pivot_csv.py
RENAMED
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/pivot/pivot_json.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/storage/__init__.py
RENAMED
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/storage/_azure_client.py
RENAMED
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/storage/_local_client.py
RENAMED
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/storage/_s3_client.py
RENAMED
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth/utils/storage/_sns_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth_utils.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth_utils.egg-info/requires.txt
RENAMED
|
File without changes
|
{hestia_earth_utils-0.16.3 → hestia_earth_utils-0.16.4}/hestia_earth_utils.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|