hestia-earth-models 0.67.1__py3-none-any.whl → 0.68.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.
- hestia_earth/models/aware/scarcityWeightedWaterUse.py +5 -6
- hestia_earth/models/blonkConsultants2016/ch4ToAirNaturalVegetationBurning.py +1 -1
- hestia_earth/models/blonkConsultants2016/co2ToAirAboveGroundBiomassStockChangeLandUseChange.py +1 -1
- hestia_earth/models/blonkConsultants2016/n2OToAirNaturalVegetationBurningDirect.py +1 -1
- hestia_earth/models/blonkConsultants2016/utils.py +9 -9
- hestia_earth/models/cache_sites.py +26 -14
- hestia_earth/models/chaudharyBrooks2018/damageToTerrestrialEcosystemsLandOccupation.py +2 -2
- hestia_earth/models/chaudharyBrooks2018/damageToTerrestrialEcosystemsLandTransformation.py +2 -2
- hestia_earth/models/chaudharyBrooks2018/utils.py +13 -8
- hestia_earth/models/cml2001Baseline/abioticResourceDepletionFossilFuels.py +2 -3
- hestia_earth/models/cml2001Baseline/abioticResourceDepletionMineralsAndMetals.py +1 -1
- hestia_earth/models/config/Cycle.json +15 -0
- hestia_earth/models/config/ImpactAssessment.json +14 -1
- hestia_earth/models/config/Site.json +8 -0
- hestia_earth/models/cycle/excretaKgMass.py +2 -2
- hestia_earth/models/cycle/materialAndSubstrate.py +3 -2
- hestia_earth/models/cycle/pastureGrass.py +3 -3
- hestia_earth/models/dammgen2009/noxToAirExcreta.py +1 -1
- hestia_earth/models/ecoinventV3AndEmberClimate/__init__.py +1 -1
- hestia_earth/models/ecoinventV3AndEmberClimate/utils.py +2 -6
- hestia_earth/models/emissionNotRelevant/__init__.py +4 -4
- hestia_earth/models/environmentalFootprintV3_1/environmentalFootprintSingleOverallScore.py +30 -21
- hestia_earth/models/environmentalFootprintV3_1/photochemicalOzoneCreationPotentialHumanHealthNmvocEq.py +36 -0
- hestia_earth/models/environmentalFootprintV3_1/scarcityWeightedWaterUse.py +2 -2
- hestia_earth/models/environmentalFootprintV3_1/soilQualityIndexLandOccupation.py +9 -8
- hestia_earth/models/environmentalFootprintV3_1/soilQualityIndexLandTransformation.py +25 -22
- hestia_earth/models/environmentalFootprintV3_1/soilQualityIndexTotalLandUseEffects.py +7 -6
- hestia_earth/models/faostat2018/coldCarcassWeightPerHead.py +2 -2
- hestia_earth/models/faostat2018/coldDressedCarcassWeightPerHead.py +2 -2
- hestia_earth/models/faostat2018/liveweightPerHead.py +7 -8
- hestia_earth/models/faostat2018/product/price.py +34 -28
- hestia_earth/models/faostat2018/readyToCookWeightPerHead.py +2 -2
- hestia_earth/models/faostat2018/utils.py +15 -27
- hestia_earth/models/frischknechtEtAl2000/ionisingRadiationKbqU235Eq.py +16 -9
- hestia_earth/models/geospatialDatabase/altitude.py +60 -0
- hestia_earth/models/geospatialDatabase/croppingIntensity.py +1 -1
- hestia_earth/models/geospatialDatabase/ecoClimateZone.py +2 -2
- hestia_earth/models/geospatialDatabase/longFallowRatio.py +1 -1
- hestia_earth/models/geospatialDatabase/utils.py +4 -1
- hestia_earth/models/globalCropWaterModel2008/rootingDepth.py +2 -3
- hestia_earth/models/haversineFormula/transport/distance.py +3 -3
- hestia_earth/models/hestia/landCover.py +72 -45
- hestia_earth/models/hestia/seed_emissions.py +11 -7
- hestia_earth/models/impact_assessment/__init__.py +3 -3
- hestia_earth/models/ipcc2019/animal/fatContent.py +1 -1
- hestia_earth/models/ipcc2019/animal/hoursWorkedPerDay.py +1 -1
- hestia_earth/models/ipcc2019/animal/liveweightGain.py +1 -1
- hestia_earth/models/ipcc2019/animal/liveweightPerHead.py +1 -1
- hestia_earth/models/ipcc2019/animal/milkYieldPerAnimal.py +1 -1
- hestia_earth/models/ipcc2019/animal/pastureGrass.py +1 -1
- hestia_earth/models/ipcc2019/animal/pregnancyRateTotal.py +1 -1
- hestia_earth/models/ipcc2019/animal/trueProteinContent.py +1 -1
- hestia_earth/models/ipcc2019/animal/utils.py +5 -7
- hestia_earth/models/ipcc2019/animal/weightAtMaturity.py +1 -1
- hestia_earth/models/ipcc2019/ch4ToAirEntericFermentation.py +2 -2
- hestia_earth/models/ipcc2019/ch4ToAirExcreta.py +6 -7
- hestia_earth/models/ipcc2019/ch4ToAirFloodedRice.py +5 -3
- hestia_earth/models/ipcc2019/co2ToAirCarbonStockChange_utils.py +1 -1
- hestia_earth/models/ipcc2019/croppingDuration.py +3 -6
- hestia_earth/models/ipcc2019/nonCo2EmissionsToAirNaturalVegetationBurning.py +947 -0
- hestia_earth/models/ipcc2019/pastureGrass.py +1 -1
- hestia_earth/models/koble2014/residueBurnt.py +5 -7
- hestia_earth/models/koble2014/residueRemoved.py +5 -7
- hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthWaterStress.py +2 -2
- hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthWaterStress.py +2 -2
- hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthWaterStress.py +2 -2
- hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthWaterStress.py +2 -2
- hestia_earth/models/log.py +1 -1
- hestia_earth/models/mocking/search-results.json +3413 -1113
- hestia_earth/models/site/management.py +1 -1
- hestia_earth/models/site/post_checks/__init__.py +3 -2
- hestia_earth/models/site/post_checks/country.py +9 -0
- hestia_earth/models/site/pre_checks/__init__.py +3 -2
- hestia_earth/models/site/pre_checks/country.py +9 -0
- hestia_earth/models/utils/__init__.py +1 -16
- hestia_earth/models/utils/blank_node.py +25 -25
- hestia_earth/models/utils/completeness.py +3 -2
- hestia_earth/models/utils/cycle.py +5 -4
- hestia_earth/models/utils/emission.py +5 -5
- hestia_earth/models/utils/feedipedia.py +6 -6
- hestia_earth/models/utils/impact_assessment.py +1 -2
- hestia_earth/models/utils/indicator.py +9 -7
- hestia_earth/models/utils/inorganicFertiliser.py +4 -6
- hestia_earth/models/utils/input.py +6 -5
- hestia_earth/models/utils/lookup.py +32 -100
- hestia_earth/models/utils/management.py +4 -4
- hestia_earth/models/utils/measurement.py +6 -7
- hestia_earth/models/utils/method.py +20 -0
- hestia_earth/models/utils/practice.py +4 -5
- hestia_earth/models/utils/product.py +4 -5
- hestia_earth/models/utils/property.py +12 -22
- hestia_earth/models/utils/site.py +14 -8
- hestia_earth/models/utils/term.py +27 -1
- hestia_earth/models/version.py +1 -1
- hestia_earth/orchestrator/log.py +0 -11
- hestia_earth/orchestrator/models/__init__.py +17 -4
- hestia_earth/orchestrator/strategies/run/add_blank_node_if_missing.py +2 -20
- {hestia_earth_models-0.67.1.dist-info → hestia_earth_models-0.68.0.dist-info}/METADATA +2 -2
- {hestia_earth_models-0.67.1.dist-info → hestia_earth_models-0.68.0.dist-info}/RECORD +145 -137
- tests/models/cml2001Baseline/test_abioticResourceDepletionFossilFuels.py +3 -3
- tests/models/cml2001Baseline/test_resourceUseEnergyDepletionDuringCycle.py +1 -1
- tests/models/cycle/test_coldCarcassWeightPerHead.py +1 -1
- tests/models/cycle/test_coldDressedCarcassWeightPerHead.py +1 -1
- tests/models/cycle/test_concentrateFeed.py +1 -1
- tests/models/cycle/test_energyContentLowerHeatingValue.py +1 -1
- tests/models/cycle/test_excretaKgMass.py +1 -1
- tests/models/cycle/test_feedConversionRatio.py +3 -3
- tests/models/cycle/test_pastureGrass.py +1 -1
- tests/models/cycle/test_readyToCookWeightPerHead.py +1 -1
- tests/models/environmentalFootprintV3_1/test_photochemicalOzoneCreationPotentialHumanHealthNmvocEq.py +30 -0
- tests/models/environmentalFootprintV3_1/test_soilQualityIndexTotalLandUseEffects.py +30 -7
- tests/models/faostat2018/product/test_price.py +27 -14
- tests/models/faostat2018/test_faostat_utils.py +4 -24
- tests/models/faostat2018/test_liveweightPerHead.py +9 -9
- tests/models/globalCropWaterModel2008/test_rootingDepth.py +7 -3
- tests/models/haversineFormula/transport/test_distance.py +1 -1
- tests/models/hestia/test_landCover.py +53 -5
- tests/models/ipcc2019/animal/test_pastureGrass.py +5 -3
- tests/models/ipcc2019/test_aboveGroundCropResidueTotal.py +4 -4
- tests/models/ipcc2019/test_belowGroundCropResidue.py +4 -4
- tests/models/ipcc2019/test_ch4ToAirEntericFermentation.py +10 -10
- tests/models/ipcc2019/test_croppingDuration.py +1 -1
- tests/models/ipcc2019/test_nonCo2EmissionsToAirNaturalVegetationBurning.py +83 -0
- tests/models/ipcc2019/test_organicCarbonPerHa.py +12 -12
- tests/models/ipcc2019/test_pastureGrass.py +5 -3
- tests/models/pooreNemecek2018/test_excretaKgN.py +5 -5
- tests/models/pooreNemecek2018/test_excretaKgVs.py +2 -2
- tests/models/site/post_checks/test_country.py +6 -0
- tests/models/site/pre_checks/test_cache_geospatialDatabase.py +1 -1
- tests/models/site/pre_checks/test_country.py +12 -0
- tests/models/test_ecoinventV3.py +7 -3
- tests/models/utils/test_blank_node.py +4 -12
- tests/models/utils/test_dataCompleteness.py +5 -5
- tests/models/utils/test_emission.py +2 -2
- tests/models/utils/test_indicator.py +2 -2
- tests/models/utils/test_input.py +2 -2
- tests/models/utils/test_measurement.py +2 -4
- tests/models/utils/test_practice.py +4 -2
- tests/models/utils/test_product.py +2 -2
- tests/models/utils/test_property.py +4 -2
- tests/models/utils/test_site.py +7 -0
- tests/orchestrator/strategies/run/test_add_blank_node_if_missing.py +4 -9
- hestia_earth/models/environmentalFootprintV3_1/utils.py +0 -17
- tests/models/utils/test_lookup.py +0 -10
- {hestia_earth_models-0.67.1.dist-info → hestia_earth_models-0.68.0.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.67.1.dist-info → hestia_earth_models-0.68.0.dist-info}/WHEEL +0 -0
- {hestia_earth_models-0.67.1.dist-info → hestia_earth_models-0.68.0.dist-info}/top_level.txt +0 -0
@@ -140,7 +140,7 @@ LOOKUPS = {
|
|
140
140
|
"mjKgABNetEnergyGrowthSheepGoatsIpcc2019",
|
141
141
|
"isWoolProducingAnimal"
|
142
142
|
],
|
143
|
-
"system-liveAnimal-activityCoefficient-ipcc2019": "
|
143
|
+
"system-liveAnimal-activityCoefficient-ipcc2019": "",
|
144
144
|
"landCover": "grazedPastureGrassInputId",
|
145
145
|
"crop-property": ["energyDigestibilityRuminants", "energyContentHigherHeatingValue"],
|
146
146
|
"crop": "grazedPastureGrassInputId",
|
@@ -1,8 +1,8 @@
|
|
1
|
-
from hestia_earth.utils.lookup import get_table_value, download_lookup, column_name
|
2
1
|
from hestia_earth.utils.tools import safe_parse_float
|
3
2
|
|
4
|
-
from hestia_earth.models.log import logRequirements
|
3
|
+
from hestia_earth.models.log import logRequirements
|
5
4
|
from hestia_earth.models.utils.term import get_lookup_value
|
5
|
+
from hestia_earth.models.utils.lookup import get_region_lookup_value
|
6
6
|
from . import MODEL
|
7
7
|
from .utils import _should_run, _practice
|
8
8
|
|
@@ -17,7 +17,7 @@ REQUIREMENTS = {
|
|
17
17
|
}
|
18
18
|
LOOKUPS = {
|
19
19
|
"crop": ["cropGroupingResidue", "Combustion_Factor_crop_residue"],
|
20
|
-
"region-crop-cropGroupingResidue-burnt": "
|
20
|
+
"region-crop-cropGroupingResidue-burnt": ""
|
21
21
|
}
|
22
22
|
RETURNS = {
|
23
23
|
"Practice": [{
|
@@ -30,12 +30,10 @@ LOOKUP_NAME = 'region-crop-cropGroupingResidue-burnt.csv'
|
|
30
30
|
|
31
31
|
def _get_default_percent(cycle: dict, term: dict, country_id: str):
|
32
32
|
crop_grouping = get_lookup_value(term, LOOKUPS['crop'][0], model=MODEL, term=TERM_ID)
|
33
|
-
lookup = download_lookup(LOOKUP_NAME)
|
34
33
|
percent = safe_parse_float(
|
35
|
-
|
34
|
+
get_region_lookup_value(LOOKUP_NAME, country_id, crop_grouping, model=MODEL, term=TERM_ID), None
|
36
35
|
) if crop_grouping else None
|
37
|
-
|
38
|
-
comb_factor = safe_parse_float(get_lookup_value(term, LOOKUPS['crop'][1], model=MODEL, term=TERM_ID))
|
36
|
+
comb_factor = safe_parse_float(get_lookup_value(term, LOOKUPS['crop'][1]))
|
39
37
|
logRequirements(cycle, model=MODEL, term=TERM_ID,
|
40
38
|
crop_grouping=crop_grouping,
|
41
39
|
country_id=country_id,
|
@@ -1,8 +1,8 @@
|
|
1
|
-
from hestia_earth.utils.lookup import get_table_value, download_lookup, column_name
|
2
1
|
from hestia_earth.utils.tools import safe_parse_float
|
3
2
|
|
4
|
-
from hestia_earth.models.log import logRequirements
|
3
|
+
from hestia_earth.models.log import logRequirements
|
5
4
|
from hestia_earth.models.utils.term import get_lookup_value
|
5
|
+
from hestia_earth.models.utils.lookup import get_region_lookup_value
|
6
6
|
from . import MODEL
|
7
7
|
from .utils import _should_run, _practice
|
8
8
|
|
@@ -17,7 +17,7 @@ REQUIREMENTS = {
|
|
17
17
|
}
|
18
18
|
LOOKUPS = {
|
19
19
|
"crop": "cropGroupingResidue",
|
20
|
-
"region-crop-cropGroupingResidue-removed": "
|
20
|
+
"region-crop-cropGroupingResidue-removed": ""
|
21
21
|
}
|
22
22
|
RETURNS = {
|
23
23
|
"Practice": [{
|
@@ -30,11 +30,9 @@ LOOKUP_NAME = 'region-crop-cropGroupingResidue-removed.csv'
|
|
30
30
|
|
31
31
|
def _get_default_percent(cycle: dict, term: dict, country_id: str):
|
32
32
|
crop_grouping = get_lookup_value(term, LOOKUPS['crop'], model=MODEL, term=TERM_ID)
|
33
|
-
percent =
|
34
|
-
|
33
|
+
percent = get_region_lookup_value(
|
34
|
+
LOOKUP_NAME, country_id, crop_grouping, model=MODEL, term=TERM_ID
|
35
35
|
) if crop_grouping else None
|
36
|
-
debugMissingLookup(LOOKUP_NAME, 'termid', country_id, crop_grouping, percent,
|
37
|
-
model=MODEL, term=TERM_ID)
|
38
36
|
logRequirements(cycle, model=MODEL, term=TERM_ID,
|
39
37
|
crop_grouping=crop_grouping,
|
40
38
|
country_id=country_id,
|
@@ -22,8 +22,8 @@ RETURNS = {
|
|
22
22
|
}
|
23
23
|
LOOKUPS = {
|
24
24
|
"@doc": "Different lookup files are used depending on the situation",
|
25
|
-
"awareWaterBasinId-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": "
|
26
|
-
"region-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": "
|
25
|
+
"awareWaterBasinId-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": "",
|
26
|
+
"region-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": ""
|
27
27
|
}
|
28
28
|
TERM_ID = 'damageToHumanHealthWaterStress'
|
29
29
|
LOOKUP_SUFFIX = 'resourceUse-WaterStressDamageToHumanHealthLCImpactCF'
|
@@ -22,8 +22,8 @@ RETURNS = {
|
|
22
22
|
}
|
23
23
|
LOOKUPS = {
|
24
24
|
"@doc": "Different lookup files are used depending on the situation",
|
25
|
-
"awareWaterBasinId-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": "
|
26
|
-
"region-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": "
|
25
|
+
"awareWaterBasinId-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": "",
|
26
|
+
"region-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": ""
|
27
27
|
}
|
28
28
|
TERM_ID = 'damageToHumanHealthWaterStress'
|
29
29
|
LOOKUP_SUFFIX = 'resourceUse-WaterStressDamageToHumanHealthLCImpactCF'
|
@@ -22,8 +22,8 @@ RETURNS = {
|
|
22
22
|
}
|
23
23
|
LOOKUPS = {
|
24
24
|
"@doc": "Different lookup files are used depending on the situation",
|
25
|
-
"awareWaterBasinId-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": "
|
26
|
-
"region-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": "
|
25
|
+
"awareWaterBasinId-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": "",
|
26
|
+
"region-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": ""
|
27
27
|
}
|
28
28
|
TERM_ID = 'damageToHumanHealthWaterStress'
|
29
29
|
LOOKUP_SUFFIX = 'resourceUse-WaterStressDamageToHumanHealthLCImpactCF'
|
@@ -22,8 +22,8 @@ RETURNS = {
|
|
22
22
|
}
|
23
23
|
LOOKUPS = {
|
24
24
|
"@doc": "Different lookup files are used depending on the situation",
|
25
|
-
"awareWaterBasinId-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": "
|
26
|
-
"region-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": "
|
25
|
+
"awareWaterBasinId-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": "",
|
26
|
+
"region-resourceUse-WaterStressDamageToHumanHealthLCImpactCF": ""
|
27
27
|
}
|
28
28
|
TERM_ID = 'damageToHumanHealthWaterStress'
|
29
29
|
LOOKUP_SUFFIX = 'resourceUse-WaterStressDamageToHumanHealthLCImpactCF'
|
hestia_earth/models/log.py
CHANGED
@@ -65,7 +65,7 @@ def logShouldRun(log_node: dict, model: str, term: Union[str, None], should_run:
|
|
65
65
|
def debugMissingLookup(lookup_name: str, row: str, row_value: str, col: str, value, **kwargs):
|
66
66
|
if value is None or value == '':
|
67
67
|
extra = (', ' + _join_args(**kwargs)) if len(kwargs.keys()) > 0 else ''
|
68
|
-
logger.warning('Missing lookup
|
68
|
+
logger.warning(f'Missing lookup={lookup_name}, {row}={row_value}, column={col}' + extra)
|
69
69
|
|
70
70
|
|
71
71
|
def logErrorRun(model: str, term: str, error: str):
|