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
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
from numpy.typing import NDArray
|
|
3
|
-
from os.path import isfile
|
|
4
|
-
from pytest import mark
|
|
5
|
-
from unittest.mock import MagicMock, patch
|
|
6
|
-
|
|
7
|
-
from hestia_earth.models.ipcc2019.belowGroundBiomass import _build_col_name, _should_run, MODEL, run, TERM_ID
|
|
8
|
-
from hestia_earth.models.ipcc2019.biomass_utils import BiomassCategory, sample_constant
|
|
9
|
-
|
|
10
|
-
from tests.utils import fake_new_measurement, fixtures_path
|
|
11
|
-
|
|
12
|
-
class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
|
|
13
|
-
utils_path = f"hestia_earth.models.{MODEL}.biomass_utils"
|
|
14
|
-
term_path = "hestia_earth.models.utils.term"
|
|
15
|
-
fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
|
|
16
|
-
|
|
17
|
-
_ITERATIONS = 1000
|
|
18
|
-
|
|
19
|
-
COVER_CROP_PROPERTY_TERM_IDS = [
|
|
20
|
-
"catchCrop",
|
|
21
|
-
"coverCrop",
|
|
22
|
-
"groundCover",
|
|
23
|
-
"longFallowCrop",
|
|
24
|
-
"shortFallowCrop"
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
def _load_fixture(path: str, default=None):
|
|
29
|
-
if isfile(path):
|
|
30
|
-
with open(path, encoding="utf-8") as f:
|
|
31
|
-
return json.load(f)
|
|
32
|
-
return default
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
def _fake_calc_descriptive_stats(arr: NDArray, *_args, **_kwargs):
|
|
36
|
-
return {"value": [round(row[0], 6) for row in arr]}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
# subfolder, should_run
|
|
40
|
-
PARAMS_SHOULD_RUN = [
|
|
41
|
-
("forest-to-animal-housing", False),
|
|
42
|
-
("forest-to-cropland", True),
|
|
43
|
-
("forest-to-cropland-greater-than-100", True),
|
|
44
|
-
("forest-to-cropland-less-than-100", True),
|
|
45
|
-
("forest-to-cropland-lcc-q2", True),
|
|
46
|
-
("forest-to-cropland-lcc-q3", True),
|
|
47
|
-
("forest-to-cropland-lcc-q4", True),
|
|
48
|
-
("forest-to-gohac", False),
|
|
49
|
-
("forest-to-orchard", True),
|
|
50
|
-
("forest-to-orchard-with-ground-cover", True), # Closes 989
|
|
51
|
-
("forest-to-orchard-with-in-category-lcc", True),
|
|
52
|
-
("historical-land-cover-mix", True),
|
|
53
|
-
("historical-argentina-pasture", True),
|
|
54
|
-
("historical-brazil-maize", True),
|
|
55
|
-
("perennial-to-grassland-with-pasture-condition", True),
|
|
56
|
-
("with-gapfilled-start-date-end-date", False), # Closes #972
|
|
57
|
-
("forest-to-cropland-with-missing-equilibrium-year-a", True), # Closes #1076
|
|
58
|
-
("forest-to-cropland-with-missing-equilibrium-year-b", True) # Closes #1076
|
|
59
|
-
]
|
|
60
|
-
IDS_SHOULD_RUN = [p[0] for p in PARAMS_SHOULD_RUN]
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
@mark.parametrize("subfolder, should_run", PARAMS_SHOULD_RUN, ids=IDS_SHOULD_RUN)
|
|
64
|
-
@patch(f"{utils_path}.get_cover_crop_property_terms", return_value=COVER_CROP_PROPERTY_TERM_IDS)
|
|
65
|
-
@patch(f"{term_path}.search")
|
|
66
|
-
def test_should_run(
|
|
67
|
-
search_mock: MagicMock,
|
|
68
|
-
get_cover_crop_property_terms_mock: MagicMock,
|
|
69
|
-
subfolder: str,
|
|
70
|
-
should_run: bool
|
|
71
|
-
):
|
|
72
|
-
folder = f"{fixtures_folder}/{subfolder}"
|
|
73
|
-
|
|
74
|
-
site = _load_fixture(f"{folder}/site.jsonld", {})
|
|
75
|
-
|
|
76
|
-
result, *_ = _should_run(site)
|
|
77
|
-
assert result == should_run
|
|
78
|
-
|
|
79
|
-
assert get_cover_crop_property_terms_mock.call_count <= 1 # assert the API call is only requested once
|
|
80
|
-
search_mock.assert_not_called() # assert the API call is properly mocked
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
@patch(f"{utils_path}.get_cover_crop_property_terms", return_value=COVER_CROP_PROPERTY_TERM_IDS)
|
|
84
|
-
@patch(f"{term_path}.search")
|
|
85
|
-
def test_should_run_no_data(search_mock: MagicMock, get_cover_crop_property_terms_mock: MagicMock):
|
|
86
|
-
SITE = {}
|
|
87
|
-
EXPECTED = False
|
|
88
|
-
|
|
89
|
-
result, *_ = _should_run(SITE)
|
|
90
|
-
assert result == EXPECTED
|
|
91
|
-
|
|
92
|
-
assert get_cover_crop_property_terms_mock.call_count <= 1 # assert the API call is only requested once
|
|
93
|
-
search_mock.assert_not_called() # assert the API call is properly mocked
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
PARAMS_RUN = [subfolder for subfolder, should_run in PARAMS_SHOULD_RUN if should_run]
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
@mark.parametrize("subfolder", PARAMS_RUN)
|
|
100
|
-
@patch(f"{class_path}.get_source", return_value={})
|
|
101
|
-
@patch(f"{class_path}.calc_descriptive_stats", side_effect=_fake_calc_descriptive_stats)
|
|
102
|
-
@patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
|
|
103
|
-
@patch(f"{utils_path}._get_sample_func", return_value=sample_constant)
|
|
104
|
-
@patch(f"{utils_path}.get_cover_crop_property_terms", return_value=COVER_CROP_PROPERTY_TERM_IDS)
|
|
105
|
-
@patch(f"{term_path}.search")
|
|
106
|
-
def test_run(
|
|
107
|
-
search_mock: MagicMock,
|
|
108
|
-
get_cover_crop_property_terms_mock: MagicMock,
|
|
109
|
-
_get_sample_func_mock: MagicMock,
|
|
110
|
-
_new_measurement_mock: MagicMock,
|
|
111
|
-
_calc_descriptive_stats_mock: MagicMock,
|
|
112
|
-
_mock_source: MagicMock,
|
|
113
|
-
subfolder: str
|
|
114
|
-
):
|
|
115
|
-
folder = f"{fixtures_folder}/{subfolder}"
|
|
116
|
-
|
|
117
|
-
site = _load_fixture(f"{folder}/site.jsonld", {})
|
|
118
|
-
expected = _load_fixture(f"{folder}/result.jsonld", [])
|
|
119
|
-
|
|
120
|
-
with patch(f"{class_path}._ITERATIONS", _ITERATIONS):
|
|
121
|
-
result = run(site)
|
|
122
|
-
|
|
123
|
-
assert result == expected
|
|
124
|
-
|
|
125
|
-
assert get_cover_crop_property_terms_mock.call_count <= 1 # assert the API call is only requested once
|
|
126
|
-
search_mock.assert_not_called() # assert the API call is properly mocked
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
# subfolder
|
|
130
|
-
PARAMS_RUN_WITH_STATS = [
|
|
131
|
-
"forest-to-cropland-with-stats",
|
|
132
|
-
"forest-to-orchard-with-in-category-lcc-with-stats",
|
|
133
|
-
"historical-land-cover-mix-with-stats"
|
|
134
|
-
]
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
@mark.parametrize("subfolder", PARAMS_RUN_WITH_STATS)
|
|
138
|
-
@patch(f"{class_path}.get_source", return_value={})
|
|
139
|
-
@patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
|
|
140
|
-
@patch(f"{utils_path}.get_cover_crop_property_terms", return_value=COVER_CROP_PROPERTY_TERM_IDS)
|
|
141
|
-
@patch(f"{term_path}.search")
|
|
142
|
-
def test_run_with_stats(
|
|
143
|
-
search_mock: MagicMock,
|
|
144
|
-
get_cover_crop_property_terms_mock: MagicMock,
|
|
145
|
-
_new_measurement_mock: MagicMock,
|
|
146
|
-
_mock_source: MagicMock,
|
|
147
|
-
subfolder: str
|
|
148
|
-
):
|
|
149
|
-
folder = f"{fixtures_folder}/{subfolder}"
|
|
150
|
-
|
|
151
|
-
site = _load_fixture(f"{folder}/site.jsonld", {})
|
|
152
|
-
expected = _load_fixture(f"{folder}/result.jsonld", [])
|
|
153
|
-
|
|
154
|
-
with patch(f"{class_path}._ITERATIONS", _ITERATIONS):
|
|
155
|
-
result = run(site)
|
|
156
|
-
|
|
157
|
-
assert result == expected
|
|
158
|
-
|
|
159
|
-
assert get_cover_crop_property_terms_mock.call_count <= 1 # assert the API call is only requested once
|
|
160
|
-
search_mock.assert_not_called() # assert the API call is properly mocked
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
# input, expected
|
|
164
|
-
PARAMS_BUILD_COLUMN_NAME = [
|
|
165
|
-
(BiomassCategory.ANNUAL_CROPS, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
166
|
-
(BiomassCategory.COCONUT, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
167
|
-
(BiomassCategory.FOREST, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_FOREST"),
|
|
168
|
-
(BiomassCategory.GRASSLAND, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
169
|
-
(BiomassCategory.JATROPHA, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
170
|
-
(BiomassCategory.JOJOBA, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
171
|
-
(BiomassCategory.NATURAL_FOREST, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_NATURAL_FOREST"),
|
|
172
|
-
(BiomassCategory.OIL_PALM, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
173
|
-
(BiomassCategory.OLIVE, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
174
|
-
(BiomassCategory.ORCHARD, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
175
|
-
(BiomassCategory.OTHER, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
176
|
-
(BiomassCategory.PLANTATION_FOREST, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_PLANTATION_FOREST"),
|
|
177
|
-
(BiomassCategory.RUBBER, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
178
|
-
(BiomassCategory.SHORT_ROTATION_COPPICE, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
179
|
-
(BiomassCategory.TEA, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
180
|
-
(BiomassCategory.VINE, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
181
|
-
(BiomassCategory.WOODY_PERENNIAL, "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER"),
|
|
182
|
-
("Miscellaneous value", "BG_BIOMASS_EQUILIBRIUM_KG_C_HECTARE_OTHER")
|
|
183
|
-
]
|
|
184
|
-
IDS_BUILD_COLUMN_NAME = [p[0] for p in PARAMS_BUILD_COLUMN_NAME]
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
@mark.parametrize("input, expected", PARAMS_BUILD_COLUMN_NAME, ids=IDS_BUILD_COLUMN_NAME)
|
|
188
|
-
def test_build_col_name(input: BiomassCategory, expected: str):
|
|
189
|
-
assert _build_col_name(input) == expected
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
from unittest.mock import patch
|
|
2
|
-
import json
|
|
3
|
-
|
|
4
|
-
from hestia_earth.schema import TermTermType
|
|
5
|
-
from tests.utils import fixtures_path, fake_new_product
|
|
6
|
-
|
|
7
|
-
from hestia_earth.models.ipcc2019.belowGroundCropResidue import (
|
|
8
|
-
MODEL, TERM_ID, run, _should_run, _should_run_product
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
|
|
12
|
-
fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
|
|
13
|
-
|
|
14
|
-
CROP_RESIDUE_TERM = {
|
|
15
|
-
'termType': TermTermType.CROPRESIDUE.value
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@patch('hestia_earth.models.utils.completeness.download_term', return_value=CROP_RESIDUE_TERM)
|
|
20
|
-
@patch(f"{class_path}._should_run_product", return_value=True)
|
|
21
|
-
def test_should_run(*args):
|
|
22
|
-
crop_product = {'term': {'termType': TermTermType.CROP.value}}
|
|
23
|
-
cycle = {'products': []}
|
|
24
|
-
|
|
25
|
-
# no crops => no run
|
|
26
|
-
cycle['products'] = []
|
|
27
|
-
should_run, *args = _should_run(cycle)
|
|
28
|
-
assert not should_run
|
|
29
|
-
|
|
30
|
-
# with a crop => run
|
|
31
|
-
cycle['products'] = [crop_product]
|
|
32
|
-
should_run, *args = _should_run(cycle)
|
|
33
|
-
assert should_run is True
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
@patch('hestia_earth.models.utils.completeness.download_term', return_value=CROP_RESIDUE_TERM)
|
|
37
|
-
@patch(f"{class_path}.get_yield_dm", return_value=None)
|
|
38
|
-
def test_should_run_product(mock_get_yield_dm, *args):
|
|
39
|
-
product = {'term': {'@id': 'maizeGrain'}}
|
|
40
|
-
|
|
41
|
-
# with a dryMatter property => no run
|
|
42
|
-
product['properties'] = [{'term': {'@id': 'dryMatter'}, 'value': 10}]
|
|
43
|
-
assert not _should_run_product(product)
|
|
44
|
-
|
|
45
|
-
# with a value => no run
|
|
46
|
-
product['value'] = [10]
|
|
47
|
-
assert not _should_run_product(product)
|
|
48
|
-
|
|
49
|
-
# with a lookup value => run
|
|
50
|
-
mock_get_yield_dm.return_value = 10
|
|
51
|
-
assert _should_run_product(product) is True
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
@patch('hestia_earth.models.utils.completeness.download_term', return_value=CROP_RESIDUE_TERM)
|
|
55
|
-
@patch(f"{class_path}._new_product", side_effect=fake_new_product)
|
|
56
|
-
def test_run_crop(*args):
|
|
57
|
-
with open(f"{fixtures_folder}/crop/cycle.jsonld", encoding='utf-8') as f:
|
|
58
|
-
cycle = json.load(f)
|
|
59
|
-
|
|
60
|
-
with open(f"{fixtures_folder}/crop/result.jsonld", encoding='utf-8') as f:
|
|
61
|
-
expected = json.load(f)
|
|
62
|
-
|
|
63
|
-
value = run(cycle)
|
|
64
|
-
assert value == expected
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
@patch('hestia_earth.models.utils.completeness.download_term', return_value=CROP_RESIDUE_TERM)
|
|
68
|
-
@patch(f"{class_path}._new_product", side_effect=fake_new_product)
|
|
69
|
-
def test_run_forage(*args):
|
|
70
|
-
with open(f"{fixtures_folder}/forage/cycle.jsonld", encoding='utf-8') as f:
|
|
71
|
-
cycle = json.load(f)
|
|
72
|
-
|
|
73
|
-
with open(f"{fixtures_folder}/forage/result.jsonld", encoding='utf-8') as f:
|
|
74
|
-
expected = json.load(f)
|
|
75
|
-
|
|
76
|
-
value = run(cycle)
|
|
77
|
-
assert value == expected
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
from os.path import isfile
|
|
3
|
-
from pytest import mark
|
|
4
|
-
from unittest.mock import MagicMock, patch
|
|
5
|
-
|
|
6
|
-
from hestia_earth.models.ipcc2019.biocharOrganicCarbonPerHa import _should_run, MODEL, run, TERM_ID
|
|
7
|
-
|
|
8
|
-
from tests.utils import fake_new_measurement, fixtures_path
|
|
9
|
-
|
|
10
|
-
class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
|
|
11
|
-
property_path = "hestia_earth.models.utils.property"
|
|
12
|
-
fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
|
|
13
|
-
|
|
14
|
-
_DEFAULT_PROPERTIES = {
|
|
15
|
-
"biocharManureGasification": {
|
|
16
|
-
"organicCarbonContent": {
|
|
17
|
-
"value": 9,
|
|
18
|
-
"sd": 2.4,
|
|
19
|
-
"min": 0,
|
|
20
|
-
"max": 100
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"biocharBambooLowTemperaturePyrolysis": {
|
|
24
|
-
"organicCarbonContent": {
|
|
25
|
-
"value": 77,
|
|
26
|
-
"sd": 16.5,
|
|
27
|
-
"min": 0,
|
|
28
|
-
"max": 100
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"biocharStrawHighTemperaturePyrolysis": {
|
|
32
|
-
"organicCarbonContent": {
|
|
33
|
-
"value": 65,
|
|
34
|
-
"sd": 14.9,
|
|
35
|
-
"min": 0,
|
|
36
|
-
"max": 100
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"biocharPaperSludgeMediumTemperaturePyrolysis": {
|
|
40
|
-
"organicCarbonContent": {
|
|
41
|
-
"value": 35,
|
|
42
|
-
"sd": 7.1,
|
|
43
|
-
"min": 0,
|
|
44
|
-
"max": 100
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"biocharUnspecifiedFeedstockUnspecifiedProductionMethod": {
|
|
48
|
-
"organicCarbonContent": {
|
|
49
|
-
"value": 40.6,
|
|
50
|
-
"sd": 10.5,
|
|
51
|
-
"min": 0,
|
|
52
|
-
"max": 100
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
def fake_find_term_property(term: dict, property: str, *_):
|
|
59
|
-
term_id = term.get('@id', None)
|
|
60
|
-
return _DEFAULT_PROPERTIES.get(term_id, {}).get(property, {})
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def _load_fixture(path: str, default=None):
|
|
64
|
-
if isfile(path):
|
|
65
|
-
with open(path, encoding="utf-8") as f:
|
|
66
|
-
return json.load(f)
|
|
67
|
-
return default
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
# subfolder, should_run
|
|
71
|
-
PARAMS_SHOULD_RUN = [
|
|
72
|
-
("with-stats", True),
|
|
73
|
-
("no-biochar", True),
|
|
74
|
-
("no-cycles", False),
|
|
75
|
-
("with-organic-soils", False),
|
|
76
|
-
("with-relative-func-unit", False),
|
|
77
|
-
("with-site-type-forest", False),
|
|
78
|
-
("with-missing-start-dates", True)
|
|
79
|
-
]
|
|
80
|
-
IDS_SHOULD_RUN = [p[0] for p in PARAMS_SHOULD_RUN]
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
@mark.parametrize("subfolder, should_run", PARAMS_SHOULD_RUN, ids=IDS_SHOULD_RUN)
|
|
84
|
-
@patch(f"{property_path}.find_term_property", side_effect=fake_find_term_property)
|
|
85
|
-
@patch(f"{property_path}.download_term")
|
|
86
|
-
@patch(f"{class_path}.related_cycles")
|
|
87
|
-
def test_should_run(
|
|
88
|
-
related_cycles_mock: MagicMock,
|
|
89
|
-
download_term_mock: MagicMock,
|
|
90
|
-
_find_term_property_mock: MagicMock,
|
|
91
|
-
subfolder: str,
|
|
92
|
-
should_run: bool
|
|
93
|
-
):
|
|
94
|
-
folder = f"{fixtures_folder}/{subfolder}"
|
|
95
|
-
|
|
96
|
-
site = _load_fixture(f"{folder}/site.jsonld", {})
|
|
97
|
-
related_cycles_mock.return_value = _load_fixture(f"{folder}/cycles.jsonld", [])
|
|
98
|
-
|
|
99
|
-
result, *_ = _should_run(site)
|
|
100
|
-
assert result == should_run
|
|
101
|
-
|
|
102
|
-
# Ensure that the property utils are properly mocked.
|
|
103
|
-
download_term_mock.assert_not_called()
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
PARAMS_RUN = [subfolder for subfolder, should_run in PARAMS_SHOULD_RUN if should_run]
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
@mark.parametrize("subfolder", PARAMS_RUN)
|
|
110
|
-
@patch(f"{property_path}.find_term_property", side_effect=fake_find_term_property)
|
|
111
|
-
@patch(f"{property_path}.download_term")
|
|
112
|
-
@patch(f"{class_path}.related_cycles")
|
|
113
|
-
@patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
|
|
114
|
-
def test_run(
|
|
115
|
-
_new_measurement_mock: MagicMock,
|
|
116
|
-
related_cycles_mock: MagicMock,
|
|
117
|
-
download_term_mock: MagicMock,
|
|
118
|
-
_find_term_property_mock: MagicMock,
|
|
119
|
-
subfolder: str
|
|
120
|
-
):
|
|
121
|
-
folder = f"{fixtures_folder}/{subfolder}"
|
|
122
|
-
|
|
123
|
-
site = _load_fixture(f"{folder}/site.jsonld", {})
|
|
124
|
-
related_cycles_mock.return_value = _load_fixture(f"{folder}/cycles.jsonld", [])
|
|
125
|
-
|
|
126
|
-
expected = _load_fixture(f"{folder}/result.jsonld", [])
|
|
127
|
-
|
|
128
|
-
result = run(site)
|
|
129
|
-
assert result == expected
|
|
130
|
-
|
|
131
|
-
# Ensure that the property utils are properly mocked.
|
|
132
|
-
download_term_mock.assert_not_called()
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
from pytest import mark
|
|
2
|
-
|
|
3
|
-
from hestia_earth.models.ipcc2019.biomass_utils import (
|
|
4
|
-
_assign_biomass_category, _get_sample_func, _rescale_category_cover, BiomassCategory, detect_land_cover_change,
|
|
5
|
-
sample_constant, sample_plus_minus_error
|
|
6
|
-
)
|
|
7
|
-
|
|
8
|
-
_ITERATIONS = 1000
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
# input, expected
|
|
12
|
-
PARAMS_RESCALE_CATEGORY_COVER = [
|
|
13
|
-
(
|
|
14
|
-
{BiomassCategory.ANNUAL_CROPS: 90},
|
|
15
|
-
{BiomassCategory.ANNUAL_CROPS: 90, BiomassCategory.OTHER: 10}
|
|
16
|
-
),
|
|
17
|
-
(
|
|
18
|
-
{BiomassCategory.OTHER: 90},
|
|
19
|
-
{BiomassCategory.OTHER: 100}
|
|
20
|
-
),
|
|
21
|
-
(
|
|
22
|
-
{BiomassCategory.ANNUAL_CROPS: 60, BiomassCategory.VINE: 60},
|
|
23
|
-
{BiomassCategory.ANNUAL_CROPS: 50, BiomassCategory.VINE: 50}
|
|
24
|
-
),
|
|
25
|
-
(
|
|
26
|
-
{BiomassCategory.NATURAL_FOREST: 100},
|
|
27
|
-
{BiomassCategory.NATURAL_FOREST: 100}
|
|
28
|
-
)
|
|
29
|
-
]
|
|
30
|
-
IDS_RESCALE_CATEGORY_COVER = ["fill", "fill w/ other", "squash", "do nothing"]
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
@mark.parametrize("input, expected", PARAMS_RESCALE_CATEGORY_COVER, ids=IDS_RESCALE_CATEGORY_COVER)
|
|
34
|
-
def test_rescale_category_cover(input: dict, expected: dict):
|
|
35
|
-
assert _rescale_category_cover(input) == expected
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
# a, b, expected
|
|
39
|
-
PARAMS_IS_LCC_EVENT = [
|
|
40
|
-
(
|
|
41
|
-
{
|
|
42
|
-
"appleTree": 33.333,
|
|
43
|
-
"pearTree": 33.333,
|
|
44
|
-
BiomassCategory.ANNUAL_CROPS: 33.334,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"appleTree": 33.33333,
|
|
48
|
-
"pearTree": 33.33333,
|
|
49
|
-
BiomassCategory.ANNUAL_CROPS: 33.33334,
|
|
50
|
-
},
|
|
51
|
-
True
|
|
52
|
-
),
|
|
53
|
-
(
|
|
54
|
-
{
|
|
55
|
-
"appleTree": 33.3333,
|
|
56
|
-
"pearTree": 33.3333,
|
|
57
|
-
BiomassCategory.ANNUAL_CROPS: 33.3334,
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"appleTree": 33.33333,
|
|
61
|
-
"pearTree": 33.33333,
|
|
62
|
-
BiomassCategory.ANNUAL_CROPS: 33.33334,
|
|
63
|
-
},
|
|
64
|
-
False
|
|
65
|
-
)
|
|
66
|
-
]
|
|
67
|
-
IDS_IS_LCC_EVENT = ["True", "False"]
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
@mark.parametrize("a, b, expected", PARAMS_IS_LCC_EVENT, ids=IDS_IS_LCC_EVENT)
|
|
71
|
-
def test_detect_land_cover_change(a: dict, b: dict, expected: bool):
|
|
72
|
-
assert detect_land_cover_change(a, b) is expected
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
# kwargs, sample_func, expected_shape
|
|
76
|
-
PARAMS_GET_SAMPLE_FUNC = [
|
|
77
|
-
({"value": 1}, sample_constant),
|
|
78
|
-
({"value": 1, "error": 10}, sample_plus_minus_error),
|
|
79
|
-
]
|
|
80
|
-
IDS_GET_SAMPLE_FUNC = ["constant", "+/- error"]
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
@mark.parametrize("kwargs, sample_func", PARAMS_GET_SAMPLE_FUNC, ids=IDS_GET_SAMPLE_FUNC)
|
|
84
|
-
def test_get_sample_func(kwargs, sample_func):
|
|
85
|
-
result = _get_sample_func(kwargs)
|
|
86
|
-
assert result == sample_func
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
# input, expected
|
|
90
|
-
PARAMS_ASSIGN_BIOMASS_CATEGORY = [
|
|
91
|
-
("Annual crops", BiomassCategory.ANNUAL_CROPS),
|
|
92
|
-
("Coconut", BiomassCategory.COCONUT),
|
|
93
|
-
("Forest", BiomassCategory.FOREST),
|
|
94
|
-
("Grassland", BiomassCategory.GRASSLAND),
|
|
95
|
-
("Jatropha", BiomassCategory.JATROPHA),
|
|
96
|
-
("Jojoba", BiomassCategory.JOJOBA),
|
|
97
|
-
("Natural forest", BiomassCategory.NATURAL_FOREST),
|
|
98
|
-
("Oil palm", BiomassCategory.OIL_PALM),
|
|
99
|
-
("Olive", BiomassCategory.OLIVE),
|
|
100
|
-
("Orchard", BiomassCategory.ORCHARD),
|
|
101
|
-
("Other", BiomassCategory.OTHER),
|
|
102
|
-
("Plantation forest", BiomassCategory.PLANTATION_FOREST),
|
|
103
|
-
("Rubber", BiomassCategory.RUBBER),
|
|
104
|
-
("Short rotation coppice", BiomassCategory.SHORT_ROTATION_COPPICE),
|
|
105
|
-
("Tea", BiomassCategory.TEA),
|
|
106
|
-
("Vine", BiomassCategory.VINE),
|
|
107
|
-
("Woody perennial", BiomassCategory.WOODY_PERENNIAL),
|
|
108
|
-
("Miscellaneous value", None)
|
|
109
|
-
]
|
|
110
|
-
IDS_ASSIGN_BIOMASS_CATEGORY = [p[0] for p in PARAMS_ASSIGN_BIOMASS_CATEGORY]
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
@mark.parametrize("input, expected", PARAMS_ASSIGN_BIOMASS_CATEGORY, ids=IDS_ASSIGN_BIOMASS_CATEGORY)
|
|
114
|
-
def test_assign_biomass_category(input: str, expected: BiomassCategory):
|
|
115
|
-
assert _assign_biomass_category(input) == expected
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
from unittest.mock import patch
|
|
2
|
-
import json
|
|
3
|
-
|
|
4
|
-
from hestia_earth.schema import TermTermType
|
|
5
|
-
from tests.utils import fixtures_path, fake_new_property
|
|
6
|
-
|
|
7
|
-
from hestia_earth.models.ipcc2019.carbonContent import (
|
|
8
|
-
MODEL, TERM_ID, run, _should_run, _should_run_product, _should_run_multiple_products
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
|
|
12
|
-
fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@patch(f"{class_path}._should_run_product", return_value=True)
|
|
16
|
-
@patch(f"{class_path}._should_run_single_product", return_value=False)
|
|
17
|
-
@patch(f"{class_path}._should_run_multiple_products", return_value=False)
|
|
18
|
-
def test_should_run(mock_should_run_multiple, mock_should_run_single, *args):
|
|
19
|
-
crop_residue_product = {'term': {'termType': TermTermType.CROPRESIDUE.value}}
|
|
20
|
-
crop_product = {'term': {'termType': TermTermType.CROP.value}}
|
|
21
|
-
cycle = {'products': []}
|
|
22
|
-
|
|
23
|
-
# with a single crop => no run
|
|
24
|
-
cycle['products'] = [crop_residue_product, crop_product]
|
|
25
|
-
should_run, *args = _should_run(cycle)
|
|
26
|
-
assert not should_run
|
|
27
|
-
|
|
28
|
-
# allowing single product => run
|
|
29
|
-
mock_should_run_single.return_value = True
|
|
30
|
-
should_run, *args = _should_run(cycle)
|
|
31
|
-
assert should_run is True
|
|
32
|
-
|
|
33
|
-
# with multiple crops => no run
|
|
34
|
-
cycle['products'] = [crop_residue_product, crop_product, crop_product]
|
|
35
|
-
should_run, *args = _should_run(cycle)
|
|
36
|
-
assert not should_run
|
|
37
|
-
|
|
38
|
-
# allowing multiple products => run
|
|
39
|
-
mock_should_run_multiple.return_value = True
|
|
40
|
-
should_run, *args = _should_run(cycle)
|
|
41
|
-
assert should_run is True
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def test_should_run_product():
|
|
45
|
-
product = {}
|
|
46
|
-
|
|
47
|
-
# not a crop residue product => no run
|
|
48
|
-
product['term'] = {'@id': 'random id'}
|
|
49
|
-
assert not _should_run_product(product)
|
|
50
|
-
|
|
51
|
-
# with a crop residue product => run
|
|
52
|
-
product['term']['@id'] = 'aboveGroundCropResidueTotal'
|
|
53
|
-
assert _should_run_product(product) is True
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
@patch(f"{class_path}.get_yield_dm", return_value=10)
|
|
57
|
-
@patch(f"{class_path}._get_lookup_value", return_value=None)
|
|
58
|
-
def test_should_run_multiple_products(mock_get_crop_value, *args):
|
|
59
|
-
product = {'term': {'@id': 'maizeGrain'}}
|
|
60
|
-
|
|
61
|
-
# with a dryMatter property => no run
|
|
62
|
-
product['properties'] = [{'term': {'@id': 'dryMatter'}, 'value': 10}]
|
|
63
|
-
assert not _should_run_multiple_products(product)
|
|
64
|
-
|
|
65
|
-
# with a value => no run
|
|
66
|
-
product['value'] = [10]
|
|
67
|
-
assert not _should_run_multiple_products(product)
|
|
68
|
-
|
|
69
|
-
# with a lookup value => run
|
|
70
|
-
mock_get_crop_value.return_value = 10
|
|
71
|
-
assert _should_run_multiple_products(product) is True
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
@patch(f"{class_path}._new_property", side_effect=fake_new_property)
|
|
75
|
-
def test_run_single_crop(*args):
|
|
76
|
-
with open(f"{fixtures_folder}/single-crop/cycle.jsonld", encoding='utf-8') as f:
|
|
77
|
-
cycle = json.load(f)
|
|
78
|
-
|
|
79
|
-
with open(f"{fixtures_folder}/single-crop/result.jsonld", encoding='utf-8') as f:
|
|
80
|
-
expected = json.load(f)
|
|
81
|
-
|
|
82
|
-
value = run(cycle)
|
|
83
|
-
assert value == expected
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
@patch(f"{class_path}._new_property", side_effect=fake_new_property)
|
|
87
|
-
def test_run_single_forage(*args):
|
|
88
|
-
with open(f"{fixtures_folder}/single-forage/cycle.jsonld", encoding='utf-8') as f:
|
|
89
|
-
cycle = json.load(f)
|
|
90
|
-
|
|
91
|
-
with open(f"{fixtures_folder}/single-forage/result.jsonld", encoding='utf-8') as f:
|
|
92
|
-
expected = json.load(f)
|
|
93
|
-
|
|
94
|
-
value = run(cycle)
|
|
95
|
-
assert value == expected
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
@patch(f"{class_path}._new_property", side_effect=fake_new_property)
|
|
99
|
-
def test_run_multiple_crops(*args):
|
|
100
|
-
with open(f"{fixtures_folder}/multiple-crops/cycle.jsonld", encoding='utf-8') as f:
|
|
101
|
-
cycle = json.load(f)
|
|
102
|
-
|
|
103
|
-
with open(f"{fixtures_folder}/multiple-crops/result.jsonld", encoding='utf-8') as f:
|
|
104
|
-
expected = json.load(f)
|
|
105
|
-
|
|
106
|
-
value = run(cycle)
|
|
107
|
-
assert value == expected
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
@patch(f"{class_path}._new_property", side_effect=fake_new_property)
|
|
111
|
-
def test_run_multiple_crops_single_residue(*args):
|
|
112
|
-
with open(f"{fixtures_folder}/multiple-crops-single-residue/cycle.jsonld", encoding='utf-8') as f:
|
|
113
|
-
cycle = json.load(f)
|
|
114
|
-
|
|
115
|
-
with open(f"{fixtures_folder}/multiple-crops-single-residue/result.jsonld", encoding='utf-8') as f:
|
|
116
|
-
expected = json.load(f)
|
|
117
|
-
|
|
118
|
-
value = run(cycle)
|
|
119
|
-
assert value == expected
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
import pytest
|
|
3
|
-
from unittest.mock import patch
|
|
4
|
-
from tests.utils import fixtures_path, fake_new_emission
|
|
5
|
-
|
|
6
|
-
from hestia_earth.models.ipcc2019.ch4ToAirAquacultureSystems import MODEL, TERM_ID, run, _should_run
|
|
7
|
-
|
|
8
|
-
class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
|
|
9
|
-
fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@pytest.mark.parametrize(
|
|
13
|
-
'test_name,cycle,expected_should_run',
|
|
14
|
-
[
|
|
15
|
-
(
|
|
16
|
-
'no cycleDuration => no run',
|
|
17
|
-
{},
|
|
18
|
-
False
|
|
19
|
-
),
|
|
20
|
-
(
|
|
21
|
-
'with cycleDuration not relative unit => no run',
|
|
22
|
-
{'cycleDuration': 150, 'functionalUnit': '1 ha'},
|
|
23
|
-
False
|
|
24
|
-
),
|
|
25
|
-
(
|
|
26
|
-
'with cycleDuration, relative unit, no area => no run',
|
|
27
|
-
{'cycleDuration': 150, 'functionalUnit': 'relative'},
|
|
28
|
-
False
|
|
29
|
-
),
|
|
30
|
-
(
|
|
31
|
-
'with cycleDuration, relative unit, with area, no measurement => no run',
|
|
32
|
-
{'cycleDuration': 150, 'functionalUnit': 'relative', 'site': {'area': 1000}},
|
|
33
|
-
False
|
|
34
|
-
),
|
|
35
|
-
(
|
|
36
|
-
'with cycleDuration, relative unit, with area, and measurement => run',
|
|
37
|
-
{
|
|
38
|
-
'cycleDuration': 150,
|
|
39
|
-
'functionalUnit': 'relative',
|
|
40
|
-
'site': {'area': 1000, 'measurements': [{'term': {'@id': 'salineWater', 'termType': 'measurement'}}]}
|
|
41
|
-
},
|
|
42
|
-
True
|
|
43
|
-
)
|
|
44
|
-
]
|
|
45
|
-
)
|
|
46
|
-
def test_should_run(test_name, cycle, expected_should_run):
|
|
47
|
-
should_run, *args = _should_run(cycle)
|
|
48
|
-
assert should_run == expected_should_run, test_name
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
@patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
|
|
52
|
-
def test_run(*args):
|
|
53
|
-
with open(f"{fixtures_folder}/cycle.jsonld", encoding='utf-8') as f:
|
|
54
|
-
cycle = json.load(f)
|
|
55
|
-
|
|
56
|
-
with open(f"{fixtures_folder}/result.jsonld", encoding='utf-8') as f:
|
|
57
|
-
expected = json.load(f)
|
|
58
|
-
|
|
59
|
-
value = run(cycle)
|
|
60
|
-
assert value == expected
|