hestia-earth-models 0.64.6__py3-none-any.whl → 0.64.7__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.
Potentially problematic release.
This version of hestia-earth-models might be problematic. Click here for more details.
- hestia_earth/models/environmentalFootprintV3/soilQualityIndexLandOccupation.py +23 -22
- hestia_earth/models/mocking/search-results.json +26 -2002
- hestia_earth/models/pooreNemecek2018/landOccupationDuringCycle.py +11 -7
- hestia_earth/models/transformation/input/excreta.py +9 -13
- hestia_earth/models/version.py +1 -1
- {hestia_earth_models-0.64.6.dist-info → hestia_earth_models-0.64.7.dist-info}/METADATA +1 -1
- {hestia_earth_models-0.64.6.dist-info → hestia_earth_models-0.64.7.dist-info}/RECORD +13 -13
- tests/models/environmentalFootprintV3/test_freshwaterEcotoxicityPotentialCtue.py +4 -2
- tests/models/environmentalFootprintV3/test_soilQualityIndexLandOccupation.py +16 -24
- tests/models/pooreNemecek2018/test_landOccupationDuringCycle.py +4 -1
- {hestia_earth_models-0.64.6.dist-info → hestia_earth_models-0.64.7.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.64.6.dist-info → hestia_earth_models-0.64.7.dist-info}/WHEEL +0 -0
- {hestia_earth_models-0.64.6.dist-info → hestia_earth_models-0.64.7.dist-info}/top_level.txt +0 -0
|
@@ -12,34 +12,34 @@ from . import MODEL
|
|
|
12
12
|
from .utils import get_coefficient_factor
|
|
13
13
|
|
|
14
14
|
REQUIREMENTS = {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
"ImpactAssessment": {
|
|
16
|
+
"cycle": {
|
|
17
|
+
"@type": "Cycle",
|
|
18
|
+
"siteDuration": "> 0",
|
|
19
|
+
"siteArea": "> 0",
|
|
20
|
+
"site": {
|
|
21
|
+
"siteType": "",
|
|
22
|
+
"@type": "Site",
|
|
23
|
+
"management": [{"@type": "Management", "value": "", "term.termType": "landCover"}],
|
|
24
|
+
"country": {"@type": "Term", "termType": "region"}
|
|
25
|
+
},
|
|
26
|
+
"optional": {
|
|
27
|
+
"otherSitesDuration": "> 0",
|
|
28
|
+
"otherSitesArea": "> 0",
|
|
29
|
+
"otherSites": [{
|
|
29
30
|
"@type": "Site",
|
|
31
|
+
"siteType": "",
|
|
30
32
|
"management": [{"@type": "Management", "value": "", "term.termType": "landCover"}],
|
|
31
33
|
"country": {"@type": "Term", "termType": "region"}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
+
}]
|
|
35
|
+
}
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
39
|
LOOKUPS = {
|
|
38
40
|
"@doc": "Performs lookup on landCover.csv for column headers and region-pefTermGrouping-landOccupation.csv for CFs",
|
|
39
41
|
"region-pefTermGrouping-landOccupation": "",
|
|
40
|
-
"landCover":
|
|
41
|
-
"pefTermGrouping"
|
|
42
|
-
]
|
|
42
|
+
"landCover": "pefTermGrouping"
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
RETURNS = {
|
|
@@ -62,7 +62,8 @@ def _run(sites: list):
|
|
|
62
62
|
return _indicator(list_sum(values)) if values else None
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
def _should_run(
|
|
65
|
+
def _should_run(impact_assessment: dict):
|
|
66
|
+
cycle = impact_assessment.get('cycle', {})
|
|
66
67
|
end_date = cycle.get('endDate')
|
|
67
68
|
|
|
68
69
|
has_site = bool(cycle.get('site', False))
|
|
@@ -123,6 +124,6 @@ def _should_run(cycle: dict):
|
|
|
123
124
|
return should_run, valid_sites
|
|
124
125
|
|
|
125
126
|
|
|
126
|
-
def run(
|
|
127
|
-
should_run, sites = _should_run(
|
|
127
|
+
def run(impact_assessment: dict):
|
|
128
|
+
should_run, sites = _should_run(impact_assessment)
|
|
128
129
|
return _run(sites) if should_run else None
|