hestia-earth-models 0.54.3__py3-none-any.whl → 0.55.0__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/cycle/completeness/{other.py → seed.py} +5 -5
- hestia_earth/models/cycle/completeness/{soilAmendments.py → soilAmendment.py} +4 -4
- hestia_earth/models/cycle/product/economicValueShare.py +2 -2
- hestia_earth/models/environmentalFootprintV3/freshwaterEcotoxicityPotentialCtue.py +1 -1
- hestia_earth/models/geospatialDatabase/drainageClass.py +2 -2
- hestia_earth/models/ipcc2019/co2ToAirLimeHydrolysis.py +3 -1
- hestia_earth/models/ipcc2019/organicCarbonPerHa.py +1 -1
- hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +1 -1
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthHumanToxicityCancerogenic.py +1 -1
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthHumanToxicityNonCancerogenic.py +1 -1
- hestia_earth/models/lcImpactAllEffects100Years/damageToMarineEcosystemsMarineEcotoxicity.py +1 -1
- hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +1 -1
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +1 -1
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthHumanToxicityCancerogenic.py +1 -1
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthHumanToxicityNonCancerogenic.py +1 -1
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToMarineEcosystemsMarineEcotoxicity.py +1 -1
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +1 -1
- hestia_earth/models/lcImpactCertainEffects100Years/damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +1 -1
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthHumanToxicityCancerogenic.py +1 -1
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthHumanToxicityNonCancerogenic.py +1 -1
- hestia_earth/models/lcImpactCertainEffects100Years/damageToMarineEcosystemsMarineEcotoxicity.py +1 -1
- hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +1 -1
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +1 -1
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthHumanToxicityCancerogenic.py +1 -1
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthHumanToxicityNonCancerogenic.py +1 -1
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToMarineEcosystemsMarineEcotoxicity.py +1 -1
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +1 -1
- hestia_earth/models/mocking/search-results.json +17 -17
- hestia_earth/models/pooreNemecek2018/excretaKgN.py +2 -2
- hestia_earth/models/pooreNemecek2018/excretaKgVs.py +2 -2
- hestia_earth/models/pooreNemecek2018/no3ToGroundwaterCropResidueDecomposition.py +1 -1
- hestia_earth/models/pooreNemecek2018/no3ToGroundwaterExcreta.py +1 -1
- hestia_earth/models/pooreNemecek2018/no3ToGroundwaterInorganicFertiliser.py +1 -1
- hestia_earth/models/pooreNemecek2018/no3ToGroundwaterOrganicFertiliser.py +1 -1
- hestia_earth/models/pooreNemecek2018/no3ToGroundwaterSoilFlux.py +1 -1
- hestia_earth/models/recipe2016Egalitarian/ecosystemDamageOzoneFormation.py +1 -1
- hestia_earth/models/recipe2016Egalitarian/freshwaterAquaticEcotoxicityPotential14Dcbeq.py +1 -1
- hestia_earth/models/recipe2016Egalitarian/humanCarcinogenicToxicity.py +1 -1
- hestia_earth/models/recipe2016Egalitarian/humanDamageOzoneFormation.py +1 -1
- hestia_earth/models/recipe2016Egalitarian/humanNonCarcinogenicToxicity.py +1 -1
- hestia_earth/models/recipe2016Egalitarian/marineAquaticEcotoxicityPotential14Dcbeq.py +1 -1
- hestia_earth/models/recipe2016Egalitarian/terrestrialEcotoxicityPotential14Dcbeq.py +1 -1
- hestia_earth/models/recipe2016Hierarchist/ecosystemDamageOzoneFormation.py +1 -1
- hestia_earth/models/recipe2016Hierarchist/freshwaterAquaticEcotoxicityPotential14Dcbeq.py +1 -1
- hestia_earth/models/recipe2016Hierarchist/humanCarcinogenicToxicity.py +1 -1
- hestia_earth/models/recipe2016Hierarchist/humanDamageOzoneFormation.py +1 -1
- hestia_earth/models/recipe2016Hierarchist/humanNonCarcinogenicToxicity.py +1 -1
- hestia_earth/models/recipe2016Hierarchist/marineAquaticEcotoxicityPotential14Dcbeq.py +1 -1
- hestia_earth/models/recipe2016Hierarchist/terrestrialEcotoxicityPotential14Dcbeq.py +1 -1
- hestia_earth/models/recipe2016Individualist/ecosystemDamageOzoneFormation.py +1 -1
- hestia_earth/models/recipe2016Individualist/freshwaterAquaticEcotoxicityPotential14Dcbeq.py +1 -1
- hestia_earth/models/recipe2016Individualist/humanCarcinogenicToxicity.py +1 -1
- hestia_earth/models/recipe2016Individualist/humanDamageOzoneFormation.py +1 -1
- hestia_earth/models/recipe2016Individualist/humanNonCarcinogenicToxicity.py +1 -1
- hestia_earth/models/recipe2016Individualist/marineAquaticEcotoxicityPotential14Dcbeq.py +1 -1
- hestia_earth/models/recipe2016Individualist/terrestrialEcotoxicityPotential14Dcbeq.py +1 -1
- hestia_earth/models/schmidt2007/utils.py +1 -1
- hestia_earth/models/stehfestBouwman2006/n2OToAirCropResidueDecompositionDirect.py +1 -1
- hestia_earth/models/stehfestBouwman2006/n2OToAirExcretaDirect.py +1 -1
- hestia_earth/models/stehfestBouwman2006/n2OToAirInorganicFertiliserDirect.py +1 -1
- hestia_earth/models/stehfestBouwman2006/n2OToAirOrganicFertiliserDirect.py +1 -1
- hestia_earth/models/stehfestBouwman2006/n2OToAirSoilFlux.py +1 -1
- hestia_earth/models/stehfestBouwman2006/noxToAirCropResidueDecomposition.py +1 -1
- hestia_earth/models/stehfestBouwman2006/noxToAirExcreta.py +1 -1
- hestia_earth/models/stehfestBouwman2006/noxToAirInorganicFertiliser.py +1 -1
- hestia_earth/models/stehfestBouwman2006/noxToAirOrganicFertiliser.py +1 -1
- hestia_earth/models/stehfestBouwman2006/noxToAirSoilFlux.py +1 -1
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirCropResidueDecomposition.py +1 -1
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirExcreta.py +1 -1
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirInorganicFertiliser.py +1 -1
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirOrganicFertiliser.py +1 -1
- hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirSoilFlux.py +1 -1
- hestia_earth/models/usetoxV2/freshwaterEcotoxicityPotentialCtue.py +1 -1
- hestia_earth/models/utils/cycle.py +3 -3
- hestia_earth/models/utils/pesticideAI.py +2 -2
- hestia_earth/models/utils/product.py +2 -0
- hestia_earth/models/version.py +1 -1
- {hestia_earth_models-0.54.3.dist-info → hestia_earth_models-0.55.0.dist-info}/METADATA +2 -2
- {hestia_earth_models-0.54.3.dist-info → hestia_earth_models-0.55.0.dist-info}/RECORD +88 -88
- tests/models/cycle/completeness/{test_other.py → test_seed.py} +1 -1
- tests/models/cycle/completeness/{test_soilAmendments.py → test_soilAmendment.py} +1 -1
- tests/models/cycle/product/test_economicValueShare.py +2 -2
- tests/models/pooreNemecek2018/test_excretaKgN.py +2 -2
- tests/models/pooreNemecek2018/test_excretaKgVs.py +2 -2
- tests/models/utils/test_source.py +1 -1
- {hestia_earth_models-0.54.3.dist-info → hestia_earth_models-0.55.0.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.54.3.dist-info → hestia_earth_models-0.55.0.dist-info}/WHEEL +0 -0
- {hestia_earth_models-0.54.3.dist-info → hestia_earth_models-0.55.0.dist-info}/top_level.txt +0 -0
|
@@ -10,7 +10,7 @@ REQUIREMENTS = {
|
|
|
10
10
|
"emissionsResourceUse": [{"@type": "Indicator", "value": "", "term.termType": "emission"}],
|
|
11
11
|
"cycle": {
|
|
12
12
|
"@type": "Cycle",
|
|
13
|
-
"completeness.
|
|
13
|
+
"completeness.pesticideVeterinaryDrug": "True",
|
|
14
14
|
"inputs": [{"@type": "Input", "value": "", "term.termType": "pesticideAI"}]
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -10,7 +10,7 @@ REQUIREMENTS = {
|
|
|
10
10
|
"emissionsResourceUse": [{"@type": "Indicator", "value": "", "term.termType": "emission"}],
|
|
11
11
|
"cycle": {
|
|
12
12
|
"@type": "Cycle",
|
|
13
|
-
"completeness.
|
|
13
|
+
"completeness.pesticideVeterinaryDrug": "True",
|
|
14
14
|
"inputs": [{"@type": "Input", "value": "", "term.termType": "pesticideAI"}]
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -10,7 +10,7 @@ REQUIREMENTS = {
|
|
|
10
10
|
"emissionsResourceUse": [{"@type": "Indicator", "value": "", "term.termType": "emission"}],
|
|
11
11
|
"cycle": {
|
|
12
12
|
"@type": "Cycle",
|
|
13
|
-
"completeness.
|
|
13
|
+
"completeness.pesticideVeterinaryDrug": "True",
|
|
14
14
|
"inputs": [{"@type": "Input", "value": "", "term.termType": "pesticideAI"}]
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -11,6 +11,6 @@ def get_waste_values(term_id: str, cycle: dict, lookup_col: str):
|
|
|
11
11
|
values = non_empty_list(map(factor_value(None, term_id, f"{TermTermType.WASTE.value}.csv", lookup_col), products))
|
|
12
12
|
return [0] if all([
|
|
13
13
|
len(values) == 0,
|
|
14
|
-
_is_term_type_complete(cycle, {'termType':
|
|
14
|
+
_is_term_type_complete(cycle, {'termType': TermTermType.WASTE.value}),
|
|
15
15
|
cycle.get('@type', cycle.get('type')) == NodeType.CYCLE.value # ignore adding 0 value for Transformation
|
|
16
16
|
]) else values
|
|
@@ -77,7 +77,7 @@ def get_crop_residue_on_field_N_total(cycle: dict) -> float:
|
|
|
77
77
|
blg_residue_nitrogen(products),
|
|
78
78
|
discarded_residue_on_field_nitrogen_content(products)
|
|
79
79
|
])
|
|
80
|
-
return total if _is_term_type_complete(cycle, {'termType':
|
|
80
|
+
return total if _is_term_type_complete(cycle, {'termType': TermTermType.CROPRESIDUE.value}) else 0
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
CROP_RESIDUE_DECOMPOSITION_PRODUCT_IDS = [
|
|
@@ -115,7 +115,7 @@ def get_excreta_N_total(cycle: dict) -> float:
|
|
|
115
115
|
|
|
116
116
|
The result is the sum of every excreta specified in `kg N` as an `Input` or a `Product`.
|
|
117
117
|
|
|
118
|
-
Note: in the event where `completeness.
|
|
118
|
+
Note: in the event where `completeness.product` is set to `True` and there are no excreta inputs or products,
|
|
119
119
|
`0` will be returned.
|
|
120
120
|
|
|
121
121
|
Parameters
|
|
@@ -131,7 +131,7 @@ def get_excreta_N_total(cycle: dict) -> float:
|
|
|
131
131
|
inputs = filter_list_term_type(cycle.get('inputs', []), TermTermType.EXCRETA)
|
|
132
132
|
products = filter_list_term_type(cycle.get('products', []), TermTermType.EXCRETA)
|
|
133
133
|
values = get_N_total(inputs) + get_N_total(products)
|
|
134
|
-
return 0 if len(values) == 0 and _is_term_type_complete(cycle, {'termType': '
|
|
134
|
+
return 0 if len(values) == 0 and _is_term_type_complete(cycle, {'termType': 'product'}) else list_sum(values)
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
def get_organic_fertiliser_N_total(cycle: dict) -> float:
|
|
@@ -8,7 +8,7 @@ from .cycle import impact_lookup_value as cycle_lookup_value
|
|
|
8
8
|
|
|
9
9
|
def impact_lookup_value(model: str, term_id: str, impact_assessment: dict, lookup_col: str):
|
|
10
10
|
cycle = impact_assessment.get('cycle', {})
|
|
11
|
-
pesticides_complete = cycle.get('completeness', {}).get('
|
|
11
|
+
pesticides_complete = cycle.get('completeness', {}).get('pesticideVeterinaryDrug', False)
|
|
12
12
|
product = get_product(impact_assessment)
|
|
13
13
|
pesticides = filter_list_term_type(cycle.get('inputs', []), TermTermType.PESTICIDEAI)
|
|
14
14
|
has_pesticides_inputs = len(pesticides) > 0
|
|
@@ -16,7 +16,7 @@ def impact_lookup_value(model: str, term_id: str, impact_assessment: dict, looku
|
|
|
16
16
|
product, cycle_lookup_value(model, term_id, pesticides, lookup_col, False), model=model, term_id=term_id
|
|
17
17
|
)
|
|
18
18
|
logRequirements(impact_assessment, model=model, term=term_id,
|
|
19
|
-
|
|
19
|
+
term_type_pesticideVeterinaryDrug_complete=pesticides_complete,
|
|
20
20
|
has_pesticides_inputs=has_pesticides_inputs)
|
|
21
21
|
|
|
22
22
|
should_run = any([
|
|
@@ -47,6 +47,8 @@ def _match_el(source: dict, dest: dict, fields: list):
|
|
|
47
47
|
|
|
48
48
|
def find_by_product(node: dict, product: dict, list_key: str = 'products'):
|
|
49
49
|
keys = UNIQUENESS_FIELDS.get(node.get('type', node.get('@type')), {}).get(list_key, ['term.@id'])
|
|
50
|
+
# ignore properties
|
|
51
|
+
keys = [k for k in keys if not k.startswith('properties.')]
|
|
50
52
|
products = node.get(list_key, [])
|
|
51
53
|
return next((p for p in products if _match_el(p, product, keys)), None)
|
|
52
54
|
|
hestia_earth/models/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = '0.
|
|
1
|
+
VERSION = '0.55.0'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hestia-earth-models
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.55.0
|
|
4
4
|
Summary: Hestia's set of modules for filling gaps in the activity data using external datasets (e.g. populating soil properties with a geospatial dataset using provided coordinates) and internal lookups (e.g. populating machinery use from fuel use). Includes rules for when gaps should be filled versus not (e.g. never gap fill yield, gap fill crop residue if yield provided etc.).
|
|
5
5
|
Home-page: https://gitlab.com/hestia-earth/hestia-engine-models
|
|
6
6
|
Author: Hestia Team
|
|
@@ -11,7 +11,7 @@ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.6
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: hestia-earth.schema ==
|
|
14
|
+
Requires-Dist: hestia-earth.schema ==25.*
|
|
15
15
|
Requires-Dist: hestia-earth.utils >=0.11.12
|
|
16
16
|
Requires-Dist: python-dateutil >=2.8.1
|
|
17
17
|
Requires-Dist: CurrencyConverter ==0.16.8
|