hestia-earth-models 0.74.17__py3-none-any.whl → 0.75.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/__init__.py +0 -3
- hestia_earth/models/mocking/search-results.json +1 -1
- hestia_earth/models/version.py +1 -1
- hestia_earth/orchestrator/__init__.py +0 -3
- {hestia_earth_models-0.74.17.dist-info → hestia_earth_models-0.75.0.dist-info}/METADATA +10 -14
- {hestia_earth_models-0.74.17.dist-info → hestia_earth_models-0.75.0.dist-info}/RECORD +9 -633
- {hestia_earth_models-0.74.17.dist-info → hestia_earth_models-0.75.0.dist-info}/WHEEL +1 -1
- {hestia_earth_models-0.74.17.dist-info → hestia_earth_models-0.75.0.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.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
from unittest.mock import patch
|
|
2
|
-
import json
|
|
3
|
-
import os
|
|
4
|
-
|
|
5
|
-
from tests.utils import fixtures_path, fake_new_emission, fake_new_product, fake_new_input
|
|
6
|
-
from hestia_earth.orchestrator.models.transformations import run, _include_practice
|
|
7
|
-
|
|
8
|
-
folder_path = os.path.join(fixtures_path, 'orchestrator', 'transformation')
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@patch('hestia_earth.orchestrator.strategies.merge._merge_version', return_value='0.0.0')
|
|
12
|
-
@patch('hestia_earth.models.transformation.input.excreta._new_input', side_effect=fake_new_input)
|
|
13
|
-
@patch('hestia_earth.models.transformation.product.excreta._new_product', side_effect=fake_new_product)
|
|
14
|
-
@patch('hestia_earth.models.ipcc2019.n2OToAirExcretaDirect._new_emission', side_effect=fake_new_emission)
|
|
15
|
-
def test_run(*args):
|
|
16
|
-
with open(os.path.join(folder_path, 'config.json'), encoding='utf-8') as f:
|
|
17
|
-
config = json.load(f)
|
|
18
|
-
with open(os.path.join(folder_path, 'cycle.jsonld'), encoding='utf-8') as f:
|
|
19
|
-
cycle = json.load(f)
|
|
20
|
-
with open(os.path.join(folder_path, 'result.jsonld'), encoding='utf-8') as f:
|
|
21
|
-
expected = json.load(f)
|
|
22
|
-
|
|
23
|
-
result = run(config.get('models'), cycle)
|
|
24
|
-
assert result == expected
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def test_include_practice():
|
|
28
|
-
term = {'@id': 'genericCropProduct', 'termType': 'crop'}
|
|
29
|
-
assert not _include_practice({'term': term})
|
|
30
|
-
|
|
31
|
-
term = {'@id': 'yieldOfPrimaryAquacultureProductLiveweightPerM2', 'termType': 'aquacultureManagement'}
|
|
32
|
-
assert _include_practice({'term': term}) is True
|
|
File without changes
|
|
File without changes
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
from unittest.mock import patch
|
|
2
|
-
|
|
3
|
-
from hestia_earth.orchestrator.strategies.merge.merge_append import merge
|
|
4
|
-
|
|
5
|
-
class_path = 'hestia_earth.orchestrator.strategies.merge.merge_append'
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@patch(f"{class_path}.update_node_version", side_effect=lambda _v, n: n)
|
|
9
|
-
def test_merge_new_node(*args):
|
|
10
|
-
node1 = {
|
|
11
|
-
'term': {'@id': 'term-1'},
|
|
12
|
-
'value': 1
|
|
13
|
-
}
|
|
14
|
-
node2 = {
|
|
15
|
-
'term': {'@id': 'term-2'},
|
|
16
|
-
'value': 2
|
|
17
|
-
}
|
|
18
|
-
source = [node1]
|
|
19
|
-
result = merge(source, [node1, node2], '1')
|
|
20
|
-
result = merge(result, node2, '1')
|
|
21
|
-
assert result == [node1, node1, node2, node2]
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def test_merge_list():
|
|
25
|
-
source = [1]
|
|
26
|
-
dest = [2, 3]
|
|
27
|
-
assert merge(source, dest, '1') == [1, 2, 3]
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
def test_merge_el():
|
|
31
|
-
source = [1]
|
|
32
|
-
dest = 2
|
|
33
|
-
assert merge(source, dest, '1') == [1, 2]
|
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
from unittest.mock import patch
|
|
2
|
-
import pydash
|
|
3
|
-
|
|
4
|
-
from hestia_earth.orchestrator.utils import reset_index
|
|
5
|
-
from hestia_earth.orchestrator.strategies.merge.merge_list import merge, _get_value
|
|
6
|
-
|
|
7
|
-
class_path = 'hestia_earth.orchestrator.strategies.merge.merge_list'
|
|
8
|
-
version = '1'
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def test_get_value():
|
|
12
|
-
assert _get_value({'startDate': '2020-01-01'}, 'startDate', {}) == '2020-01-01'
|
|
13
|
-
assert _get_value({'startDate': '2020-01-01'}, 'startDate', {'matchDatesFormat': '%Y'}) == '2020'
|
|
14
|
-
assert _get_value({'startDate': '2020-01-01'}, 'startDate', {'matchDatesFormat': '%Y-%m'}) == '2020-01'
|
|
15
|
-
assert _get_value({'startDate': '2020-01-01'}, 'startDate', {'matchDatesFormat': '%Y-%m-%d'}) == '2020-01-01'
|
|
16
|
-
assert _get_value({'value': 500}, 'value') == 500
|
|
17
|
-
assert _get_value({'value': 500}, 'value', {'matchDatesFormat': '%Y-%m-%d'}) == 500
|
|
18
|
-
assert _get_value({'value': 'test'}, 'value') == 'test'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def _default_merge(a, b, *args): return pydash.objects.merge({}, a, b)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
@patch(f"{class_path}.update_node_version", side_effect=lambda _v, n: n)
|
|
25
|
-
def test_merge_new_node(*args):
|
|
26
|
-
old_node = {
|
|
27
|
-
'term': {'@id': 'old-term'},
|
|
28
|
-
'value': 1
|
|
29
|
-
}
|
|
30
|
-
new_node = {
|
|
31
|
-
'term': {'@id': 'new-term'},
|
|
32
|
-
'value': 2
|
|
33
|
-
}
|
|
34
|
-
result = merge([old_node], [new_node], version)
|
|
35
|
-
assert result == [old_node, new_node]
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
@patch(f"{class_path}.merge_node", side_effect=_default_merge)
|
|
39
|
-
@patch(f"{class_path}.update_node_version", side_effect=lambda _v, n: n)
|
|
40
|
-
def test_merge_existing_node(*args):
|
|
41
|
-
term = {'@id': 'term'}
|
|
42
|
-
|
|
43
|
-
node_type = 'Site'
|
|
44
|
-
model = {'key': 'measurements'}
|
|
45
|
-
|
|
46
|
-
# with different value => should merge
|
|
47
|
-
old_node = {
|
|
48
|
-
'term': term,
|
|
49
|
-
'value': 1
|
|
50
|
-
}
|
|
51
|
-
new_node = {
|
|
52
|
-
'term': term,
|
|
53
|
-
'value': 2
|
|
54
|
-
}
|
|
55
|
-
result = merge([old_node], [new_node], version, model=model, node_type=node_type)
|
|
56
|
-
assert len(result) == 1
|
|
57
|
-
|
|
58
|
-
# with different depths => should not merge
|
|
59
|
-
result = merge([{
|
|
60
|
-
**old_node,
|
|
61
|
-
'depthUpper': 100
|
|
62
|
-
}, {
|
|
63
|
-
**old_node,
|
|
64
|
-
'depthUpper': 150
|
|
65
|
-
}], [{
|
|
66
|
-
**new_node,
|
|
67
|
-
'depthUpper': 50
|
|
68
|
-
}], version, model=model, node_type=node_type)
|
|
69
|
-
assert len(result) == 3
|
|
70
|
-
reset_index()
|
|
71
|
-
|
|
72
|
-
node_type = 'Cycle'
|
|
73
|
-
model = {'key': 'emissions'}
|
|
74
|
-
|
|
75
|
-
# with same inputs => should merge
|
|
76
|
-
result = merge([{
|
|
77
|
-
**old_node,
|
|
78
|
-
'inputs': [{'@id': 'input-1'}]
|
|
79
|
-
}], [{
|
|
80
|
-
**new_node,
|
|
81
|
-
'inputs': [{'@id': 'input-1'}]
|
|
82
|
-
}], version, model=model, node_type=node_type)
|
|
83
|
-
assert len(result) == 1
|
|
84
|
-
reset_index()
|
|
85
|
-
|
|
86
|
-
# with different inputs => should not merge
|
|
87
|
-
result = merge([{
|
|
88
|
-
**old_node,
|
|
89
|
-
'inputs': [{'@id': 'input-1'}]
|
|
90
|
-
}], [{
|
|
91
|
-
**new_node,
|
|
92
|
-
'inputs': [{'@id': 'input-2'}]
|
|
93
|
-
}], version, model=model, node_type=node_type)
|
|
94
|
-
assert len(result) == 2
|
|
95
|
-
reset_index()
|
|
96
|
-
|
|
97
|
-
result = merge([{
|
|
98
|
-
**old_node,
|
|
99
|
-
'inputs': [{'@id': 'input-1'}]
|
|
100
|
-
}], [{
|
|
101
|
-
**new_node,
|
|
102
|
-
'inputs': [{'@id': 'input-1'}, {'@id': 'input-2'}]
|
|
103
|
-
}], version, model=model, node_type=node_type)
|
|
104
|
-
assert len(result) == 2
|
|
105
|
-
reset_index()
|
|
106
|
-
|
|
107
|
-
# with no inputs => should not merge
|
|
108
|
-
result = merge([old_node], [{
|
|
109
|
-
**new_node,
|
|
110
|
-
'inputs': [{'@id': 'input-2'}]
|
|
111
|
-
}], version, model=model, node_type=node_type)
|
|
112
|
-
assert len(result) == 2
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
@patch(f"{class_path}.merge_node", side_effect=_default_merge)
|
|
116
|
-
@patch(f"{class_path}.update_node_version", side_effect=lambda _v, n: n)
|
|
117
|
-
def test_merge_existing_node_skip_same_term(*args):
|
|
118
|
-
term = {'@id': 'term'}
|
|
119
|
-
node_type = 'Site'
|
|
120
|
-
model = {'key': 'measurements'}
|
|
121
|
-
|
|
122
|
-
old_node = {
|
|
123
|
-
'term': term,
|
|
124
|
-
'value': 1
|
|
125
|
-
}
|
|
126
|
-
new_node = {
|
|
127
|
-
'term': term,
|
|
128
|
-
'value': 2
|
|
129
|
-
}
|
|
130
|
-
result = merge([old_node], [new_node], version, model, {'skipSameTerm': True}, node_type)
|
|
131
|
-
assert len(result) == 1
|
|
132
|
-
assert result[0]['value'] == 1
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
@patch(f"{class_path}.merge_node", side_effect=_default_merge)
|
|
136
|
-
@patch(f"{class_path}.update_node_version", side_effect=lambda _v, n: n)
|
|
137
|
-
def test_merge_existing_node_new_unique_key(*args):
|
|
138
|
-
term = {'@id': 'term'}
|
|
139
|
-
node_type = 'Cycle'
|
|
140
|
-
model = {'key': 'inputs'}
|
|
141
|
-
|
|
142
|
-
old_node = {
|
|
143
|
-
'term': term,
|
|
144
|
-
'value': 1
|
|
145
|
-
}
|
|
146
|
-
new_node = {
|
|
147
|
-
'term': term,
|
|
148
|
-
'value': 1,
|
|
149
|
-
'impactAssessment': {'@id': 'ia-1'}
|
|
150
|
-
}
|
|
151
|
-
result = merge([old_node], [new_node], version, model, {}, node_type)
|
|
152
|
-
assert len(result) == 1
|
|
153
|
-
assert result[0]['impactAssessment'] == {'@id': 'ia-1'}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
@patch(f"{class_path}.merge_node", side_effect=_default_merge)
|
|
157
|
-
@patch(f"{class_path}.update_node_version", side_effect=lambda _v, n: n)
|
|
158
|
-
def test_merge_authors(*args):
|
|
159
|
-
node_type = 'Bibliography'
|
|
160
|
-
model = {'key': 'authors'}
|
|
161
|
-
|
|
162
|
-
old_node = {
|
|
163
|
-
'lastName': 'name 1'
|
|
164
|
-
}
|
|
165
|
-
new_node = {
|
|
166
|
-
'lastName': 'name 2'
|
|
167
|
-
}
|
|
168
|
-
result = merge([old_node], [new_node], version, model, {}, node_type)
|
|
169
|
-
# no unique keys, should just append data
|
|
170
|
-
assert result == [old_node, new_node]
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
@patch(f"{class_path}.merge_node", side_effect=_default_merge)
|
|
174
|
-
@patch(f"{class_path}.update_node_version", side_effect=lambda _v, n: n)
|
|
175
|
-
def test_merge_different_terms_same_unique_properties(*args):
|
|
176
|
-
method = {'@id': 'method1'}
|
|
177
|
-
operation = {'@id': 'operation1'}
|
|
178
|
-
inputs = [{'@id': 'input1'}, {'@id': 'input2'}]
|
|
179
|
-
node_type = 'ImpactAssessment'
|
|
180
|
-
model = {'key': 'emissionsResourceUse'}
|
|
181
|
-
|
|
182
|
-
node1 = {
|
|
183
|
-
'term': {'@id': 'term1'},
|
|
184
|
-
'value': 1,
|
|
185
|
-
'methodModel': method,
|
|
186
|
-
'operation': operation,
|
|
187
|
-
'inputs': inputs
|
|
188
|
-
}
|
|
189
|
-
node2 = {
|
|
190
|
-
'term': {'@id': 'term2'},
|
|
191
|
-
'value': 2,
|
|
192
|
-
'methodModel': method,
|
|
193
|
-
'operation': operation,
|
|
194
|
-
'inputs': inputs
|
|
195
|
-
}
|
|
196
|
-
node3 = {
|
|
197
|
-
'term': {'@id': 'term3'},
|
|
198
|
-
'value': 3,
|
|
199
|
-
'inputs': inputs
|
|
200
|
-
}
|
|
201
|
-
node4 = {
|
|
202
|
-
'term': {'@id': 'term1'},
|
|
203
|
-
'value': 2,
|
|
204
|
-
'methodModel': method,
|
|
205
|
-
'operation': operation,
|
|
206
|
-
'inputs': inputs
|
|
207
|
-
}
|
|
208
|
-
# different term should not merge
|
|
209
|
-
assert merge([node1], [node2], version, model, {'sameMethodModel': True}, node_type) == [node1, node2]
|
|
210
|
-
assert merge([node1, node2], [node3], version, model, {'sameMethodModel': True}, node_type) == [node1, node2, node3]
|
|
211
|
-
assert merge([node1], [node2, node3], version, model, {}, node_type) == [node1, node2, node3]
|
|
212
|
-
# same term, methodModel, operation and inputs should merge
|
|
213
|
-
assert merge([node1], [node4], version, model, {}, node_type) == [node4]
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
@patch(f"{class_path}.merge_node", side_effect=_default_merge)
|
|
217
|
-
@patch(f"{class_path}.update_node_version", side_effect=lambda _v, n: n)
|
|
218
|
-
def test_merge_multiple_identical_terms(*args):
|
|
219
|
-
term1 = {'@id': 'term1'}
|
|
220
|
-
node_type = 'Cycle'
|
|
221
|
-
model = {'key': 'inputs'}
|
|
222
|
-
|
|
223
|
-
node1 = {
|
|
224
|
-
'term': term1,
|
|
225
|
-
'value': 1
|
|
226
|
-
}
|
|
227
|
-
node2 = {
|
|
228
|
-
'term': term1,
|
|
229
|
-
'value': 2,
|
|
230
|
-
'impactAssessment': {'id': 'ia-1'}
|
|
231
|
-
}
|
|
232
|
-
# merging the same unique nodes should make no changes
|
|
233
|
-
result = merge([node1, node2], [node1, node2], version, model, {}, node_type)
|
|
234
|
-
assert result == [node1, node2]
|
|
235
|
-
|
|
236
|
-
# adding the same first node with a new unique key
|
|
237
|
-
node3 = {
|
|
238
|
-
'term': term1,
|
|
239
|
-
'value': 3,
|
|
240
|
-
'impactAssessment': {'@id': 'ia-1'}
|
|
241
|
-
}
|
|
242
|
-
result = merge([node1, node2], [node3], version, model, {}, node_type)
|
|
243
|
-
assert result == [node3, node2]
|
|
244
|
-
|
|
245
|
-
node4 = {
|
|
246
|
-
'term': term1,
|
|
247
|
-
'value': 4,
|
|
248
|
-
'impactAssessment': {'id': 'ia-1'}
|
|
249
|
-
}
|
|
250
|
-
result = merge([node1, node2], [node4], version, model, {}, node_type)
|
|
251
|
-
assert result == [node1, node4]
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
@patch(f"{class_path}.merge_node", side_effect=_default_merge)
|
|
255
|
-
@patch(f"{class_path}.update_node_version", side_effect=lambda _v, n: n)
|
|
256
|
-
def test_merge_animals(*args):
|
|
257
|
-
term1 = {'@id': 'term1'}
|
|
258
|
-
node_type = 'Cycle'
|
|
259
|
-
model = {'key': 'animals'}
|
|
260
|
-
|
|
261
|
-
node1 = {
|
|
262
|
-
'animalId': 'animal-1',
|
|
263
|
-
'term': term1,
|
|
264
|
-
'value': 1,
|
|
265
|
-
'properties': [
|
|
266
|
-
{
|
|
267
|
-
'term': {"@id": "liveweightPerHead"},
|
|
268
|
-
'value': 40
|
|
269
|
-
}
|
|
270
|
-
]
|
|
271
|
-
}
|
|
272
|
-
node2 = {
|
|
273
|
-
'animalId': 'animal-2',
|
|
274
|
-
'term': term1,
|
|
275
|
-
'value': 1,
|
|
276
|
-
'properties': [
|
|
277
|
-
{
|
|
278
|
-
'term': {"@id": "liveweightPerHead"},
|
|
279
|
-
'value': 40
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
'term': {"@id": "age"},
|
|
283
|
-
'value': 10
|
|
284
|
-
}
|
|
285
|
-
]
|
|
286
|
-
}
|
|
287
|
-
result = merge([node1], [node2], version, model, {}, node_type)
|
|
288
|
-
# can not merge as properties is used to determine uniqueness
|
|
289
|
-
assert result == [node1, node2]
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
@patch(f"{class_path}.merge_node", side_effect=_default_merge)
|
|
293
|
-
@patch(f"{class_path}.update_node_version", side_effect=lambda _v, n: n)
|
|
294
|
-
def test_merge_with_properties(*args):
|
|
295
|
-
node_type = 'Cycle'
|
|
296
|
-
model = {'key': 'inputs'}
|
|
297
|
-
|
|
298
|
-
node1 = {
|
|
299
|
-
"term": {
|
|
300
|
-
"@type": "Term",
|
|
301
|
-
"@id": "concentrateFeedBlend"
|
|
302
|
-
},
|
|
303
|
-
"isAnimalFeed": True,
|
|
304
|
-
"value": [
|
|
305
|
-
100
|
|
306
|
-
],
|
|
307
|
-
"impactAssessment": {
|
|
308
|
-
"@id": "_djxbkdk2wnx",
|
|
309
|
-
"@type": "ImpactAssessment"
|
|
310
|
-
},
|
|
311
|
-
"impactAssessmentIsProxy": False,
|
|
312
|
-
"@type": "Input"
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
node2 = {
|
|
316
|
-
"term": {
|
|
317
|
-
"@type": "Term",
|
|
318
|
-
"@id": "concentrateFeedBlend"
|
|
319
|
-
},
|
|
320
|
-
"isAnimalFeed": True,
|
|
321
|
-
"value": [
|
|
322
|
-
200
|
|
323
|
-
],
|
|
324
|
-
"impactAssessment": {
|
|
325
|
-
"@id": "uug7pcaas6aa",
|
|
326
|
-
"@type": "ImpactAssessment"
|
|
327
|
-
},
|
|
328
|
-
"impactAssessmentIsProxy": False,
|
|
329
|
-
"@type": "Input"
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
properties = [
|
|
333
|
-
{
|
|
334
|
-
'term': {'@id': 'property-1'},
|
|
335
|
-
'value': 100
|
|
336
|
-
}
|
|
337
|
-
]
|
|
338
|
-
node3 = node2 | {'properties': properties}
|
|
339
|
-
|
|
340
|
-
result = merge([node1, node2], [node3], version, model, {}, node_type)
|
|
341
|
-
# can not merge as properties is used to determine uniqueness
|
|
342
|
-
assert result == [node1, node3]
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
from unittest.mock import patch
|
|
2
|
-
from hestia_earth.schema import EmissionMethodTier
|
|
3
|
-
|
|
4
|
-
from hestia_earth.orchestrator.strategies.merge.merge_node import merge, _has_threshold_diff, _should_merge_lower_tier
|
|
5
|
-
|
|
6
|
-
class_path = 'hestia_earth.orchestrator.strategies.merge.merge_node'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def test_has_threshold_diff():
|
|
10
|
-
key = 'key'
|
|
11
|
-
threshold = 0.1 # 10%
|
|
12
|
-
source = {}
|
|
13
|
-
dest = {}
|
|
14
|
-
|
|
15
|
-
# key not in source => merge
|
|
16
|
-
assert _has_threshold_diff(source, dest, key, threshold) is True
|
|
17
|
-
|
|
18
|
-
# key not in dest => no merge
|
|
19
|
-
source[key] = [100]
|
|
20
|
-
assert not _has_threshold_diff(source, dest, key, threshold)
|
|
21
|
-
|
|
22
|
-
dest[key] = [90]
|
|
23
|
-
assert not _has_threshold_diff(source, dest, key, threshold)
|
|
24
|
-
|
|
25
|
-
dest[key] = [89]
|
|
26
|
-
assert _has_threshold_diff(source, dest, key, threshold) is True
|
|
27
|
-
|
|
28
|
-
# edge cases
|
|
29
|
-
source[key] = [0]
|
|
30
|
-
dest[key] = [1]
|
|
31
|
-
assert _has_threshold_diff(source, dest, key, threshold) is True
|
|
32
|
-
|
|
33
|
-
source[key] = [0]
|
|
34
|
-
dest[key] = [0]
|
|
35
|
-
assert not _has_threshold_diff(source, dest, key, threshold)
|
|
36
|
-
|
|
37
|
-
source[key] = [1]
|
|
38
|
-
dest[key] = [0]
|
|
39
|
-
assert _has_threshold_diff(source, dest, key, threshold)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def test_should_merge_lower_tier():
|
|
43
|
-
source = {}
|
|
44
|
-
dest = {}
|
|
45
|
-
|
|
46
|
-
# always merge if replacing lower tier
|
|
47
|
-
assert _should_merge_lower_tier(source, dest, {'replaceLowerTier': True}) is True
|
|
48
|
-
|
|
49
|
-
# new value has lower tier
|
|
50
|
-
source['methodTier'] = EmissionMethodTier.TIER_3.value
|
|
51
|
-
dest['methodTier'] = EmissionMethodTier.TIER_1.value
|
|
52
|
-
assert not _should_merge_lower_tier(source, dest, {'replaceLowerTier': False})
|
|
53
|
-
|
|
54
|
-
source['methodTier'] = EmissionMethodTier.TIER_1.value
|
|
55
|
-
dest['methodTier'] = EmissionMethodTier.NOT_RELEVANT.value
|
|
56
|
-
assert not _should_merge_lower_tier(source, dest, {'replaceLowerTier': False})
|
|
57
|
-
|
|
58
|
-
# new value has identical tier
|
|
59
|
-
source['methodTier'] = EmissionMethodTier.TIER_1.value
|
|
60
|
-
dest['methodTier'] = EmissionMethodTier.TIER_1.value
|
|
61
|
-
assert _should_merge_lower_tier(source, dest, {'replaceLowerTier': False}) is True
|
|
62
|
-
|
|
63
|
-
# new value has higher tier
|
|
64
|
-
source['methodTier'] = EmissionMethodTier.TIER_1.value
|
|
65
|
-
dest['methodTier'] = EmissionMethodTier.TIER_3.value
|
|
66
|
-
assert _should_merge_lower_tier(source, dest, {'replaceLowerTier': False}) is True
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
@patch(f"{class_path}._has_threshold_diff", return_value=False)
|
|
70
|
-
def test_merge_no_merge(*args):
|
|
71
|
-
source = {'value': [100]}
|
|
72
|
-
dest = {'value': [50]}
|
|
73
|
-
args = {'replaceThreshold': ['value', 50]}
|
|
74
|
-
# simply return the source
|
|
75
|
-
assert merge(source, dest, '0', {}, args) == source
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
@patch(f"{class_path}._has_threshold_diff", return_value=True)
|
|
79
|
-
@patch(f"{class_path}.update_node_version", return_value={})
|
|
80
|
-
def test_merge_no_threshold(mock_update, *args):
|
|
81
|
-
source = {'value': [100]}
|
|
82
|
-
dest = {'value': [50]}
|
|
83
|
-
args = {}
|
|
84
|
-
merge(source, dest, '0', {}, args)
|
|
85
|
-
mock_update.assert_called_once()
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
@patch(f"{class_path}._has_threshold_diff", return_value=True)
|
|
89
|
-
@patch(f"{class_path}.update_node_version", return_value={})
|
|
90
|
-
def test_merge_with_threshold(mock_update, *args):
|
|
91
|
-
source = {'value': [100]}
|
|
92
|
-
dest = {'value': [50]}
|
|
93
|
-
args = {'replaceThreshold': ['value', 50]}
|
|
94
|
-
merge(source, dest, '0', {}, args)
|
|
95
|
-
mock_update.assert_called_once()
|
|
File without changes
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
from unittest.mock import patch
|
|
2
|
-
|
|
3
|
-
from hestia_earth.orchestrator.strategies.run.add_blank_node_if_missing import should_run
|
|
4
|
-
|
|
5
|
-
class_path = 'hestia_earth.orchestrator.strategies.run.add_blank_node_if_missing'
|
|
6
|
-
FAKE_EMISSION = {'@id': 'n2OToAirCropResidueDecompositionIndirect', 'termType': 'emission'}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@patch(f"{class_path}.get_required_model_param", return_value='')
|
|
10
|
-
@patch(f"{class_path}.find_term_match")
|
|
11
|
-
def test_should_run(mock_node_exists, *args):
|
|
12
|
-
data = {}
|
|
13
|
-
model = {}
|
|
14
|
-
|
|
15
|
-
# node does not exists => run
|
|
16
|
-
mock_node_exists.return_value = None
|
|
17
|
-
assert should_run(data, model) is True
|
|
18
|
-
|
|
19
|
-
# node exists but no value => run
|
|
20
|
-
mock_node_exists.return_value = {}
|
|
21
|
-
assert should_run(data, model) is True
|
|
22
|
-
|
|
23
|
-
# node exists with value + no params => no run
|
|
24
|
-
node = {'value': 10}
|
|
25
|
-
mock_node_exists.return_value = node
|
|
26
|
-
assert not should_run(data, model)
|
|
27
|
-
|
|
28
|
-
# node exists with added value `0` and `Emission` => run
|
|
29
|
-
node = {'@type': 'Emission', 'value': [0], 'added': ['value'], 'methodTier': 'not relevant'}
|
|
30
|
-
mock_node_exists.return_value = node
|
|
31
|
-
assert should_run(data, model) is True
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
@patch(f"{class_path}.get_required_model_param", return_value='')
|
|
35
|
-
@patch(f"{class_path}.find_term_match")
|
|
36
|
-
def test_should_run_skipEmptyValue(mock_node_exists, *args):
|
|
37
|
-
data = {}
|
|
38
|
-
|
|
39
|
-
# no value and not skip => run
|
|
40
|
-
mock_node_exists.return_value = {}
|
|
41
|
-
model = {'runArgs': {'skipEmptyValue': False}}
|
|
42
|
-
assert should_run(data, model) is True
|
|
43
|
-
|
|
44
|
-
# no value and skip => no run
|
|
45
|
-
mock_node_exists.return_value = {}
|
|
46
|
-
model = {'runArgs': {'skipEmptyValue': True}}
|
|
47
|
-
assert not should_run(data, model)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
@patch(f"{class_path}.get_required_model_param", return_value='')
|
|
51
|
-
def test_should_run_skipAggregated(*args):
|
|
52
|
-
data = {}
|
|
53
|
-
model = {'runArgs': {'skipAggregated': True}}
|
|
54
|
-
|
|
55
|
-
# not aggregated => run
|
|
56
|
-
data = {'aggregated': False}
|
|
57
|
-
assert should_run(data, model) is True
|
|
58
|
-
|
|
59
|
-
# aggregated => no run
|
|
60
|
-
data = {'aggregated': True}
|
|
61
|
-
assert not should_run(data, model)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
@patch(f"{class_path}.get_required_model_param", return_value='')
|
|
65
|
-
@patch(f"{class_path}.find_term_match")
|
|
66
|
-
def test_should_run_runNonAddedTerm(mock_node_exists, *args):
|
|
67
|
-
data = {}
|
|
68
|
-
node = {'value': 10}
|
|
69
|
-
mock_node_exists.return_value = node
|
|
70
|
-
model = {'runArgs': {'runNonAddedTerm': True}}
|
|
71
|
-
|
|
72
|
-
# term has been added => no run
|
|
73
|
-
node['added'] = ['term']
|
|
74
|
-
assert not should_run(data, model)
|
|
75
|
-
|
|
76
|
-
# term has not been added => run
|
|
77
|
-
node['added'] = []
|
|
78
|
-
assert should_run(data, model) is True
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
@patch(f"{class_path}.get_required_model_param", return_value='')
|
|
82
|
-
@patch(f"{class_path}.find_term_match")
|
|
83
|
-
def test_should_run_runNonMeasured(mock_node_exists, *args):
|
|
84
|
-
data = {}
|
|
85
|
-
node = {'value': 10}
|
|
86
|
-
mock_node_exists.return_value = node
|
|
87
|
-
model = {'runArgs': {'runNonMeasured': True}}
|
|
88
|
-
|
|
89
|
-
# term measured => no run
|
|
90
|
-
node['methodTier'] = 'measured'
|
|
91
|
-
assert not should_run(data, model)
|
|
92
|
-
|
|
93
|
-
# term not measured => run
|
|
94
|
-
node['methodTier'] = 'background'
|
|
95
|
-
assert should_run(data, model) is True
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
@patch(f"{class_path}.get_required_model_param", return_value=FAKE_EMISSION.get('@id'))
|
|
99
|
-
@patch(f"{class_path}.find_term_match")
|
|
100
|
-
def test_should_run_check_typeAllowed(mock_node_exists, *args):
|
|
101
|
-
node = {'term': FAKE_EMISSION}
|
|
102
|
-
mock_node_exists.return_value = node
|
|
103
|
-
model = {}
|
|
104
|
-
|
|
105
|
-
# type is not allowed => no run
|
|
106
|
-
assert not should_run({'type': 'Transformation'}, model)
|
|
107
|
-
|
|
108
|
-
# type is allowed => run
|
|
109
|
-
assert should_run({'type': 'Cycle'}, model) is True
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
from hestia_earth.orchestrator.strategies.run.add_key_if_missing import should_run
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def test_should_run():
|
|
5
|
-
data = {}
|
|
6
|
-
key = 'model-key'
|
|
7
|
-
model = {'key': key}
|
|
8
|
-
|
|
9
|
-
# key not in data => run
|
|
10
|
-
assert should_run(data, model) is True
|
|
11
|
-
|
|
12
|
-
# key in data => no run
|
|
13
|
-
data[key] = 10
|
|
14
|
-
assert not should_run(data, model)
|