hestia-earth-models 0.74.17__py3-none-any.whl → 0.75.1__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/__init__.py +0 -3
- hestia_earth/models/aware/scarcityWeightedWaterUse.py +2 -4
- hestia_earth/models/aware2_0/scarcityWeightedWaterUse.py +2 -5
- hestia_earth/models/chaudharyBrooks2018/utils.py +2 -2
- hestia_earth/models/cml2001Baseline/abioticResourceDepletionFossilFuels.py +3 -2
- hestia_earth/models/cml2001Baseline/abioticResourceDepletionMineralsAndMetals.py +13 -6
- hestia_earth/models/ecoalimV9/utils.py +3 -3
- hestia_earth/models/ecoinventV3/utils.py +2 -2
- hestia_earth/models/ecoinventV3AndEmberClimate/utils.py +2 -2
- hestia_earth/models/emissionNotRelevant/__init__.py +2 -2
- hestia_earth/models/environmentalFootprintV3_1/environmentalFootprintSingleOverallScore.py +1 -2
- hestia_earth/models/environmentalFootprintV3_1/soilQualityIndexLandOccupation.py +8 -5
- hestia_earth/models/faostat2018/utils.py +3 -3
- hestia_earth/models/frischknechtEtAl2000/ionisingRadiationKbqU235Eq.py +5 -4
- hestia_earth/models/geospatialDatabase/ecoClimateZone.py +2 -2
- hestia_earth/models/hestia/landCover_utils.py +8 -12
- hestia_earth/models/hestia/management.py +3 -3
- hestia_earth/models/hestia/seed_emissions.py +2 -2
- hestia_earth/models/ipcc2019/ch4ToAirEntericFermentation.py +12 -9
- hestia_earth/models/ipcc2019/ch4ToAirExcreta.py +2 -2
- hestia_earth/models/ipcc2019/nonCo2EmissionsToAirNaturalVegetationBurning.py +2 -2
- hestia_earth/models/ipcc2019/pastureGrass_utils.py +6 -3
- hestia_earth/models/ipcc2019/utils.py +3 -2
- hestia_earth/models/linkedImpactAssessment/emissions.py +2 -2
- hestia_earth/models/mocking/search-results.json +1 -1
- hestia_earth/models/requirements.py +2 -2
- hestia_earth/models/utils/aggregated.py +2 -2
- hestia_earth/models/utils/background_emissions.py +6 -5
- hestia_earth/models/utils/ecoClimateZone.py +7 -8
- hestia_earth/models/utils/excretaManagement.py +3 -3
- hestia_earth/models/utils/feedipedia.py +7 -7
- hestia_earth/models/utils/input.py +2 -2
- hestia_earth/models/utils/liveAnimal.py +4 -4
- hestia_earth/models/utils/lookup.py +15 -20
- hestia_earth/models/utils/property.py +3 -3
- hestia_earth/models/utils/term.py +5 -5
- hestia_earth/models/version.py +1 -1
- hestia_earth/orchestrator/__init__.py +0 -3
- hestia_earth/orchestrator/models/transformations.py +2 -2
- {hestia_earth_models-0.74.17.dist-info → hestia_earth_models-0.75.1.dist-info}/METADATA +10 -14
- {hestia_earth_models-0.74.17.dist-info → hestia_earth_models-0.75.1.dist-info}/RECORD +44 -668
- {hestia_earth_models-0.74.17.dist-info → hestia_earth_models-0.75.1.dist-info}/WHEEL +1 -1
- {hestia_earth_models-0.74.17.dist-info → hestia_earth_models-0.75.1.dist-info}/top_level.txt +0 -1
- hestia_earth/__init__.py +0 -1
- tests/models/__init__.py +0 -0
- tests/models/agribalyse2016/__init__.py +0 -0
- tests/models/agribalyse2016/test_fuelElectricity.py +0 -42
- tests/models/agribalyse2016/test_machineryInfrastructureDepreciatedAmountPerCycle.py +0 -36
- tests/models/akagiEtAl2011/__init__.py +0 -0
- tests/models/akagiEtAl2011/test_ch4ToAirCropResidueBurning.py +0 -33
- tests/models/akagiEtAl2011/test_nh3ToAirCropResidueBurning.py +0 -33
- tests/models/akagiEtAl2011/test_noxToAirCropResidueBurning.py +0 -33
- tests/models/akagiEtAl2011/test_pm25ToAirCropResidueBurning.py +0 -33
- tests/models/akagiEtAl2011/test_so2ToAirCropResidueBurning.py +0 -33
- tests/models/akagiEtAl2011/test_utils.py +0 -19
- tests/models/aware/__init__.py +0 -0
- tests/models/aware/test_scarcityWeightedWaterUse.py +0 -57
- tests/models/aware2_0/__init__.py +0 -0
- tests/models/aware2_0/test_scarcityWeightedWaterUse.py +0 -58
- tests/models/chaudharyBrooks2018/__init__.py +0 -0
- tests/models/chaudharyBrooks2018/test_damageToTerrestrialEcosystemsLandOccupation.py +0 -58
- tests/models/chaudharyBrooks2018/test_damageToTerrestrialEcosystemsLandTransformation.py +0 -58
- tests/models/chaudharyBrooks2018/test_damageToTerrestrialEcosystemsTotalLandUseEffects.py +0 -20
- tests/models/cml2001Baseline/__init__.py +0 -0
- tests/models/cml2001Baseline/test_abioticResourceDepletionFossilFuels.py +0 -141
- tests/models/cml2001Baseline/test_abioticResourceDepletionMineralsAndMetals.py +0 -105
- tests/models/cml2001Baseline/test_eutrophicationPotentialExcludingFate.py +0 -23
- tests/models/cml2001Baseline/test_resourceUseEnergyDepletionDuringCycle.py +0 -136
- tests/models/cml2001Baseline/test_resourceUseEnergyDepletionInputsProduction.py +0 -23
- tests/models/cml2001Baseline/test_resourceUseMineralsAndMetalsDuringCycle.py +0 -58
- tests/models/cml2001Baseline/test_resourceUseMineralsAndMetalsInputsProduction.py +0 -23
- tests/models/cml2001Baseline/test_terrestrialAcidificationPotentialIncludingFateAverageEurope.py +0 -25
- tests/models/cml2001NonBaseline/__init__.py +0 -0
- tests/models/cml2001NonBaseline/test_eutrophicationPotentialIncludingFateAverageEurope.py +0 -23
- tests/models/cml2001NonBaseline/test_terrestrialAcidificationPotentialExcludingFate.py +0 -23
- tests/models/cycle/__init__.py +0 -0
- tests/models/cycle/animal/__init__.py +0 -0
- tests/models/cycle/animal/input/__init__.py +0 -0
- tests/models/cycle/animal/input/test_hestiaAggregatedData.py +0 -40
- tests/models/cycle/animal/input/test_properties.py +0 -55
- tests/models/cycle/animal/test_milkYield.py +0 -30
- tests/models/cycle/animal/test_properties.py +0 -20
- tests/models/cycle/completeness/__init__.py +0 -0
- tests/models/cycle/completeness/test_animalFeed.py +0 -14
- tests/models/cycle/completeness/test_cropResidue.py +0 -19
- tests/models/cycle/completeness/test_electricityFuel.py +0 -21
- tests/models/cycle/completeness/test_excretaManagement.py +0 -14
- tests/models/cycle/completeness/test_freshForage.py +0 -21
- tests/models/cycle/completeness/test_material.py +0 -18
- tests/models/cycle/completeness/test_seed.py +0 -36
- tests/models/cycle/completeness/test_soilAmendment.py +0 -23
- tests/models/cycle/input/__init__.py +0 -0
- tests/models/cycle/input/test_hestiaAggregatedData.py +0 -91
- tests/models/cycle/input/test_properties.py +0 -55
- tests/models/cycle/input/test_value.py +0 -41
- tests/models/cycle/post_checks/__init__.py +0 -0
- tests/models/cycle/post_checks/test_cache.py +0 -8
- tests/models/cycle/post_checks/test_otherSites.py +0 -15
- tests/models/cycle/post_checks/test_site.py +0 -26
- tests/models/cycle/practice/__init__.py +0 -0
- tests/models/cycle/practice/test_landCover.py +0 -27
- tests/models/cycle/practice/test_value.py +0 -52
- tests/models/cycle/pre_checks/__init__.py +0 -0
- tests/models/cycle/pre_checks/test_otherSites.py +0 -21
- tests/models/cycle/pre_checks/test_site.py +0 -33
- tests/models/cycle/product/__init__.py +0 -0
- tests/models/cycle/product/test_currency.py +0 -41
- tests/models/cycle/product/test_economicValueShare.py +0 -158
- tests/models/cycle/product/test_price.py +0 -29
- tests/models/cycle/product/test_primary.py +0 -75
- tests/models/cycle/product/test_properties.py +0 -32
- tests/models/cycle/product/test_revenue.py +0 -32
- tests/models/cycle/product/test_value.py +0 -41
- tests/models/cycle/test_aboveGroundCropResidueTotal.py +0 -20
- tests/models/cycle/test_completeness.py +0 -51
- tests/models/cycle/test_cycleDuration.py +0 -31
- tests/models/cycle/test_endDate.py +0 -38
- tests/models/cycle/test_otherSitesArea.py +0 -68
- tests/models/cycle/test_otherSitesUnusedDuration.py +0 -54
- tests/models/cycle/test_post_checks.py +0 -11
- tests/models/cycle/test_pre_checks.py +0 -11
- tests/models/cycle/test_siteArea.py +0 -51
- tests/models/cycle/test_siteDuration.py +0 -83
- tests/models/cycle/test_siteUnusedDuration.py +0 -55
- tests/models/cycle/test_startDate.py +0 -58
- tests/models/cycle/test_startDateDefinition.py +0 -31
- tests/models/cycle/test_transformations.py +0 -17
- tests/models/dammgen2009/__init__.py +0 -0
- tests/models/dammgen2009/test_noxToAirExcreta.py +0 -58
- tests/models/data/__init__.py +0 -0
- tests/models/data/test_hestiaAggregatedData.py +0 -32
- tests/models/deRuijterEtAl2010/__init__.py +0 -0
- tests/models/deRuijterEtAl2010/test_nh3ToAirCropResidueDecomposition.py +0 -57
- tests/models/ecoalimV9/__init__.py +0 -0
- tests/models/ecoalimV9/test_cycle.py +0 -22
- tests/models/ecoalimV9/test_impact_assessment.py +0 -24
- tests/models/ecoinventV3/__init__.py +0 -0
- tests/models/ecoinventV3/test_cycle.py +0 -69
- tests/models/ecoinventV3AndEmberClimate/__init__.py +0 -0
- tests/models/ecoinventV3AndEmberClimate/test_cycle.py +0 -28
- tests/models/edip2003/__init__.py +0 -0
- tests/models/edip2003/test_ozoneDepletionPotential.py +0 -21
- tests/models/emepEea2019/__init__.py +0 -0
- tests/models/emepEea2019/test_co2ToAirFuelCombustion.py +0 -34
- tests/models/emepEea2019/test_n2OToAirFuelCombustionDirect.py +0 -34
- tests/models/emepEea2019/test_nh3ToAirExcreta.py +0 -36
- tests/models/emepEea2019/test_nh3ToAirFuelCombustion.py +0 -34
- tests/models/emepEea2019/test_nh3ToAirInorganicFertiliser.py +0 -64
- tests/models/emepEea2019/test_noxToAirFuelCombustion.py +0 -34
- tests/models/emepEea2019/test_pm10ToAirAnimalHousing.py +0 -21
- tests/models/emepEea2019/test_pm25ToAirAnimalHousing.py +0 -21
- tests/models/emepEea2019/test_so2ToAirFuelCombustion.py +0 -34
- tests/models/emepEea2019/test_tspToAirAnimalHousing.py +0 -21
- tests/models/emepEea2019/test_utils.py +0 -204
- tests/models/environmentalFootprintV3_1/__init__.py +0 -0
- tests/models/environmentalFootprintV3_1/test_environmentalFootprintSingleOverallScore.py +0 -138
- tests/models/environmentalFootprintV3_1/test_freshwaterEcotoxicityPotentialCtue.py +0 -26
- tests/models/environmentalFootprintV3_1/test_marineEutrophicationPotential.py +0 -21
- tests/models/environmentalFootprintV3_1/test_photochemicalOzoneCreationPotentialHumanHealthNmvocEq.py +0 -30
- tests/models/environmentalFootprintV3_1/test_scarcityWeightedWaterUse.py +0 -27
- tests/models/environmentalFootprintV3_1/test_soilQualityIndexLandOccupation.py +0 -160
- tests/models/environmentalFootprintV3_1/test_soilQualityIndexLandTransformation.py +0 -184
- tests/models/environmentalFootprintV3_1/test_soilQualityIndexTotalLandUseEffects.py +0 -78
- tests/models/epa2014/__init__.py +0 -0
- tests/models/epa2014/test_no3ToGroundwaterExcreta.py +0 -38
- tests/models/fantkeEtAl2016/__init__.py +0 -0
- tests/models/fantkeEtAl2016/test_damageToHumanHealthParticulateMatterFormation.py +0 -20
- tests/models/faostat2018/__init__.py +0 -0
- tests/models/faostat2018/product/__init__.py +0 -0
- tests/models/faostat2018/product/test_price.py +0 -117
- tests/models/faostat2018/test_coldCarcassWeightPerHead.py +0 -58
- tests/models/faostat2018/test_coldDressedCarcassWeightPerHead.py +0 -54
- tests/models/faostat2018/test_faostat_utils.py +0 -64
- tests/models/faostat2018/test_liveweightPerHead.py +0 -134
- tests/models/faostat2018/test_readyToCookWeightPerHead.py +0 -54
- tests/models/faostat2018/test_seed.py +0 -50
- tests/models/faostat2018/test_utils.py +0 -28
- tests/models/frischknechtEtAl2000/__init__.py +0 -0
- tests/models/frischknechtEtAl2000/test_ionisingRadiationKbqU235Eq.py +0 -138
- tests/models/geospatialDatabase/__init__.py +0 -0
- tests/models/geospatialDatabase/test_awareWaterBasinId.py +0 -27
- tests/models/geospatialDatabase/test_clayContent.py +0 -49
- tests/models/geospatialDatabase/test_croppingIntensity.py +0 -33
- tests/models/geospatialDatabase/test_drainageClass.py +0 -29
- tests/models/geospatialDatabase/test_ecoClimateZone.py +0 -32
- tests/models/geospatialDatabase/test_ecoregion.py +0 -27
- tests/models/geospatialDatabase/test_erodibility.py +0 -29
- tests/models/geospatialDatabase/test_heavyWinterPrecipitation.py +0 -29
- tests/models/geospatialDatabase/test_histosol.py +0 -33
- tests/models/geospatialDatabase/test_longFallowRatio.py +0 -33
- tests/models/geospatialDatabase/test_nutrientLossToAquaticEnvironment.py +0 -29
- tests/models/geospatialDatabase/test_organicCarbonPerKgSoil.py +0 -43
- tests/models/geospatialDatabase/test_potentialEvapotranspirationAnnual.py +0 -19
- tests/models/geospatialDatabase/test_potentialEvapotranspirationLongTermAnnualMean.py +0 -30
- tests/models/geospatialDatabase/test_potentialEvapotranspirationMonthly.py +0 -20
- tests/models/geospatialDatabase/test_precipitationAnnual.py +0 -20
- tests/models/geospatialDatabase/test_precipitationLongTermAnnualMean.py +0 -29
- tests/models/geospatialDatabase/test_precipitationMonthly.py +0 -20
- tests/models/geospatialDatabase/test_region.py +0 -27
- tests/models/geospatialDatabase/test_sandContent.py +0 -49
- tests/models/geospatialDatabase/test_siltContent.py +0 -37
- tests/models/geospatialDatabase/test_slope.py +0 -29
- tests/models/geospatialDatabase/test_slopeLength.py +0 -29
- tests/models/geospatialDatabase/test_soilPh.py +0 -43
- tests/models/geospatialDatabase/test_temperatureAnnual.py +0 -20
- tests/models/geospatialDatabase/test_temperatureLongTermAnnualMean.py +0 -29
- tests/models/geospatialDatabase/test_temperatureMonthly.py +0 -20
- tests/models/geospatialDatabase/test_totalNitrogenPerKgSoil.py +0 -43
- tests/models/geospatialDatabase/test_totalPhosphorusPerKgSoil.py +0 -29
- tests/models/geospatialDatabase/test_utils.py +0 -39
- tests/models/geospatialDatabase/test_waterDepth.py +0 -28
- tests/models/globalCropWaterModel2008/__init__.py +0 -0
- tests/models/globalCropWaterModel2008/test_rootingDepth.py +0 -84
- tests/models/haversineFormula/__init__.py +0 -0
- tests/models/haversineFormula/transport/__init__.py +0 -0
- tests/models/haversineFormula/transport/test_distance.py +0 -28
- tests/models/hestia/__init__.py +0 -0
- tests/models/hestia/test_aboveGroundCropResidue.py +0 -40
- tests/models/hestia/test_aboveGroundCropResidueTotal.py +0 -41
- tests/models/hestia/test_brackishWater.py +0 -32
- tests/models/hestia/test_cationExchangeCapacityPerKgSoil.py +0 -34
- tests/models/hestia/test_coldCarcassWeightPerHead.py +0 -47
- tests/models/hestia/test_coldDressedCarcassWeightPerHead.py +0 -47
- tests/models/hestia/test_concentrateFeed.py +0 -52
- tests/models/hestia/test_cropResidueManagement.py +0 -53
- tests/models/hestia/test_croppingIntensity.py +0 -53
- tests/models/hestia/test_default_emissions.py +0 -32
- tests/models/hestia/test_default_resourceUse.py +0 -32
- tests/models/hestia/test_energyContentLowerHeatingValue.py +0 -40
- tests/models/hestia/test_excretaKgMass.py +0 -97
- tests/models/hestia/test_excretaKgN.py +0 -36
- tests/models/hestia/test_excretaKgVs.py +0 -36
- tests/models/hestia/test_feedConversionRatio.py +0 -64
- tests/models/hestia/test_flowingWater.py +0 -44
- tests/models/hestia/test_freshWater.py +0 -32
- tests/models/hestia/test_histosol.py +0 -24
- tests/models/hestia/test_inorganicFertiliser.py +0 -20
- tests/models/hestia/test_irrigatedTypeUnspecified.py +0 -59
- tests/models/hestia/test_landCover.py +0 -100
- tests/models/hestia/test_landCover_utils.py +0 -233
- tests/models/hestia/test_landOccupationDuringCycle.py +0 -75
- tests/models/hestia/test_landTransformation100YearAverageDuringCycle.py +0 -30
- tests/models/hestia/test_landTransformation20YearAverageDuringCycle.py +0 -29
- tests/models/hestia/test_liveAnimal.py +0 -64
- tests/models/hestia/test_longFallowRatio.py +0 -49
- tests/models/hestia/test_management.py +0 -80
- tests/models/hestia/test_materialsAndSubstrate.py +0 -49
- tests/models/hestia/test_milkYield.py +0 -58
- tests/models/hestia/test_netPrimaryProduction.py +0 -38
- tests/models/hestia/test_organicCarbonPerHa.py +0 -104
- tests/models/hestia/test_organicCarbonPerKgSoil.py +0 -34
- tests/models/hestia/test_organicCarbonPerM3Soil.py +0 -34
- tests/models/hestia/test_organicMatterPerKgSoil.py +0 -34
- tests/models/hestia/test_organicMatterPerM3Soil.py +0 -34
- tests/models/hestia/test_pToSurfaceWaterAquacultureSystems.py +0 -56
- tests/models/hestia/test_pastureGrass.py +0 -31
- tests/models/hestia/test_pastureSystem.py +0 -47
- tests/models/hestia/test_potentialEvapotranspirationAnnual.py +0 -32
- tests/models/hestia/test_potentialEvapotranspirationMonthly.py +0 -32
- tests/models/hestia/test_precipitationAnnual.py +0 -32
- tests/models/hestia/test_precipitationMonthly.py +0 -32
- tests/models/hestia/test_rainfallAnnual.py +0 -32
- tests/models/hestia/test_rainfallMonthly.py +0 -32
- tests/models/hestia/test_readyToCookWeightPerHead.py +0 -47
- tests/models/hestia/test_residueBurnt.py +0 -37
- tests/models/hestia/test_residueIncorporated.py +0 -48
- tests/models/hestia/test_residueLeftOnField.py +0 -37
- tests/models/hestia/test_residueRemoved.py +0 -32
- tests/models/hestia/test_salineWater.py +0 -32
- tests/models/hestia/test_seed_emissions.py +0 -27
- tests/models/hestia/test_slope.py +0 -23
- tests/models/hestia/test_slopeLength.py +0 -23
- tests/models/hestia/test_soilClassification.py +0 -72
- tests/models/hestia/test_soilMeasurement.py +0 -156
- tests/models/hestia/test_stockingDensityAnimalHousingAverage.py +0 -42
- tests/models/hestia/test_temperatureAnnual.py +0 -32
- tests/models/hestia/test_temperatureMonthly.py +0 -32
- tests/models/hestia/test_totalNitrogenPerKgSoil.py +0 -36
- tests/models/hestia/test_unknownPreSeasonWaterRegime.py +0 -36
- tests/models/hestia/test_waterDepth.py +0 -34
- tests/models/hestia/test_waterSalinity.py +0 -38
- tests/models/impact_assessment/__init__.py +0 -0
- tests/models/impact_assessment/post_checks/__init__.py +0 -0
- tests/models/impact_assessment/post_checks/test_cycle.py +0 -28
- tests/models/impact_assessment/post_checks/test_remove_cache_fields.py +0 -6
- tests/models/impact_assessment/post_checks/test_remove_no_value.py +0 -17
- tests/models/impact_assessment/post_checks/test_site.py +0 -28
- tests/models/impact_assessment/pre_checks/__init__.py +0 -0
- tests/models/impact_assessment/pre_checks/test_cycle.py +0 -39
- tests/models/impact_assessment/pre_checks/test_site.py +0 -37
- tests/models/impact_assessment/product/__init__.py +0 -0
- tests/models/impact_assessment/product/test_economicValueShare.py +0 -36
- tests/models/impact_assessment/product/test_value.py +0 -36
- tests/models/impact_assessment/test_allocationMethod.py +0 -48
- tests/models/impact_assessment/test_emissions.py +0 -31
- tests/models/impact_assessment/test_irrigated.py +0 -14
- tests/models/impact_assessment/test_oganic.py +0 -14
- tests/models/impact_assessment/test_post_checks.py +0 -11
- tests/models/impact_assessment/test_pre_checks.py +0 -11
- tests/models/ipcc2006/__init__.py +0 -0
- tests/models/ipcc2006/test_aboveGroundCropResidueRemoved.py +0 -36
- tests/models/ipcc2006/test_aboveGroundCropResidueTotal.py +0 -48
- tests/models/ipcc2006/test_belowGroundCropResidue.py +0 -45
- tests/models/ipcc2006/test_n2OToAirCropResidueDecompositionDirect.py +0 -53
- tests/models/ipcc2006/test_n2OToAirCropResidueDecompositionIndirect.py +0 -45
- tests/models/ipcc2006/test_n2OToAirExcretaDirect.py +0 -68
- tests/models/ipcc2006/test_n2OToAirExcretaIndirect.py +0 -45
- tests/models/ipcc2006/test_n2OToAirInorganicFertiliserDirect.py +0 -55
- tests/models/ipcc2006/test_n2OToAirInorganicFertiliserIndirect.py +0 -43
- tests/models/ipcc2006/test_n2OToAirOrganicFertiliserDirect.py +0 -55
- tests/models/ipcc2006/test_n2OToAirOrganicFertiliserIndirect.py +0 -55
- tests/models/ipcc2013ExcludingFeedbacks/__init__.py +0 -0
- tests/models/ipcc2013ExcludingFeedbacks/test_gwp100.py +0 -23
- tests/models/ipcc2013IncludingFeedbacks/__init__.py +0 -0
- tests/models/ipcc2013IncludingFeedbacks/test_gwp100.py +0 -23
- tests/models/ipcc2019/__init__.py +0 -0
- tests/models/ipcc2019/animal/__init__.py +0 -0
- tests/models/ipcc2019/animal/test_fatContent.py +0 -22
- tests/models/ipcc2019/animal/test_hoursWorkedPerDay.py +0 -22
- tests/models/ipcc2019/animal/test_liveweightGain.py +0 -22
- tests/models/ipcc2019/animal/test_liveweightPerHead.py +0 -22
- tests/models/ipcc2019/animal/test_milkYieldPerAnimal.py +0 -21
- tests/models/ipcc2019/animal/test_pastureGrass.py +0 -47
- tests/models/ipcc2019/animal/test_pregnancyRateTotal.py +0 -22
- tests/models/ipcc2019/animal/test_trueProteinContent.py +0 -22
- tests/models/ipcc2019/animal/test_weightAtMaturity.py +0 -21
- tests/models/ipcc2019/test_aboveGroundBiomass.py +0 -189
- tests/models/ipcc2019/test_aboveGroundCropResidueTotal.py +0 -51
- tests/models/ipcc2019/test_belowGroundBiomass.py +0 -189
- tests/models/ipcc2019/test_belowGroundCropResidue.py +0 -77
- tests/models/ipcc2019/test_biocharOrganicCarbonPerHa.py +0 -132
- tests/models/ipcc2019/test_biomass_utils.py +0 -115
- tests/models/ipcc2019/test_carbonContent.py +0 -119
- tests/models/ipcc2019/test_ch4ToAirAquacultureSystems.py +0 -60
- tests/models/ipcc2019/test_ch4ToAirEntericFermentation.py +0 -199
- tests/models/ipcc2019/test_ch4ToAirExcreta.py +0 -83
- tests/models/ipcc2019/test_ch4ToAirFloodedRice.py +0 -25
- tests/models/ipcc2019/test_ch4ToAirOrganicSoilCultivation.py +0 -62
- tests/models/ipcc2019/test_co2ToAirAboveGroundBiomassStockChange.py +0 -120
- tests/models/ipcc2019/test_co2ToAirBelowGroundBiomassStockChange.py +0 -118
- tests/models/ipcc2019/test_co2ToAirBiocharStockChange.py +0 -90
- tests/models/ipcc2019/test_co2ToAirCarbonStockChange_utils.py +0 -50
- tests/models/ipcc2019/test_co2ToAirLimeHydrolysis.py +0 -49
- tests/models/ipcc2019/test_co2ToAirOrganicSoilCultivation.py +0 -63
- tests/models/ipcc2019/test_co2ToAirSoilOrganicCarbonStockChange.py +0 -151
- tests/models/ipcc2019/test_co2ToAirUreaHydrolysis.py +0 -30
- tests/models/ipcc2019/test_croppingDuration.py +0 -55
- tests/models/ipcc2019/test_ligninContent.py +0 -119
- tests/models/ipcc2019/test_n2OToAirAquacultureSystemsIndirect.py +0 -45
- tests/models/ipcc2019/test_n2OToAirCropResidueBurningDirect.py +0 -46
- tests/models/ipcc2019/test_n2OToAirCropResidueBurningIndirect.py +0 -45
- tests/models/ipcc2019/test_n2OToAirCropResidueDecompositionDirect.py +0 -79
- tests/models/ipcc2019/test_n2OToAirCropResidueDecompositionIndirect.py +0 -45
- tests/models/ipcc2019/test_n2OToAirExcretaDirect.py +0 -50
- tests/models/ipcc2019/test_n2OToAirExcretaIndirect.py +0 -45
- tests/models/ipcc2019/test_n2OToAirFuelCombustionIndirect.py +0 -45
- tests/models/ipcc2019/test_n2OToAirInorganicFertiliserDirect.py +0 -79
- tests/models/ipcc2019/test_n2OToAirInorganicFertiliserIndirect.py +0 -45
- tests/models/ipcc2019/test_n2OToAirNaturalVegetationBurningIndirect.py +0 -45
- tests/models/ipcc2019/test_n2OToAirOrganicFertiliserDirect.py +0 -79
- tests/models/ipcc2019/test_n2OToAirOrganicFertiliserIndirect.py +0 -45
- tests/models/ipcc2019/test_n2OToAirOrganicSoilBurningIndirect.py +0 -45
- tests/models/ipcc2019/test_n2OToAirOrganicSoilCultivationDirect.py +0 -62
- tests/models/ipcc2019/test_n2OToAirOrganicSoilCultivationIndirect.py +0 -45
- tests/models/ipcc2019/test_n2OToAir_indirect_emissions_utils.py +0 -19
- tests/models/ipcc2019/test_nh3ToAirInorganicFertiliser.py +0 -47
- tests/models/ipcc2019/test_nh3ToAirOrganicFertiliser.py +0 -35
- tests/models/ipcc2019/test_nitrogenContent.py +0 -107
- tests/models/ipcc2019/test_no3ToGroundwaterCropResidueDecomposition.py +0 -51
- tests/models/ipcc2019/test_no3ToGroundwaterExcreta.py +0 -64
- tests/models/ipcc2019/test_no3ToGroundwaterInorganicFertiliser.py +0 -48
- tests/models/ipcc2019/test_no3ToGroundwaterOrganicFertiliser.py +0 -48
- tests/models/ipcc2019/test_nonCo2EmissionsToAirNaturalVegetationBurning.py +0 -97
- tests/models/ipcc2019/test_noxToAirInorganicFertiliser.py +0 -47
- tests/models/ipcc2019/test_noxToAirOrganicFertiliser.py +0 -35
- tests/models/ipcc2019/test_organicCarbonPerHa.py +0 -415
- tests/models/ipcc2019/test_organicCarbonPerHa_tier_1.py +0 -465
- tests/models/ipcc2019/test_organicCarbonPerHa_tier_2.py +0 -148
- tests/models/ipcc2019/test_organicCarbonPerHa_utils.py +0 -31
- tests/models/ipcc2019/test_pastureGrass.py +0 -68
- tests/models/ipcc2021/__init__.py +0 -0
- tests/models/ipcc2021/test_gwp100.py +0 -23
- tests/models/jarvisAndPain1994/__init__.py +0 -0
- tests/models/jarvisAndPain1994/test_n2ToAirExcreta.py +0 -37
- tests/models/koble2014/__init__.py +0 -0
- tests/models/koble2014/test_cropResidueManagement.py +0 -19
- tests/models/koble2014/test_residueBurnt.py +0 -20
- tests/models/koble2014/test_residueLeftOnField.py +0 -21
- tests/models/koble2014/test_residueRemoved.py +0 -20
- tests/models/koble2014/test_utils.py +0 -52
- tests/models/lcImpactAllEffects100Years/__init__.py +0 -0
- tests/models/lcImpactAllEffects100Years/test_damageToFreshwaterEcosystemsClimateChange.py +0 -23
- tests/models/lcImpactAllEffects100Years/test_damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +0 -25
- tests/models/lcImpactAllEffects100Years/test_damageToFreshwaterEcosystemsFreshwaterEutrophication.py +0 -25
- tests/models/lcImpactAllEffects100Years/test_damageToFreshwaterEcosystemsPdfYear.py +0 -20
- tests/models/lcImpactAllEffects100Years/test_damageToFreshwaterEcosystemsWaterStress.py +0 -21
- tests/models/lcImpactAllEffects100Years/test_damageToHumanHealth.py +0 -20
- tests/models/lcImpactAllEffects100Years/test_damageToHumanHealthClimateChange.py +0 -23
- tests/models/lcImpactAllEffects100Years/test_damageToHumanHealthHumanToxicityCancerogenic.py +0 -25
- tests/models/lcImpactAllEffects100Years/test_damageToHumanHealthHumanToxicityNonCancerogenic.py +0 -25
- tests/models/lcImpactAllEffects100Years/test_damageToHumanHealthParticulateMatterFormation.py +0 -25
- tests/models/lcImpactAllEffects100Years/test_damageToHumanHealthPhotochemicalOzoneFormation.py +0 -25
- tests/models/lcImpactAllEffects100Years/test_damageToHumanHealthStratosphericOzoneDepletion.py +0 -25
- tests/models/lcImpactAllEffects100Years/test_damageToHumanHealthWaterStress.py +0 -32
- tests/models/lcImpactAllEffects100Years/test_damageToMarineEcosystemsMarineEcotoxicity.py +0 -25
- tests/models/lcImpactAllEffects100Years/test_damageToMarineEcosystemsMarineEutrophication.py +0 -25
- tests/models/lcImpactAllEffects100Years/test_damageToMarineEcosystemsPdfYear.py +0 -20
- tests/models/lcImpactAllEffects100Years/test_damageToTerrestrialEcosystemsClimateChange.py +0 -25
- tests/models/lcImpactAllEffects100Years/test_damageToTerrestrialEcosystemsPdfYear.py +0 -20
- tests/models/lcImpactAllEffects100Years/test_damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +0 -25
- tests/models/lcImpactAllEffects100Years/test_damageToTerrestrialEcosystemsTerrestrialAcidification.py +0 -25
- tests/models/lcImpactAllEffects100Years/test_damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/__init__.py +0 -0
- tests/models/lcImpactAllEffectsInfinite/test_damageToFreshwaterEcosystemsClimateChange.py +0 -23
- tests/models/lcImpactAllEffectsInfinite/test_damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/test_damageToFreshwaterEcosystemsFreshwaterEutrophication.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/test_damageToFreshwaterEcosystemsPdfYear.py +0 -20
- tests/models/lcImpactAllEffectsInfinite/test_damageToFreshwaterEcosystemsWaterStress.py +0 -21
- tests/models/lcImpactAllEffectsInfinite/test_damageToHumanHealth.py +0 -20
- tests/models/lcImpactAllEffectsInfinite/test_damageToHumanHealthClimateChange.py +0 -23
- tests/models/lcImpactAllEffectsInfinite/test_damageToHumanHealthHumanToxicityCancerogenic.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/test_damageToHumanHealthHumanToxicityNonCancerogenic.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/test_damageToHumanHealthParticulateMatterFormation.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/test_damageToHumanHealthPhotochemicalOzoneFormation.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/test_damageToHumanHealthStratosphericOzoneDepletion.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/test_damageToHumanHealthWaterStress.py +0 -32
- tests/models/lcImpactAllEffectsInfinite/test_damageToMarineEcosystemsMarineEcotoxicity.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/test_damageToMarineEcosystemsMarineEutrophication.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/test_damageToMarineEcosystemsPdfYear.py +0 -20
- tests/models/lcImpactAllEffectsInfinite/test_damageToTerrestrialEcosystemsClimateChange.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/test_damageToTerrestrialEcosystemsPdfYear.py +0 -20
- tests/models/lcImpactAllEffectsInfinite/test_damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/test_damageToTerrestrialEcosystemsTerrestrialAcidification.py +0 -25
- tests/models/lcImpactAllEffectsInfinite/test_damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +0 -25
- tests/models/lcImpactCertainEffects100Years/__init__.py +0 -0
- tests/models/lcImpactCertainEffects100Years/test_damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +0 -25
- tests/models/lcImpactCertainEffects100Years/test_damageToFreshwaterEcosystemsFreshwaterEutrophication.py +0 -25
- tests/models/lcImpactCertainEffects100Years/test_damageToFreshwaterEcosystemsPdfYear.py +0 -20
- tests/models/lcImpactCertainEffects100Years/test_damageToFreshwaterEcosystemsWaterStress.py +0 -21
- tests/models/lcImpactCertainEffects100Years/test_damageToHumanHealth.py +0 -20
- tests/models/lcImpactCertainEffects100Years/test_damageToHumanHealthClimateChange.py +0 -23
- tests/models/lcImpactCertainEffects100Years/test_damageToHumanHealthHumanToxicityCancerogenic.py +0 -25
- tests/models/lcImpactCertainEffects100Years/test_damageToHumanHealthHumanToxicityNonCancerogenic.py +0 -25
- tests/models/lcImpactCertainEffects100Years/test_damageToHumanHealthParticulateMatterFormation.py +0 -25
- tests/models/lcImpactCertainEffects100Years/test_damageToHumanHealthPhotochemicalOzoneFormation.py +0 -25
- tests/models/lcImpactCertainEffects100Years/test_damageToHumanHealthStratosphericOzoneDepletion.py +0 -25
- tests/models/lcImpactCertainEffects100Years/test_damageToHumanHealthWaterStress.py +0 -32
- tests/models/lcImpactCertainEffects100Years/test_damageToMarineEcosystemsMarineEcotoxicity.py +0 -25
- tests/models/lcImpactCertainEffects100Years/test_damageToMarineEcosystemsMarineEutrophication.py +0 -25
- tests/models/lcImpactCertainEffects100Years/test_damageToMarineEcosystemsPdfYear.py +0 -20
- tests/models/lcImpactCertainEffects100Years/test_damageToTerrestrialEcosystemsClimateChange.py +0 -25
- tests/models/lcImpactCertainEffects100Years/test_damageToTerrestrialEcosystemsPdfYear.py +0 -20
- tests/models/lcImpactCertainEffects100Years/test_damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +0 -25
- tests/models/lcImpactCertainEffects100Years/test_damageToTerrestrialEcosystemsTerrestrialAcidification.py +0 -25
- tests/models/lcImpactCertainEffects100Years/test_damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/__init__.py +0 -0
- tests/models/lcImpactCertainEffectsInfinite/test_damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/test_damageToFreshwaterEcosystemsFreshwaterEutrophication.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/test_damageToFreshwaterEcosystemsPdfYear.py +0 -20
- tests/models/lcImpactCertainEffectsInfinite/test_damageToFreshwaterEcosystemsWaterStress.py +0 -21
- tests/models/lcImpactCertainEffectsInfinite/test_damageToHumanHealth.py +0 -20
- tests/models/lcImpactCertainEffectsInfinite/test_damageToHumanHealthClimateChange.py +0 -23
- tests/models/lcImpactCertainEffectsInfinite/test_damageToHumanHealthHumanToxicityCancerogenic.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/test_damageToHumanHealthHumanToxicityNonCancerogenic.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/test_damageToHumanHealthParticulateMatterFormation.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/test_damageToHumanHealthPhotochemicalOzoneFormation.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/test_damageToHumanHealthStratosphericOzoneDepletion.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/test_damageToHumanHealthWaterStress.py +0 -32
- tests/models/lcImpactCertainEffectsInfinite/test_damageToMarineEcosystemsMarineEcotoxicity.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/test_damageToMarineEcosystemsMarineEutrophication.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/test_damageToMarineEcosystemsPdfYear.py +0 -20
- tests/models/lcImpactCertainEffectsInfinite/test_damageToTerrestrialEcosystemsClimateChange.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/test_damageToTerrestrialEcosystemsPdfYear.py +0 -20
- tests/models/lcImpactCertainEffectsInfinite/test_damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/test_damageToTerrestrialEcosystemsTerrestrialAcidification.py +0 -25
- tests/models/lcImpactCertainEffectsInfinite/test_damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +0 -25
- tests/models/linkedImpactAssessment/__init__.py +0 -0
- tests/models/linkedImpactAssessment/test_emissions.py +0 -22
- tests/models/linkedImpactAssessment/test_freshwaterWithdrawalsInputsProduction.py +0 -23
- tests/models/linkedImpactAssessment/test_landOccupationInputsProduction.py +0 -23
- tests/models/linkedImpactAssessment/test_landTransformation100YearAverageInputsProduction.py +0 -25
- tests/models/linkedImpactAssessment/test_landTransformation20YearAverageInputsProduction.py +0 -25
- tests/models/pooreNemecek2018/__init__.py +0 -0
- tests/models/pooreNemecek2018/test_aboveGroundCropResidueTotal.py +0 -45
- tests/models/pooreNemecek2018/test_belowGroundCropResidue.py +0 -45
- tests/models/pooreNemecek2018/test_ch4ToAirAquacultureSystems.py +0 -79
- tests/models/pooreNemecek2018/test_excretaKgN.py +0 -124
- tests/models/pooreNemecek2018/test_excretaKgVs.py +0 -107
- tests/models/pooreNemecek2018/test_freshwaterWithdrawalsDuringCycle.py +0 -60
- tests/models/pooreNemecek2018/test_landOccupationDuringCycle.py +0 -51
- tests/models/pooreNemecek2018/test_longFallowDuration.py +0 -29
- tests/models/pooreNemecek2018/test_n2OToAirAquacultureSystemsDirect.py +0 -59
- tests/models/pooreNemecek2018/test_n2ToAirAquacultureSystems.py +0 -59
- tests/models/pooreNemecek2018/test_nh3ToAirAquacultureSystems.py +0 -80
- tests/models/pooreNemecek2018/test_no3ToGroundwaterCropResidueDecomposition.py +0 -23
- tests/models/pooreNemecek2018/test_no3ToGroundwaterExcreta.py +0 -23
- tests/models/pooreNemecek2018/test_no3ToGroundwaterInorganicFertiliser.py +0 -23
- tests/models/pooreNemecek2018/test_no3ToGroundwaterOrganicFertiliser.py +0 -23
- tests/models/pooreNemecek2018/test_noxToAirAquacultureSystems.py +0 -59
- tests/models/pooreNemecek2018/test_nurseryDensity.py +0 -29
- tests/models/pooreNemecek2018/test_nurseryDuration.py +0 -29
- tests/models/pooreNemecek2018/test_plantationDensity.py +0 -29
- tests/models/pooreNemecek2018/test_plantationLifespan.py +0 -29
- tests/models/pooreNemecek2018/test_plantationProductiveLifespan.py +0 -29
- tests/models/pooreNemecek2018/test_rotationDuration.py +0 -29
- tests/models/pooreNemecek2018/test_saplingsDepreciatedAmountPerCycle.py +0 -46
- tests/models/pooreNemecek2018/test_utils.py +0 -26
- tests/models/poschEtAl2008/__init__.py +0 -0
- tests/models/poschEtAl2008/test_terrestrialAcidificationPotentialAccumulatedExceedance.py +0 -39
- tests/models/poschEtAl2008/test_terrestrialEutrophicationPotentialAccumulatedExceedance.py +0 -39
- tests/models/recipe2016Egalitarian/__init__.py +0 -0
- tests/models/recipe2016Egalitarian/test_damageToFreshwaterEcosystemsSpeciesYear.py +0 -20
- tests/models/recipe2016Egalitarian/test_damageToHumanHealth.py +0 -20
- tests/models/recipe2016Egalitarian/test_damageToMarineEcosystemsSpeciesYear.py +0 -20
- tests/models/recipe2016Egalitarian/test_damageToResourceAvailability.py +0 -23
- tests/models/recipe2016Egalitarian/test_damageToTerrestrialEcosystemsSpeciesYear.py +0 -20
- tests/models/recipe2016Egalitarian/test_ecosystemDamageOzoneFormation.py +0 -26
- tests/models/recipe2016Egalitarian/test_fossilResourceScarcity.py +0 -23
- tests/models/recipe2016Egalitarian/test_freshwaterAquaticEcotoxicityPotential14Dcbeq.py +0 -23
- tests/models/recipe2016Egalitarian/test_freshwaterEutrophicationPotential.py +0 -23
- tests/models/recipe2016Egalitarian/test_humanCarcinogenicToxicity.py +0 -23
- tests/models/recipe2016Egalitarian/test_humanDamageOzoneFormation.py +0 -26
- tests/models/recipe2016Egalitarian/test_humanNonCarcinogenicToxicity.py +0 -23
- tests/models/recipe2016Egalitarian/test_marineAquaticEcotoxicityPotential14Dcbeq.py +0 -23
- tests/models/recipe2016Egalitarian/test_marineEutrophicationPotential.py +0 -23
- tests/models/recipe2016Egalitarian/test_ozoneDepletionPotential.py +0 -26
- tests/models/recipe2016Egalitarian/test_terrestrialAcidificationPotential.py +0 -23
- tests/models/recipe2016Egalitarian/test_terrestrialEcotoxicityPotential14Dcbeq.py +0 -23
- tests/models/recipe2016Hierarchist/__init__.py +0 -0
- tests/models/recipe2016Hierarchist/test_damageToFreshwaterEcosystemsSpeciesYear.py +0 -20
- tests/models/recipe2016Hierarchist/test_damageToHumanHealth.py +0 -20
- tests/models/recipe2016Hierarchist/test_damageToMarineEcosystemsSpeciesYear.py +0 -20
- tests/models/recipe2016Hierarchist/test_damageToResourceAvailability.py +0 -23
- tests/models/recipe2016Hierarchist/test_damageToTerrestrialEcosystemsSpeciesYear.py +0 -20
- tests/models/recipe2016Hierarchist/test_ecosystemDamageOzoneFormation.py +0 -26
- tests/models/recipe2016Hierarchist/test_fossilResourceScarcity.py +0 -23
- tests/models/recipe2016Hierarchist/test_freshwaterAquaticEcotoxicityPotential14Dcbeq.py +0 -23
- tests/models/recipe2016Hierarchist/test_freshwaterEutrophicationPotential.py +0 -23
- tests/models/recipe2016Hierarchist/test_humanCarcinogenicToxicity.py +0 -23
- tests/models/recipe2016Hierarchist/test_humanDamageOzoneFormation.py +0 -26
- tests/models/recipe2016Hierarchist/test_humanNonCarcinogenicToxicity.py +0 -23
- tests/models/recipe2016Hierarchist/test_marineAquaticEcotoxicityPotential14Dcbeq.py +0 -23
- tests/models/recipe2016Hierarchist/test_marineEutrophicationPotential.py +0 -23
- tests/models/recipe2016Hierarchist/test_ozoneDepletionPotential.py +0 -26
- tests/models/recipe2016Hierarchist/test_terrestrialAcidificationPotential.py +0 -23
- tests/models/recipe2016Hierarchist/test_terrestrialEcotoxicityPotential14Dcbeq.py +0 -23
- tests/models/recipe2016Individualist/__init__.py +0 -0
- tests/models/recipe2016Individualist/test_damageToFreshwaterEcosystemsSpeciesYear.py +0 -20
- tests/models/recipe2016Individualist/test_damageToHumanHealth.py +0 -20
- tests/models/recipe2016Individualist/test_damageToMarineEcosystemsSpeciesYear.py +0 -20
- tests/models/recipe2016Individualist/test_damageToResourceAvailability.py +0 -23
- tests/models/recipe2016Individualist/test_damageToTerrestrialEcosystemsSpeciesYear.py +0 -20
- tests/models/recipe2016Individualist/test_ecosystemDamageOzoneFormation.py +0 -26
- tests/models/recipe2016Individualist/test_fossilResourceScarcity.py +0 -23
- tests/models/recipe2016Individualist/test_freshwaterAquaticEcotoxicityPotential14Dcbeq.py +0 -23
- tests/models/recipe2016Individualist/test_freshwaterEutrophicationPotential.py +0 -23
- tests/models/recipe2016Individualist/test_humanCarcinogenicToxicity.py +0 -23
- tests/models/recipe2016Individualist/test_humanDamageOzoneFormation.py +0 -26
- tests/models/recipe2016Individualist/test_humanNonCarcinogenicToxicity.py +0 -23
- tests/models/recipe2016Individualist/test_marineAquaticEcotoxicityPotential14Dcbeq.py +0 -23
- tests/models/recipe2016Individualist/test_marineEutrophicationPotential.py +0 -23
- tests/models/recipe2016Individualist/test_ozoneDepletionPotential.py +0 -26
- tests/models/recipe2016Individualist/test_terrestrialAcidificationPotential.py +0 -23
- tests/models/recipe2016Individualist/test_terrestrialEcotoxicityPotential14Dcbeq.py +0 -23
- tests/models/schererPfister2015/__init__.py +0 -0
- tests/models/schererPfister2015/test_nErosionSoilFlux.py +0 -70
- tests/models/schererPfister2015/test_pErosionSoilFlux.py +0 -70
- tests/models/schererPfister2015/test_pToDrainageWaterSoilFlux.py +0 -33
- tests/models/schererPfister2015/test_pToGroundwaterSoilFlux.py +0 -33
- tests/models/schererPfister2015/test_pToSurfaceWaterSoilFlux.py +0 -45
- tests/models/schmidt2007/__init__.py +0 -0
- tests/models/schmidt2007/test_ch4ToAirWasteTreatment.py +0 -45
- tests/models/schmidt2007/test_h2SToAirWasteTreatment.py +0 -45
- tests/models/schmidt2007/test_n2OToAirWasteTreatmentDirect.py +0 -45
- tests/models/schmidt2007/test_nh3ToAirWasteTreatment.py +0 -45
- tests/models/schmidt2007/test_utils.py +0 -39
- tests/models/site/__init__.py +0 -0
- tests/models/site/measurement/__init__.py +0 -0
- tests/models/site/measurement/test_value.py +0 -41
- tests/models/site/post_checks/__init__.py +0 -0
- tests/models/site/post_checks/test_cache.py +0 -8
- tests/models/site/post_checks/test_country.py +0 -6
- tests/models/site/pre_checks/__init__.py +0 -0
- tests/models/site/pre_checks/test_cache_geospatialDatabase.py +0 -22
- tests/models/site/pre_checks/test_cache_years.py +0 -25
- tests/models/site/pre_checks/test_country.py +0 -13
- tests/models/site/test_defaultMethodClassification.py +0 -24
- tests/models/site/test_defaultMethodClassificationDescription.py +0 -24
- tests/models/site/test_grouped_measurement.py +0 -20
- tests/models/stehfestBouwman2006/__init__.py +0 -0
- tests/models/stehfestBouwman2006/test_n2OToAirCropResidueDecompositionDirect.py +0 -20
- tests/models/stehfestBouwman2006/test_n2OToAirExcretaDirect.py +0 -20
- tests/models/stehfestBouwman2006/test_n2OToAirInorganicFertiliserDirect.py +0 -20
- tests/models/stehfestBouwman2006/test_n2OToAirOrganicFertiliserDirect.py +0 -20
- tests/models/stehfestBouwman2006/test_noxToAirCropResidueDecomposition.py +0 -20
- tests/models/stehfestBouwman2006/test_noxToAirExcreta.py +0 -20
- tests/models/stehfestBouwman2006/test_noxToAirInorganicFertiliser.py +0 -20
- tests/models/stehfestBouwman2006/test_noxToAirOrganicFertiliser.py +0 -20
- tests/models/stehfestBouwman2006GisImplementation/__init__.py +0 -0
- tests/models/stehfestBouwman2006GisImplementation/test_noxToAirCropResidueDecomposition.py +0 -22
- tests/models/stehfestBouwman2006GisImplementation/test_noxToAirExcreta.py +0 -20
- tests/models/stehfestBouwman2006GisImplementation/test_noxToAirInorganicFertiliser.py +0 -20
- tests/models/stehfestBouwman2006GisImplementation/test_noxToAirOrganicFertiliser.py +0 -20
- tests/models/test_cache_nodes.py +0 -31
- tests/models/test_cache_sites.py +0 -93
- tests/models/test_config.py +0 -170
- tests/models/test_emissionNotRelevant.py +0 -32
- tests/models/test_log.py +0 -128
- tests/models/test_resourceUseNotRelevant.py +0 -27
- tests/models/test_utils.py +0 -6
- tests/models/transformation/__init__.py +0 -0
- tests/models/transformation/input/__init__.py +0 -0
- tests/models/transformation/input/test_excreta.py +0 -49
- tests/models/transformation/input/test_max.py +0 -34
- tests/models/transformation/input/test_min.py +0 -34
- tests/models/transformation/input/test_properties.py +0 -34
- tests/models/transformation/input/test_sd.py +0 -34
- tests/models/transformation/input/test_value.py +0 -34
- tests/models/transformation/product/__init__.py +0 -0
- tests/models/transformation/product/test_excreta.py +0 -54
- tests/models/usetoxV2/__init__.py +0 -0
- tests/models/usetoxV2/test_freshwaterEcotoxicityPotentialCtue.py +0 -23
- tests/models/utils/__init__.py +0 -0
- tests/models/utils/test_array_builders.py +0 -314
- tests/models/utils/test_background_emissions.py +0 -13
- tests/models/utils/test_blank_node.py +0 -1081
- tests/models/utils/test_cache_sources.py +0 -21
- tests/models/utils/test_crop.py +0 -27
- tests/models/utils/test_cropResidue.py +0 -26
- tests/models/utils/test_cropResidueManagement.py +0 -24
- tests/models/utils/test_currency.py +0 -13
- tests/models/utils/test_dataCompleteness.py +0 -52
- tests/models/utils/test_ecoClimateZone.py +0 -152
- tests/models/utils/test_emission.py +0 -74
- tests/models/utils/test_feedipedia.py +0 -26
- tests/models/utils/test_impact_assessment.py +0 -48
- tests/models/utils/test_indicator.py +0 -26
- tests/models/utils/test_input.py +0 -88
- tests/models/utils/test_liveAnimal.py +0 -34
- tests/models/utils/test_measurement.py +0 -116
- tests/models/utils/test_practice.py +0 -24
- tests/models/utils/test_product.py +0 -73
- tests/models/utils/test_property.py +0 -24
- tests/models/utils/test_site.py +0 -70
- tests/models/utils/test_source.py +0 -42
- tests/models/utils/test_term.py +0 -115
- tests/models/utils/test_time_series.py +0 -88
- tests/models/webbEtAl2012AndSintermannEtAl2012/__init__.py +0 -0
- tests/models/webbEtAl2012AndSintermannEtAl2012/test_nh3ToAirOrganicFertiliser.py +0 -79
- tests/orchestrator/__init__.py +0 -0
- tests/orchestrator/models/__init__.py +0 -0
- tests/orchestrator/models/emissions/__init__.py +0 -0
- tests/orchestrator/models/emissions/test_deleted.py +0 -21
- tests/orchestrator/models/test_transformations.py +0 -32
- tests/orchestrator/strategies/__init__.py +0 -0
- tests/orchestrator/strategies/merge/__init__.py +0 -0
- tests/orchestrator/strategies/merge/test_merge_append.py +0 -33
- tests/orchestrator/strategies/merge/test_merge_default.py +0 -7
- tests/orchestrator/strategies/merge/test_merge_list.py +0 -342
- tests/orchestrator/strategies/merge/test_merge_node.py +0 -95
- tests/orchestrator/strategies/run/__init__.py +0 -0
- tests/orchestrator/strategies/run/test_add_blank_node_if_missing.py +0 -109
- tests/orchestrator/strategies/run/test_add_key_if_missing.py +0 -14
- tests/orchestrator/strategies/run/test_always.py +0 -5
- tests/orchestrator/test_models.py +0 -70
- tests/orchestrator/test_orchestrator.py +0 -27
- tests/orchestrator/test_utils.py +0 -109
- {hestia_earth_models-0.74.17.dist-info → hestia_earth_models-0.75.1.dist-info}/licenses/LICENSE +0 -0
hestia_earth/models/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.schema import SiteSiteType
|
|
2
2
|
from hestia_earth.utils.model import find_term_match
|
|
3
|
-
from hestia_earth.utils.lookup import download_lookup,
|
|
3
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value
|
|
4
4
|
from hestia_earth.utils.tools import safe_parse_float
|
|
5
5
|
|
|
6
6
|
from hestia_earth.models.log import logRequirements, debugMissingLookup, logShouldRun
|
|
@@ -57,9 +57,7 @@ def _indicator(value: float): return _new_indicator(term=TERM_ID, model=MODEL, v
|
|
|
57
57
|
|
|
58
58
|
def _get_factor_from_basinId(site: dict, aware_id: str):
|
|
59
59
|
lookup_col = 'YR_IRRI' if site.get('siteType') in IRRIGATED_SITE_TYPES else 'YR_NONIRRI'
|
|
60
|
-
value =
|
|
61
|
-
download_lookup(_AWARE_LOOKUP), column_name(AWARE_KEY), int(aware_id), column_name(lookup_col)
|
|
62
|
-
)
|
|
60
|
+
value = get_table_value(download_lookup(_AWARE_LOOKUP), AWARE_KEY, int(aware_id), lookup_col)
|
|
63
61
|
debugMissingLookup(_AWARE_LOOKUP, AWARE_KEY, aware_id, lookup_col, value, model=MODEL, term=TERM_ID)
|
|
64
62
|
return safe_parse_float(value, default=None)
|
|
65
63
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.schema import SiteSiteType
|
|
2
2
|
from hestia_earth.utils.model import find_term_match
|
|
3
|
-
from hestia_earth.utils.lookup import download_lookup,
|
|
3
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value
|
|
4
4
|
from hestia_earth.utils.tools import safe_parse_float
|
|
5
5
|
|
|
6
6
|
from hestia_earth.models.log import logRequirements, debugMissingLookup, logShouldRun
|
|
@@ -67,10 +67,7 @@ def _lookup_column(site: dict):
|
|
|
67
67
|
def _get_factor_from_basinId(site: dict, aware_id: str):
|
|
68
68
|
lookup_col = _lookup_column(site)
|
|
69
69
|
lookup = download_lookup(_AWARE_LOOKUP)
|
|
70
|
-
|
|
71
|
-
value = _get_single_table_value(lookup, column_name(AWARE_KEY), int(aware_id), column_name(lookup_col))
|
|
72
|
-
except Exception:
|
|
73
|
-
value = None
|
|
70
|
+
value = get_table_value(lookup, AWARE_KEY, int(aware_id), lookup_col)
|
|
74
71
|
debugMissingLookup(_AWARE_LOOKUP, AWARE_KEY, aware_id, lookup_col, value, model=MODEL, term=TERM_ID)
|
|
75
72
|
return safe_parse_float(value, default=None)
|
|
76
73
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from hestia_earth.utils.lookup import download_lookup, get_table_value,
|
|
1
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value, extract_grouped_data
|
|
2
2
|
from hestia_earth.utils.tools import safe_parse_float
|
|
3
3
|
|
|
4
4
|
from hestia_earth.models.log import debugMissingLookup, logRequirements
|
|
@@ -8,7 +8,7 @@ from . import MODEL
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def _lookup_value(term_id: str, lookup_name: str, col_match: str, col_val: str, column: str):
|
|
11
|
-
value = get_table_value(download_lookup(lookup_name), col_match, col_val,
|
|
11
|
+
value = get_table_value(download_lookup(lookup_name), col_match, col_val, column)
|
|
12
12
|
debugMissingLookup(lookup_name, col_match, col_val, column, value, model=MODEL, term=term_id)
|
|
13
13
|
return value
|
|
14
14
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from itertools import chain
|
|
2
|
-
from hestia_earth.utils.lookup import download_lookup,
|
|
2
|
+
from hestia_earth.utils.lookup import download_lookup, find_term_ids_by
|
|
3
3
|
from hestia_earth.utils.tools import list_sum, flatten
|
|
4
4
|
|
|
5
5
|
from hestia_earth.models.log import logShouldRun, logRequirements, log_as_table
|
|
@@ -49,7 +49,8 @@ def get_all_non_renewable_terms(lookup_file_name: str, column: str) -> list:
|
|
|
49
49
|
returns all non renewable term ids in lookup files like `electricity.csv` or `fuel.csv`
|
|
50
50
|
"""
|
|
51
51
|
lookup = download_lookup(lookup_file_name)
|
|
52
|
-
|
|
52
|
+
|
|
53
|
+
return find_term_ids_by(lookup, column, True)
|
|
53
54
|
|
|
54
55
|
|
|
55
56
|
def _valid_resource_indicator(resource: dict) -> bool:
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
from hestia_earth.schema import TermTermType
|
|
2
|
-
from hestia_earth.utils.lookup import get_table_value, download_lookup
|
|
2
|
+
from hestia_earth.utils.lookup import get_table_value, download_lookup
|
|
3
3
|
from hestia_earth.utils.model import filter_list_term_type
|
|
4
4
|
from hestia_earth.utils.tools import list_sum, flatten
|
|
5
|
+
from hestia_earth.utils.lookup import is_missing_value
|
|
5
6
|
|
|
6
7
|
from hestia_earth.models.log import logRequirements, logShouldRun, log_as_table
|
|
7
8
|
from . import MODEL
|
|
@@ -81,16 +82,22 @@ def _should_run(impact_assessment: dict) -> tuple[bool, list]:
|
|
|
81
82
|
"value": _node_value(resource_indicator),
|
|
82
83
|
"coefficient": get_table_value(
|
|
83
84
|
lookup=download_lookup(filename=f"{input.get('termType')}.csv"),
|
|
84
|
-
col_match='
|
|
85
|
+
col_match='term.id',
|
|
85
86
|
col_match_with=input.get('@id'),
|
|
86
|
-
col_val=
|
|
87
|
+
col_val=LOOKUPS.get(input.get('termType', '')),
|
|
88
|
+
default_value=None
|
|
89
|
+
) if input else None
|
|
87
90
|
} for input in resource_indicator['inputs'] or [{}]]
|
|
88
91
|
for resource_indicator in emissions_resource_use
|
|
89
92
|
]
|
|
90
93
|
)
|
|
91
|
-
valid_resources_with_cf = [
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
valid_resources_with_cf = [
|
|
95
|
+
em for em in resource_uses_unpacked if all([
|
|
96
|
+
not is_missing_value(em['coefficient']),
|
|
97
|
+
em['indicator-is-valid'] is True,
|
|
98
|
+
em['indicator-input-is-valid'] is True,
|
|
99
|
+
])
|
|
100
|
+
]
|
|
94
101
|
|
|
95
102
|
has_valid_input_requirements = all([
|
|
96
103
|
all([
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from functools import lru_cache
|
|
3
3
|
from hestia_earth.schema import TermTermType
|
|
4
|
-
from hestia_earth.utils.lookup import download_lookup, get_table_value
|
|
4
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value
|
|
5
5
|
from hestia_earth.utils.tools import non_empty_list, safe_parse_float, omit
|
|
6
6
|
|
|
7
7
|
from hestia_earth.models.utils.term import get_lookup_value
|
|
8
8
|
from hestia_earth.models.utils.background_emissions import convert_background_lookup
|
|
9
9
|
|
|
10
|
-
_LOOKUP_INDEX_KEY =
|
|
10
|
+
_LOOKUP_INDEX_KEY = 'ecoalimMappingName'
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def get_input_mappings(model: str, input: dict):
|
|
@@ -58,7 +58,7 @@ def _cutoff_id(term_id: str, country_id: str = None, key_id: str = None):
|
|
|
58
58
|
def cutoff_value(cutoff_lookup, term_id: str, country_id: str = None, key_id: str = None):
|
|
59
59
|
cutoff_id = _cutoff_id(term_id=term_id, country_id=country_id, key_id=key_id)
|
|
60
60
|
return None if cutoff_lookup is None else safe_parse_float(
|
|
61
|
-
get_table_value(cutoff_lookup, '
|
|
61
|
+
get_table_value(cutoff_lookup, 'term.id', cutoff_id, 'percentage'),
|
|
62
62
|
default=None
|
|
63
63
|
)
|
|
64
64
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
from functools import lru_cache
|
|
2
2
|
from hestia_earth.schema import TermTermType
|
|
3
|
-
from hestia_earth.utils.lookup import
|
|
3
|
+
from hestia_earth.utils.lookup import load_lookup
|
|
4
4
|
from hestia_earth.utils.tools import non_empty_list
|
|
5
5
|
|
|
6
6
|
from hestia_earth.models.data.ecoinventV3 import get_filepath
|
|
7
7
|
from hestia_earth.models.utils.term import get_lookup_value
|
|
8
8
|
from hestia_earth.models.utils.background_emissions import convert_background_lookup
|
|
9
9
|
|
|
10
|
-
_LOOKUP_INDEX_KEY =
|
|
10
|
+
_LOOKUP_INDEX_KEY = 'ecoinventName'
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def get_input_mappings(model: str, input: dict):
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from hestia_earth.utils.lookup import download_lookup, get_table_value,
|
|
1
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value, extract_grouped_data
|
|
2
2
|
from hestia_earth.utils.tools import safe_parse_float
|
|
3
3
|
|
|
4
4
|
from hestia_earth.models.utils.cycle import cycle_end_year
|
|
@@ -14,7 +14,7 @@ def get_input_coefficient(model: str, cycle: dict, country_id: str, ecoinventNam
|
|
|
14
14
|
# find the matching ember source with the ecoinventName.
|
|
15
15
|
# example: "electricity, high voltage, electricity production, hard coal" > "Coal"
|
|
16
16
|
ember_ecoinvent_lookup = download_lookup(EMBER_ECOINVENT_LOOKUP_NAME)
|
|
17
|
-
source_name = get_table_value(ember_ecoinvent_lookup,
|
|
17
|
+
source_name = get_table_value(ember_ecoinvent_lookup, 'ecoinventName', ecoinventName, 'ember')
|
|
18
18
|
|
|
19
19
|
# find the ratio for the country / year
|
|
20
20
|
data = get_region_lookup_value(REGION_EMBER_SOURCES_LOOKUP_NAME, country_id, source_name, model=model)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from hestia_earth.schema import NodeType, EmissionMethodTier, TermTermType
|
|
2
|
-
from hestia_earth.utils.lookup import download_lookup, lookup_term_ids, lookup_columns
|
|
2
|
+
from hestia_earth.utils.lookup import download_lookup, lookup_term_ids, lookup_columns
|
|
3
3
|
from hestia_earth.utils.lookup_utils import is_in_system_boundary
|
|
4
4
|
from hestia_earth.utils.tools import flatten
|
|
5
5
|
|
|
@@ -49,7 +49,7 @@ def _emission_ids():
|
|
|
49
49
|
def _model_ids(lookup_suffix: str):
|
|
50
50
|
return [
|
|
51
51
|
col for col in lookup_columns(download_lookup(f"emission-model-{lookup_suffix}.csv"))
|
|
52
|
-
if col !=
|
|
52
|
+
if col != 'term.id'
|
|
53
53
|
]
|
|
54
54
|
|
|
55
55
|
|
|
@@ -53,8 +53,7 @@ def _is_a_PEF_indicator(indicator: dict) -> bool:
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
def _get_factor(term: dict, column: str) -> Optional[float]:
|
|
56
|
-
|
|
57
|
-
return float(factor) if factor is not None else None
|
|
56
|
+
return get_lookup_value(term, column, model=MODEL, term=TERM_ID)
|
|
58
57
|
|
|
59
58
|
|
|
60
59
|
def _get_pef_method_model(term: dict) -> List[str]:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from typing import Tuple
|
|
2
|
-
|
|
3
2
|
from hestia_earth.schema import TermTermType
|
|
4
3
|
from hestia_earth.utils.model import filter_list_term_type
|
|
5
4
|
from hestia_earth.utils.tools import list_sum
|
|
5
|
+
from hestia_earth.utils.lookup import is_missing_value
|
|
6
6
|
|
|
7
7
|
from hestia_earth.models.log import logRequirements, logShouldRun, log_as_table
|
|
8
8
|
from hestia_earth.models.utils.indicator import _new_indicator
|
|
@@ -86,10 +86,13 @@ def _should_run(impact_assessment: dict) -> Tuple[bool, list]:
|
|
|
86
86
|
for indicator in found_land_occupation_indicators
|
|
87
87
|
]) if found_land_occupation_indicators else False
|
|
88
88
|
|
|
89
|
-
valid_indicator_with_coef = [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
valid_indicator_with_coef = [
|
|
90
|
+
indicator for indicator in found_indicators_with_coefficient if all([
|
|
91
|
+
not is_missing_value(indicator['coefficient']),
|
|
92
|
+
indicator['area-by-year-is-valid'],
|
|
93
|
+
indicator['area-unit-is-valid']
|
|
94
|
+
])
|
|
95
|
+
]
|
|
93
96
|
|
|
94
97
|
has_land_occupation_indicators = bool(land_occupation_indicators)
|
|
95
98
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.schema import TermTermType
|
|
2
2
|
from hestia_earth.utils.api import download_hestia
|
|
3
|
-
from hestia_earth.utils.lookup import download_lookup, get_table_value,
|
|
3
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value, extract_grouped_data_closest_date
|
|
4
4
|
from hestia_earth.utils.tools import safe_parse_float, flatten, non_empty_list
|
|
5
5
|
|
|
6
6
|
from hestia_earth.models.log import logger, debugMissingLookup, logRequirements, logShouldRun, debugValues, log_as_table
|
|
@@ -20,8 +20,8 @@ FAOSTAT_AREA_LOOKUP = 'region-faostatArea.csv'
|
|
|
20
20
|
def get_liveAnimal_to_animalProduct_id(product_term_id: str, column: str, **log_args):
|
|
21
21
|
lookup_name = 'liveAnimal.csv'
|
|
22
22
|
lookup = download_lookup(lookup_name)
|
|
23
|
-
value = get_table_value(lookup, '
|
|
24
|
-
debugMissingLookup(lookup_name, '
|
|
23
|
+
value = get_table_value(lookup, 'term.id', product_term_id, column)
|
|
24
|
+
debugMissingLookup(lookup_name, 'term.id', product_term_id, column, value, model=MODEL, **log_args)
|
|
25
25
|
return value
|
|
26
26
|
|
|
27
27
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from hestia_earth.schema import TermTermType
|
|
2
|
-
from hestia_earth.utils.lookup import get_table_value, download_lookup,
|
|
2
|
+
from hestia_earth.utils.lookup import get_table_value, download_lookup, is_missing_value
|
|
3
3
|
from hestia_earth.utils.model import filter_list_term_type
|
|
4
4
|
from hestia_earth.utils.tools import flatten, list_sum, omit, pick, unique_values
|
|
5
5
|
from hestia_earth.utils.blank_node import group_by_keys
|
|
@@ -82,9 +82,10 @@ def _should_run(impact_assessment: dict) -> tuple[bool, list]:
|
|
|
82
82
|
"value": _node_value(emission),
|
|
83
83
|
"coefficient": get_table_value(
|
|
84
84
|
lookup=download_lookup(filename="waste.csv"),
|
|
85
|
-
col_match='
|
|
85
|
+
col_match='term.id',
|
|
86
86
|
col_match_with=emission['key'].get('@id'),
|
|
87
|
-
col_val=
|
|
87
|
+
col_val=emission['term']['@id'],
|
|
88
|
+
default_value=None
|
|
88
89
|
)
|
|
89
90
|
} | pick(emission, ['key', 'inputs'])
|
|
90
91
|
for emission in emissions
|
|
@@ -93,7 +94,7 @@ def _should_run(impact_assessment: dict) -> tuple[bool, list]:
|
|
|
93
94
|
|
|
94
95
|
valid_emission_with_cf = [
|
|
95
96
|
em for em in emissions_unpacked if all([
|
|
96
|
-
em['coefficient']
|
|
97
|
+
not is_missing_value(em['coefficient']),
|
|
97
98
|
em['key-is-valid'] is True
|
|
98
99
|
])
|
|
99
100
|
]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from hestia_earth.schema import MeasurementMethodClassification
|
|
2
|
-
from hestia_earth.utils.lookup import download_lookup,
|
|
2
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value
|
|
3
3
|
|
|
4
4
|
from hestia_earth.models.log import logRequirements, logShouldRun
|
|
5
5
|
from hestia_earth.models.utils.measurement import _new_measurement
|
|
@@ -44,7 +44,7 @@ def _measurement(site: dict, value: int):
|
|
|
44
44
|
|
|
45
45
|
def _name(value: int):
|
|
46
46
|
lookup = download_lookup(f"{TERM_ID}.csv")
|
|
47
|
-
return
|
|
47
|
+
return get_table_value(lookup, TERM_ID, value, 'name')
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
def _run(site: dict):
|
|
@@ -3,7 +3,7 @@ from functools import lru_cache
|
|
|
3
3
|
from collections import defaultdict
|
|
4
4
|
from hestia_earth.schema import TermTermType
|
|
5
5
|
from hestia_earth.utils.lookup import (
|
|
6
|
-
download_lookup, get_table_value,
|
|
6
|
+
download_lookup, get_table_value, is_missing_value, extract_grouped_data, lookup_columns, lookup_term_ids
|
|
7
7
|
)
|
|
8
8
|
from hestia_earth.utils.tools import safe_parse_float
|
|
9
9
|
|
|
@@ -57,10 +57,6 @@ def _get_lookup_with_cache(lookup_term: dict, column: str):
|
|
|
57
57
|
def _get_faostat_name(term: dict) -> str: return _get_lookup_with_cache(term, "cropGroupingFaostatArea")
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
def _is_missing_or_none(value) -> bool:
|
|
61
|
-
return value is None or _is_missing_value(value)
|
|
62
|
-
|
|
63
|
-
|
|
64
60
|
def _safe_divide(numerator, denominator, default=0) -> float:
|
|
65
61
|
return default if not denominator else numerator / denominator
|
|
66
62
|
|
|
@@ -354,15 +350,15 @@ def _get_most_common_or_alphabetically_first(crop_terms: list) -> str:
|
|
|
354
350
|
return sorted([term for term, freq in histogram.items() if freq == max_freq])[0]
|
|
355
351
|
|
|
356
352
|
|
|
353
|
+
@lru_cache()
|
|
357
354
|
def _get_complete_faostat_to_crop_mapping() -> dict:
|
|
358
355
|
"""Returns mapping in the format: {faostat_name: IPCC_LAND_USE_CATEGORY, ...}"""
|
|
359
356
|
term_type = TermTermType.CROP.value
|
|
360
357
|
lookup = download_lookup(f"{term_type}.csv")
|
|
358
|
+
term_ids = lookup_term_ids(lookup)
|
|
361
359
|
mappings = defaultdict(list)
|
|
362
|
-
for crop_term_id in
|
|
363
|
-
key =
|
|
364
|
-
get_table_value(lookup, 'termid', crop_term_id, column_name("cropGroupingFaostatArea"))
|
|
365
|
-
)
|
|
360
|
+
for crop_term_id in term_ids:
|
|
361
|
+
key = get_table_value(lookup, 'term.id', crop_term_id, "cropGroupingFaostatArea")
|
|
366
362
|
if key:
|
|
367
363
|
mappings[key].append(crop_ipcc_land_use_category(crop_term_id=crop_term_id, lookup_term_type="crop"))
|
|
368
364
|
return {
|
|
@@ -409,7 +405,7 @@ def _get_sum_for_land_category(
|
|
|
409
405
|
return sum([
|
|
410
406
|
safe_parse_float(value=extract_grouped_data(table_value, str(year)), default=None)
|
|
411
407
|
for fao_name, table_value in values.items()
|
|
412
|
-
if not
|
|
408
|
+
if not is_missing_value(extract_grouped_data(table_value, str(year))) and
|
|
413
409
|
fao_stat_to_ipcc_type[fao_name] == ipcc_land_use_category and
|
|
414
410
|
(
|
|
415
411
|
include_negatives or
|
|
@@ -426,8 +422,8 @@ def _get_sums_of_crop_expansion(country_id: str, year: int, include_negatives: b
|
|
|
426
422
|
lookup = get_region_lookup(lookup_name=_LOOKUP_EXPANSION, term_id=country_id)
|
|
427
423
|
columns = lookup_columns(lookup)
|
|
428
424
|
values = {
|
|
429
|
-
name: get_table_value(lookup, '
|
|
430
|
-
for name in columns if name !=
|
|
425
|
+
name: get_table_value(lookup, 'term.id', country_id, name)
|
|
426
|
+
for name in columns if name != 'term.id'
|
|
431
427
|
}
|
|
432
428
|
|
|
433
429
|
fao_stat_to_ipcc_type = _get_complete_faostat_to_crop_mapping()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import List
|
|
2
2
|
from datetime import timedelta, datetime
|
|
3
3
|
from hestia_earth.schema import SchemaType, TermTermType, COMPLETENESS_MAPPING
|
|
4
|
-
from hestia_earth.utils.lookup import
|
|
4
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value
|
|
5
5
|
from hestia_earth.utils.model import filter_list_term_type
|
|
6
6
|
from hestia_earth.utils.tools import safe_parse_float, flatten, is_number, is_boolean, pick
|
|
7
7
|
from hestia_earth.utils.blank_node import get_node_value
|
|
@@ -117,9 +117,9 @@ def _get_cycle_duration(cycle: dict, land_cover_id: str = None):
|
|
|
117
117
|
cycle_duration = cycle.get('cycleDuration')
|
|
118
118
|
lookup_value = None if cycle_duration or not land_cover_id else safe_parse_float(get_table_value(
|
|
119
119
|
download_lookup("crop.csv"),
|
|
120
|
-
|
|
120
|
+
'landCoverTermId',
|
|
121
121
|
land_cover_id,
|
|
122
|
-
|
|
122
|
+
'maximumCycleDuration'
|
|
123
123
|
), default=None)
|
|
124
124
|
return cycle_duration or lookup_value
|
|
125
125
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from functools import reduce
|
|
2
2
|
from hestia_earth.schema import TermTermType, EmissionMethodTier, SiteSiteType
|
|
3
3
|
from hestia_earth.utils.lookup import (
|
|
4
|
-
download_lookup,
|
|
4
|
+
download_lookup, extract_grouped_data_closest_date, find_term_ids_by
|
|
5
5
|
)
|
|
6
6
|
from hestia_earth.utils.model import filter_list_term_type
|
|
7
7
|
from hestia_earth.utils.tools import non_empty_list, flatten, list_sum, safe_parse_float, omit
|
|
@@ -103,7 +103,7 @@ def _map_group_emissions(group_id: str, required_emission_term_ids: list, emissi
|
|
|
103
103
|
lookup = download_lookup('emission.csv')
|
|
104
104
|
emissions = list(filter(
|
|
105
105
|
lambda id: id in required_emission_term_ids,
|
|
106
|
-
find_term_ids_by(lookup,
|
|
106
|
+
find_term_ids_by(lookup, 'inputProductionGroupId', group_id)
|
|
107
107
|
))
|
|
108
108
|
included_emissions = list(filter(lambda v: v in emission_ids, emissions))
|
|
109
109
|
missing_emissions = list(filter(lambda v: v not in emission_ids, emissions))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from hestia_earth.schema import EmissionMethodTier
|
|
2
|
-
from hestia_earth.utils.lookup import
|
|
2
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value, extract_grouped_data
|
|
3
3
|
from hestia_earth.utils.model import find_primary_product, find_term_match
|
|
4
4
|
from hestia_earth.utils.tools import list_sum, safe_parse_float
|
|
5
5
|
|
|
@@ -168,9 +168,12 @@ def _extract_groupped_data(value: str, DE: float, NDF: float, ionophore: bool, m
|
|
|
168
168
|
|
|
169
169
|
def _get_lookup_value(lookup, term: dict, lookup_col: str, DE: float, NDF: float, ionophore: bool, milk_yield: float):
|
|
170
170
|
term_id = term.get('@id')
|
|
171
|
-
value = get_table_value(lookup, '
|
|
172
|
-
debugMissingLookup(f"{term.get('termType')}.csv", '
|
|
173
|
-
return
|
|
171
|
+
value = get_table_value(lookup, 'term.id', term_id, lookup_col) if term_id else None
|
|
172
|
+
debugMissingLookup(f"{term.get('termType')}.csv", 'term.id', term_id, lookup_col, value, model=MODEL, term=TERM_ID)
|
|
173
|
+
return (
|
|
174
|
+
value if value is None or not isinstance(value, str) else
|
|
175
|
+
_extract_groupped_data(value, DE, NDF, ionophore, milk_yield)
|
|
176
|
+
)
|
|
174
177
|
|
|
175
178
|
|
|
176
179
|
def _get_milk_yield(cycle: dict):
|
|
@@ -180,8 +183,8 @@ def _get_milk_yield(cycle: dict):
|
|
|
180
183
|
|
|
181
184
|
def _get_DE_type(lookup, term_id: str, term_type: str):
|
|
182
185
|
lookup_col = LOOKUPS.get(term_type, [None])[0]
|
|
183
|
-
value = get_table_value(lookup, '
|
|
184
|
-
debugMissingLookup(f"{term_type}.csv", '
|
|
186
|
+
value = get_table_value(lookup, 'term.id', term_id, lookup_col) if lookup_col else None
|
|
187
|
+
debugMissingLookup(f"{term_type}.csv", 'term.id', term_id, lookup_col, value, model=MODEL, term=TERM_ID)
|
|
185
188
|
return value
|
|
186
189
|
|
|
187
190
|
|
|
@@ -202,9 +205,9 @@ def _is_ionophore(cycle: dict, total_feed: float):
|
|
|
202
205
|
|
|
203
206
|
def _get_default_values(lookup, term: dict):
|
|
204
207
|
term_id = term.get('@id')
|
|
205
|
-
value = get_table_value(lookup, '
|
|
206
|
-
min = get_table_value(lookup, '
|
|
207
|
-
max = get_table_value(lookup, '
|
|
208
|
+
value = get_table_value(lookup, 'term.id', term_id, LOOKUPS['liveAnimal'][3]) if term_id else None
|
|
209
|
+
min = get_table_value(lookup, 'term.id', term_id, LOOKUPS['liveAnimal'][4]) if term_id else None
|
|
210
|
+
max = get_table_value(lookup, 'term.id', term_id, LOOKUPS['liveAnimal'][5]) if term_id else None
|
|
208
211
|
return {
|
|
209
212
|
'value': safe_parse_float(value, default=None),
|
|
210
213
|
'min': safe_parse_float(min, default=None),
|
|
@@ -94,8 +94,8 @@ def _get_excreta_b0(country: dict, input: dict):
|
|
|
94
94
|
def _get_excretaManagement_MCF_from_lookup(term_id: str, ecoClimateZone: int, duration_key: DURATION):
|
|
95
95
|
lookup_name = 'excretaManagement-ecoClimateZone-CH4conv.csv'
|
|
96
96
|
lookup = download_lookup(lookup_name)
|
|
97
|
-
data_values = get_table_value(lookup, '
|
|
98
|
-
debugMissingLookup(lookup_name, '
|
|
97
|
+
data_values = get_table_value(lookup, 'term.id', term_id, str(ecoClimateZone))
|
|
98
|
+
debugMissingLookup(lookup_name, 'term.id', term_id, ecoClimateZone, data_values, model=MODEL, term=TERM_ID)
|
|
99
99
|
return safe_parse_float(
|
|
100
100
|
extract_grouped_data(data_values, duration_key.value)
|
|
101
101
|
or extract_grouped_data(data_values, DEFAULT_DURATION.value), # defaults to 12 months if no duration specified
|
|
@@ -5,7 +5,7 @@ import numpy as np
|
|
|
5
5
|
import numpy.typing as npt
|
|
6
6
|
from typing import Any, Callable, Literal, Optional, TypedDict, Union
|
|
7
7
|
from hestia_earth.schema import EmissionMethodTier, EmissionStatsDefinition, SiteSiteType
|
|
8
|
-
from hestia_earth.utils.lookup import download_lookup, get_table_value
|
|
8
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value
|
|
9
9
|
from hestia_earth.utils.tools import safe_parse_float
|
|
10
10
|
from hestia_earth.utils.stats import gen_seed, repeat_single, truncated_normal_1d
|
|
11
11
|
from hestia_earth.utils.descriptive_stats import calc_descriptive_stats
|
|
@@ -289,7 +289,7 @@ def _get_fuel_factor(fuel_category: FuelCategory) -> dict:
|
|
|
289
289
|
lookup = download_lookup(LOOKUP_FILENAME)
|
|
290
290
|
|
|
291
291
|
data = {
|
|
292
|
-
target: get_table_value(lookup,
|
|
292
|
+
target: get_table_value(lookup, "FuelCategory", row, target)
|
|
293
293
|
for target in TARGET_DATA
|
|
294
294
|
}
|
|
295
295
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from hestia_earth.schema import TermTermType
|
|
2
2
|
from hestia_earth.utils.api import download_hestia
|
|
3
|
-
from hestia_earth.utils.lookup import download_lookup, get_table_value,
|
|
3
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value, extract_grouped_data
|
|
4
4
|
from hestia_earth.utils.tools import list_sum, safe_parse_float
|
|
5
5
|
|
|
6
6
|
from hestia_earth.models.log import debugValues
|
|
@@ -33,7 +33,7 @@ def _get_activityCoefficient(animal: dict, systems: list) -> float:
|
|
|
33
33
|
|
|
34
34
|
values = [(
|
|
35
35
|
safe_parse_float(
|
|
36
|
-
get_table_value(lookup, '
|
|
36
|
+
get_table_value(lookup, 'term.id', system.get('term', {}).get('@id'), term_id),
|
|
37
37
|
default=0
|
|
38
38
|
),
|
|
39
39
|
list_sum(system.get('value', [0]))
|
|
@@ -153,7 +153,10 @@ def _get_pregnancy_ratio_per_birth(animal: dict, value: str) -> float:
|
|
|
153
153
|
def _get_pregnancy_ratio(animal: dict) -> float:
|
|
154
154
|
term = animal.get('term', {})
|
|
155
155
|
value = get_lookup_value(term, 'ratioCPregnancyNetEnergyPregnancyIpcc2019', model=MODEL, model_key=MODEL_KEY)
|
|
156
|
-
return
|
|
156
|
+
return (
|
|
157
|
+
_get_pregnancy_ratio_per_birth(animal, value) if isinstance(value, str) and ';' in value else
|
|
158
|
+
safe_parse_float(value, default=0)
|
|
159
|
+
)
|
|
157
160
|
|
|
158
161
|
|
|
159
162
|
def _calculate_NEp(cycle: dict, animal: dict, NEm: float) -> float:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
from hestia_earth.schema import TermTermType
|
|
2
2
|
from hestia_earth.utils.model import find_term_match, filter_list_term_type
|
|
3
3
|
from hestia_earth.utils.tools import safe_parse_float
|
|
4
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value
|
|
4
5
|
|
|
5
6
|
from hestia_earth.models.log import debugValues
|
|
6
7
|
from hestia_earth.models.utils.input import get_total_irrigation_m3
|
|
7
8
|
from hestia_earth.models.utils.cycle import get_ecoClimateZone
|
|
8
9
|
from hestia_earth.models.utils.term import get_lookup_value, get_milkYield_terms
|
|
9
|
-
from hestia_earth.models.utils.ecoClimateZone import get_ecoClimateZone_lookup_value
|
|
10
10
|
from . import MODEL
|
|
11
11
|
|
|
12
12
|
# From IPCC2019 Indirect N2O emission factor, in N [avg, min, max, std]
|
|
@@ -129,7 +129,8 @@ def _get_waterRegime_lookup(model_term_id: str, practice: dict, col: str):
|
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
def _is_wet(ecoClimateZone: str = None):
|
|
132
|
-
|
|
132
|
+
lookup = download_lookup('ecoClimateZone.csv')
|
|
133
|
+
return None if ecoClimateZone is None else get_table_value(lookup, 'ecoClimateZone', int(ecoClimateZone), 'wet')
|
|
133
134
|
|
|
134
135
|
|
|
135
136
|
def ecoClimate_factors(factors: dict, input_term_type: TermTermType = None, ecoClimateZone: str = None):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from functools import reduce
|
|
2
2
|
from hestia_earth.schema import EmissionMethodTier
|
|
3
|
-
from hestia_earth.utils.lookup import download_lookup, get_table_value
|
|
3
|
+
from hestia_earth.utils.lookup import download_lookup, get_table_value
|
|
4
4
|
from hestia_earth.utils.tools import flatten, list_sum, pick
|
|
5
5
|
from hestia_earth.utils.blank_node import group_by_keys
|
|
6
6
|
|
|
@@ -100,7 +100,7 @@ def _run_emission(cycle: dict, emission_term_id: str, data: dict):
|
|
|
100
100
|
|
|
101
101
|
def _emission_group(term_id: str):
|
|
102
102
|
lookup = download_lookup('emission.csv', True)
|
|
103
|
-
return get_table_value(lookup, '
|
|
103
|
+
return get_table_value(lookup, 'term.id', term_id, 'inputProductionGroupId')
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
def _group_emissions(impact: dict):
|