hestia-earth-models 0.69.1__py3-none-any.whl → 0.70.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.
Files changed (219) hide show
  1. hestia_earth/models/aware/scarcityWeightedWaterUse.py +8 -16
  2. hestia_earth/models/cache_sites.py +3 -2
  3. hestia_earth/models/cml2001Baseline/abioticResourceDepletionFossilFuels.py +2 -1
  4. hestia_earth/models/cml2001Baseline/abioticResourceDepletionMineralsAndMetals.py +3 -2
  5. hestia_earth/models/config/Cycle.json +82 -60
  6. hestia_earth/models/config/ImpactAssessment.json +12 -4
  7. hestia_earth/models/config/Site.json +33 -22
  8. hestia_earth/models/cycle/animal/input/hestiaAggregatedData.py +1 -1
  9. hestia_earth/models/cycle/animal/input/properties.py +1 -1
  10. hestia_earth/models/cycle/cycleDuration.py +2 -2
  11. hestia_earth/models/cycle/input/hestiaAggregatedData.py +12 -14
  12. hestia_earth/models/cycle/input/properties.py +1 -1
  13. hestia_earth/models/cycle/siteDuration.py +3 -3
  14. hestia_earth/models/cycle/transformation.py +1 -1
  15. hestia_earth/models/cycle/utils.py +0 -6
  16. hestia_earth/models/data/ecoinventV3/__init__.py +15 -13
  17. hestia_earth/models/ecoalimV9/__init__.py +13 -0
  18. hestia_earth/models/ecoalimV9/cycle.py +128 -0
  19. hestia_earth/models/ecoalimV9/impact_assessment.py +125 -0
  20. hestia_earth/models/ecoalimV9/utils.py +31 -0
  21. hestia_earth/models/ecoinventV3/__init__.py +6 -14
  22. hestia_earth/models/ecoinventV3/utils.py +1 -29
  23. hestia_earth/models/ecoinventV3AndEmberClimate/__init__.py +8 -2
  24. hestia_earth/models/emissionNotRelevant/__init__.py +33 -8
  25. hestia_earth/models/frischknechtEtAl2000/ionisingRadiationKbqU235Eq.py +1 -1
  26. hestia_earth/models/geospatialDatabase/croppingIntensity.py +4 -4
  27. hestia_earth/models/geospatialDatabase/longFallowRatio.py +4 -4
  28. hestia_earth/models/geospatialDatabase/region.py +3 -2
  29. hestia_earth/models/geospatialDatabase/utils.py +6 -5
  30. hestia_earth/models/haversineFormula/transport/distance.py +5 -4
  31. hestia_earth/models/{koble2014 → hestia}/aboveGroundCropResidue.py +4 -5
  32. hestia_earth/models/{cycle → hestia}/aboveGroundCropResidueTotal.py +2 -2
  33. hestia_earth/models/{site → hestia}/brackishWater.py +1 -1
  34. hestia_earth/models/{site → hestia}/cationExchangeCapacityPerKgSoil.py +1 -1
  35. hestia_earth/models/{cycle → hestia}/coldCarcassWeightPerHead.py +1 -1
  36. hestia_earth/models/{cycle → hestia}/coldDressedCarcassWeightPerHead.py +1 -1
  37. hestia_earth/models/{cycle → hestia}/concentrateFeed.py +1 -1
  38. hestia_earth/models/{cycle → hestia}/cropResidueManagement.py +1 -1
  39. hestia_earth/models/{cycle → hestia}/croppingIntensity.py +1 -1
  40. hestia_earth/models/{cycle → hestia}/energyContentLowerHeatingValue.py +2 -2
  41. hestia_earth/models/{cycle → hestia}/excretaKgMass.py +7 -2
  42. hestia_earth/models/{cycle → hestia}/excretaKgN.py +1 -1
  43. hestia_earth/models/{cycle → hestia}/excretaKgVs.py +1 -1
  44. hestia_earth/models/{cycle → hestia}/feedConversionRatio/__init__.py +1 -1
  45. hestia_earth/models/{site → hestia}/flowingWater.py +1 -1
  46. hestia_earth/models/{site → hestia}/freshWater.py +1 -1
  47. hestia_earth/models/{cycle → hestia}/inorganicFertiliser.py +1 -1
  48. hestia_earth/models/{cycle → hestia}/irrigatedTypeUnspecified.py +14 -19
  49. hestia_earth/models/hestia/landCover.py +31 -27
  50. hestia_earth/models/hestia/landTransformation100YearAverageDuringCycle.py +2 -1
  51. hestia_earth/models/hestia/landTransformation20YearAverageDuringCycle.py +2 -1
  52. hestia_earth/models/{cycle → hestia}/liveAnimal.py +1 -1
  53. hestia_earth/models/{cycle → hestia}/longFallowRatio.py +1 -1
  54. hestia_earth/models/{site → hestia}/management.py +5 -3
  55. hestia_earth/models/{cycle → hestia}/materialAndSubstrate.py +1 -1
  56. hestia_earth/models/{cycle → hestia}/milkYield.py +1 -1
  57. hestia_earth/models/{site → hestia}/netPrimaryProduction.py +1 -1
  58. hestia_earth/models/{site → hestia}/organicCarbonPerHa.py +1 -1
  59. hestia_earth/models/{cycle → hestia}/pastureGrass.py +1 -1
  60. hestia_earth/models/{cycle → hestia}/pastureSystem.py +1 -1
  61. hestia_earth/models/{site → hestia}/potentialEvapotranspirationAnnual.py +3 -3
  62. hestia_earth/models/{site → hestia}/potentialEvapotranspirationMonthly.py +3 -3
  63. hestia_earth/models/{site → hestia}/precipitationAnnual.py +3 -3
  64. hestia_earth/models/{site → hestia}/precipitationMonthly.py +3 -3
  65. hestia_earth/models/{site → hestia}/rainfallAnnual.py +3 -3
  66. hestia_earth/models/{site → hestia}/rainfallMonthly.py +3 -3
  67. hestia_earth/models/{cycle → hestia}/readyToCookWeightPerHead.py +1 -1
  68. hestia_earth/models/{cycle → hestia}/residueBurnt.py +1 -1
  69. hestia_earth/models/{cycle → hestia}/residueIncorporated.py +1 -1
  70. hestia_earth/models/{cycle → hestia}/residueLeftOnField.py +1 -1
  71. hestia_earth/models/hestia/residueRemoved.py +65 -13
  72. hestia_earth/models/{site → hestia}/salineWater.py +1 -1
  73. hestia_earth/models/hestia/seed_emissions.py +1 -1
  74. hestia_earth/models/{site → hestia}/soilMeasurement.py +1 -1
  75. hestia_earth/models/{cycle → hestia}/stockingDensityAnimalHousingAverage.py +1 -1
  76. hestia_earth/models/{site → hestia}/temperatureAnnual.py +3 -3
  77. hestia_earth/models/{site → hestia}/temperatureMonthly.py +3 -3
  78. hestia_earth/models/{site → hestia}/totalNitrogenPerKgSoil.py +1 -1
  79. hestia_earth/models/{cycle → hestia}/unknownPreSeasonWaterRegime.py +1 -1
  80. hestia_earth/models/hestia/utils.py +93 -0
  81. hestia_earth/models/{site → hestia}/waterDepth.py +1 -1
  82. hestia_earth/models/hestia/waterSalinity.py +78 -0
  83. hestia_earth/models/impact_assessment/emissions.py +1 -1
  84. hestia_earth/models/impact_assessment/product/economicValueShare.py +1 -1
  85. hestia_earth/models/impact_assessment/product/value.py +1 -1
  86. hestia_earth/models/ipcc2019/aboveGroundBiomass.py +1 -1
  87. hestia_earth/models/ipcc2019/animal/fatContent.py +2 -2
  88. hestia_earth/models/ipcc2019/animal/milkYieldPerAnimal.py +2 -2
  89. hestia_earth/models/ipcc2019/animal/trueProteinContent.py +2 -2
  90. hestia_earth/models/ipcc2019/belowGroundBiomass.py +1 -1
  91. hestia_earth/models/ipcc2019/biomass_utils.py +2 -4
  92. hestia_earth/models/ipcc2019/ch4ToAirEntericFermentation.py +7 -2
  93. hestia_earth/models/ipcc2019/ch4ToAirFloodedRice.py +163 -78
  94. hestia_earth/models/ipcc2019/co2ToAirAboveGroundBiomassStockChange.py +1 -0
  95. hestia_earth/models/ipcc2019/co2ToAirBelowGroundBiomassStockChange.py +2 -1
  96. hestia_earth/models/ipcc2019/co2ToAirCarbonStockChange_utils.py +31 -20
  97. hestia_earth/models/ipcc2019/co2ToAirSoilOrganicCarbonStockChange.py +2 -1
  98. hestia_earth/models/ipcc2019/co2ToAirUreaHydrolysis.py +16 -9
  99. hestia_earth/models/ipcc2019/nonCo2EmissionsToAirNaturalVegetationBurning.py +36 -47
  100. hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_1.py +94 -9
  101. hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_2.py +167 -13
  102. hestia_earth/models/ipcc2019/organicCarbonPerHa_utils.py +7 -5
  103. hestia_earth/models/koble2014/cropResidueManagement.py +1 -1
  104. hestia_earth/models/koble2014/residueBurnt.py +1 -1
  105. hestia_earth/models/koble2014/residueRemoved.py +1 -1
  106. hestia_earth/models/koble2014/utils.py +3 -3
  107. hestia_earth/models/mocking/search-results.json +1263 -1229
  108. hestia_earth/models/pooreNemecek2018/excretaKgN.py +1 -1
  109. hestia_earth/models/pooreNemecek2018/freshwaterWithdrawalsDuringCycle.py +1 -1
  110. hestia_earth/models/pooreNemecek2018/utils.py +12 -3
  111. hestia_earth/models/schmidt2007/ch4ToAirWasteTreatment.py +1 -6
  112. hestia_earth/models/schmidt2007/h2SToAirWasteTreatment.py +1 -6
  113. hestia_earth/models/schmidt2007/n2OToAirWasteTreatmentDirect.py +1 -6
  114. hestia_earth/models/schmidt2007/nh3ToAirWasteTreatment.py +1 -6
  115. hestia_earth/models/site/pre_checks/country.py +4 -2
  116. hestia_earth/models/transformation/input/excreta.py +1 -1
  117. hestia_earth/models/utils/aggregated.py +12 -15
  118. hestia_earth/models/utils/background_emissions.py +52 -0
  119. hestia_earth/models/utils/blank_node.py +24 -6
  120. hestia_earth/models/utils/impact_assessment.py +26 -17
  121. hestia_earth/models/utils/lookup.py +48 -39
  122. hestia_earth/models/utils/measurement.py +3 -3
  123. hestia_earth/models/utils/product.py +1 -1
  124. hestia_earth/models/utils/source.py +2 -1
  125. hestia_earth/models/utils/term.py +26 -1
  126. hestia_earth/models/version.py +1 -1
  127. {hestia_earth_models-0.69.1.dist-info → hestia_earth_models-0.70.1.dist-info}/METADATA +2 -2
  128. {hestia_earth_models-0.69.1.dist-info → hestia_earth_models-0.70.1.dist-info}/RECORD +214 -209
  129. tests/models/aware/test_scarcityWeightedWaterUse.py +1 -12
  130. tests/models/cycle/input/test_hestiaAggregatedData.py +18 -16
  131. tests/models/ecoalimV9/__init__.py +0 -0
  132. tests/models/ecoalimV9/test_cycle.py +21 -0
  133. tests/models/ecoalimV9/test_impact_assessment.py +24 -0
  134. tests/models/environmentalFootprintV3_1/test_scarcityWeightedWaterUse.py +4 -2
  135. tests/models/geospatialDatabase/test_region.py +1 -1
  136. tests/models/geospatialDatabase/test_utils.py +1 -1
  137. tests/models/haversineFormula/transport/test_distance.py +2 -2
  138. tests/models/{koble2014 → hestia}/test_aboveGroundCropResidue.py +3 -3
  139. tests/models/{cycle → hestia}/test_aboveGroundCropResidueTotal.py +1 -1
  140. tests/models/{site → hestia}/test_brackishWater.py +1 -1
  141. tests/models/{site → hestia}/test_cationExchangeCapacityPerKgSoil.py +1 -1
  142. tests/models/{cycle → hestia}/test_coldCarcassWeightPerHead.py +1 -1
  143. tests/models/{cycle → hestia}/test_coldDressedCarcassWeightPerHead.py +1 -1
  144. tests/models/{cycle → hestia}/test_concentrateFeed.py +1 -1
  145. tests/models/{cycle → hestia}/test_cropResidueManagement.py +1 -1
  146. tests/models/{cycle → hestia}/test_croppingIntensity.py +1 -1
  147. tests/models/{cycle → hestia}/test_energyContentLowerHeatingValue.py +5 -3
  148. tests/models/{cycle → hestia}/test_excretaKgMass.py +1 -1
  149. tests/models/{cycle → hestia}/test_excretaKgN.py +1 -1
  150. tests/models/{cycle → hestia}/test_excretaKgVs.py +1 -1
  151. tests/models/{cycle → hestia}/test_feedConversionRatio.py +1 -1
  152. tests/models/{site → hestia}/test_flowingWater.py +1 -1
  153. tests/models/{site → hestia}/test_freshWater.py +1 -1
  154. tests/models/{cycle → hestia}/test_inorganicFertiliser.py +1 -1
  155. tests/models/{cycle → hestia}/test_irrigatedTypeUnspecified.py +2 -5
  156. tests/models/hestia/test_landCover.py +4 -34
  157. tests/models/{cycle → hestia}/test_liveAnimal.py +1 -1
  158. tests/models/{cycle → hestia}/test_longFallowRatio.py +1 -1
  159. tests/models/{site → hestia}/test_management.py +1 -1
  160. tests/models/{cycle → hestia}/test_materialsAndSubstrate.py +1 -1
  161. tests/models/{cycle → hestia}/test_milkYield.py +1 -1
  162. tests/models/{site → hestia}/test_netPrimaryProduction.py +1 -1
  163. tests/models/{site → hestia}/test_organicCarbonPerHa.py +1 -1
  164. tests/models/{site → hestia}/test_organicCarbonPerKgSoil.py +1 -1
  165. tests/models/{site → hestia}/test_organicCarbonPerM3Soil.py +1 -1
  166. tests/models/{site → hestia}/test_organicMatterPerKgSoil.py +1 -1
  167. tests/models/{site → hestia}/test_organicMatterPerM3Soil.py +1 -1
  168. tests/models/{cycle → hestia}/test_pastureGrass.py +1 -1
  169. tests/models/{cycle → hestia}/test_pastureSystem.py +1 -1
  170. tests/models/{site → hestia}/test_potentialEvapotranspirationAnnual.py +1 -1
  171. tests/models/{site → hestia}/test_potentialEvapotranspirationMonthly.py +1 -1
  172. tests/models/{site → hestia}/test_precipitationAnnual.py +1 -1
  173. tests/models/{site → hestia}/test_precipitationMonthly.py +1 -1
  174. tests/models/{site → hestia}/test_rainfallAnnual.py +1 -1
  175. tests/models/{site → hestia}/test_rainfallMonthly.py +1 -1
  176. tests/models/{cycle → hestia}/test_readyToCookWeightPerHead.py +1 -1
  177. tests/models/{cycle → hestia}/test_residueBurnt.py +1 -1
  178. tests/models/{cycle → hestia}/test_residueIncorporated.py +1 -1
  179. tests/models/{cycle → hestia}/test_residueLeftOnField.py +1 -1
  180. tests/models/hestia/test_residueRemoved.py +15 -3
  181. tests/models/{site → hestia}/test_salineWater.py +1 -1
  182. tests/models/{site → hestia}/test_soilMeasurement.py +2 -2
  183. tests/models/{cycle → hestia}/test_stockingDensityAnimalHousingAverage.py +1 -1
  184. tests/models/{site → hestia}/test_temperatureAnnual.py +1 -1
  185. tests/models/{site → hestia}/test_temperatureMonthly.py +1 -1
  186. tests/models/{site → hestia}/test_totalNitrogenPerKgSoil.py +1 -1
  187. tests/models/{cycle → hestia}/test_unknownPreSeasonWaterRegime.py +1 -1
  188. tests/models/{site → hestia}/test_waterDepth.py +1 -1
  189. tests/models/hestia/test_waterSalinity.py +26 -0
  190. tests/models/ipcc2019/test_ch4ToAirEntericFermentation.py +11 -0
  191. tests/models/ipcc2019/test_ch4ToAirFloodedRice.py +10 -42
  192. tests/models/ipcc2019/test_co2ToAirSoilOrganicCarbonStockChange.py +2 -1
  193. tests/models/ipcc2019/test_nonCo2EmissionsToAirNaturalVegetationBurning.py +22 -8
  194. tests/models/ipcc2019/test_organicCarbonPerHa.py +4 -2
  195. tests/models/pooreNemecek2018/test_landOccupationDuringCycle.py +3 -0
  196. tests/models/site/pre_checks/test_country.py +4 -3
  197. tests/models/test_ecoinventV3.py +2 -2
  198. tests/models/test_ecoinventV3AndEmberClimate.py +2 -2
  199. tests/models/test_emissionNotRelevant.py +0 -8
  200. tests/models/utils/test_measurement.py +1 -1
  201. tests/models/utils/test_source.py +15 -5
  202. tests/orchestrator/test_models.py +1 -0
  203. hestia_earth/models/cycle/residueRemoved.py +0 -54
  204. hestia_earth/models/hestia/nh3ToSurfaceWaterAquacultureSystems.py +0 -64
  205. hestia_earth/models/site/utils.py +0 -93
  206. tests/models/cycle/test_residueRemoved.py +0 -37
  207. tests/models/hestia/test_nh3ToSurfaceWaterAquacultureSystems.py +0 -51
  208. /hestia_earth/models/{cycle → hestia}/feedConversionRatio/feedConversionRatioCarbon.py +0 -0
  209. /hestia_earth/models/{cycle → hestia}/feedConversionRatio/feedConversionRatioDryMatter.py +0 -0
  210. /hestia_earth/models/{cycle → hestia}/feedConversionRatio/feedConversionRatioEnergy.py +0 -0
  211. /hestia_earth/models/{cycle → hestia}/feedConversionRatio/feedConversionRatioFedWeight.py +0 -0
  212. /hestia_earth/models/{cycle → hestia}/feedConversionRatio/feedConversionRatioNitrogen.py +0 -0
  213. /hestia_earth/models/{site → hestia}/organicCarbonPerKgSoil.py +0 -0
  214. /hestia_earth/models/{site → hestia}/organicCarbonPerM3Soil.py +0 -0
  215. /hestia_earth/models/{site → hestia}/organicMatterPerKgSoil.py +0 -0
  216. /hestia_earth/models/{site → hestia}/organicMatterPerM3Soil.py +0 -0
  217. {hestia_earth_models-0.69.1.dist-info → hestia_earth_models-0.70.1.dist-info}/LICENSE +0 -0
  218. {hestia_earth_models-0.69.1.dist-info → hestia_earth_models-0.70.1.dist-info}/WHEEL +0 -0
  219. {hestia_earth_models-0.69.1.dist-info → hestia_earth_models-0.70.1.dist-info}/top_level.txt +0 -0
@@ -2,23 +2,12 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_indicator, fake_load_impacts
4
4
 
5
- from hestia_earth.models.aware.scarcityWeightedWaterUse import MODEL, TERM_ID, run, _should_run
5
+ from hestia_earth.models.aware.scarcityWeightedWaterUse import MODEL, TERM_ID, run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
9
9
 
10
10
 
11
- @patch(f"{class_path}.get_site")
12
- def test_should_run(mock_site):
13
- # no site => no run
14
- mock_site.return_value = None
15
- assert not _should_run({})
16
-
17
- # with site => run
18
- mock_site.return_value = {'@type': 'Site'}
19
- assert _should_run({}) is True
20
-
21
-
22
11
  @patch(f"{class_path}._new_indicator", side_effect=fake_new_indicator)
23
12
  def test_run(*args):
24
13
  with open(f"{fixtures_folder}/impact-assessment.jsonld", encoding='utf-8') as f:
@@ -9,6 +9,18 @@ from hestia_earth.models.cycle.input.hestiaAggregatedData import MODEL_ID, run,
9
9
  class_path = f"hestia_earth.models.cycle.input.{MODEL_ID}"
10
10
  fixtures_folder = f"{fixtures_path}/cycle/input/{MODEL_ID}"
11
11
 
12
+ GENERIC_CROP = {'@id': 'genericCropSeed', 'name': 'Generic crop, seed'}
13
+
14
+
15
+ def fake_search_generic(query, **args):
16
+ match_name = query['bool']['must'][3]['bool']['should'][0]['match']['product.term.name.keyword']
17
+ return [{
18
+ "@id": "genericCropSeed-world-2000-2009",
19
+ "@type": "ImpactAssessment",
20
+ "name": "Generic crop, seed, World, 2000-2009",
21
+ "endDate": "2009"
22
+ }] if match_name == GENERIC_CROP['name'] else []
23
+
12
24
 
13
25
  def test_should_run():
14
26
  cycle = {}
@@ -29,6 +41,7 @@ def test_should_run():
29
41
  assert should_run is True
30
42
 
31
43
 
44
+ @patch(f"{class_path}.get_generic_crop", return_value=GENERIC_CROP)
32
45
  @patch(f"{class_path}.valid_site_type", return_value=True)
33
46
  @patch(f"{class_path}.find_primary_product", return_value={})
34
47
  def test_should_run_seed(mock_primary_product, *args):
@@ -45,7 +58,8 @@ def test_should_run_seed(mock_primary_product, *args):
45
58
  assert should_run is True
46
59
 
47
60
 
48
- @patch(f"{class_path}.download_hestia", side_effect=fake_download)
61
+ @patch(f"{class_path}.download_term", side_effect=fake_download)
62
+ @patch(f"{class_path}.get_generic_crop", return_value=GENERIC_CROP)
49
63
  @patch('hestia_earth.models.utils.aggregated.search', side_effect=fake_aggregated_search)
50
64
  def test_run(*args):
51
65
  with open(f"{fixtures_folder}/cycle.jsonld", encoding='utf-8') as f:
@@ -58,7 +72,8 @@ def test_run(*args):
58
72
  assert result == expected
59
73
 
60
74
 
61
- @patch(f"{class_path}.download_hestia", side_effect=fake_download)
75
+ @patch(f"{class_path}.download_term", side_effect=fake_download)
76
+ @patch(f"{class_path}.get_generic_crop", return_value=GENERIC_CROP)
62
77
  @patch('hestia_earth.models.utils.aggregated.search', side_effect=fake_aggregated_search)
63
78
  def test_run_seed(*args):
64
79
  with open(f"{fixtures_folder}/seed/cycle.jsonld", encoding='utf-8') as f:
@@ -71,20 +86,7 @@ def test_run_seed(*args):
71
86
  assert result == expected
72
87
 
73
88
 
74
- GENERIC_CROP = {'@id': 'genericCropSeed', 'name': 'Generic crop, seed'}
75
-
76
-
77
- def fake_search_generic(query, **args):
78
- match_name = query['bool']['must'][3]['bool']['should'][0]['match']['product.term.name.keyword']
79
- return [{
80
- "@id": "genericCropSeed-world-2000-2009",
81
- "@type": "ImpactAssessment",
82
- "name": "Generic crop, seed, World, 2000-2009",
83
- "endDate": "2009"
84
- }] if match_name == GENERIC_CROP['name'] else []
85
-
86
-
87
- @patch(f"{class_path}.download_hestia", side_effect=fake_download)
89
+ @patch(f"{class_path}.download_term", side_effect=fake_download)
88
90
  @patch(f"{class_path}.get_generic_crop", return_value=GENERIC_CROP)
89
91
  @patch('hestia_earth.models.utils.aggregated.search', side_effect=fake_search_generic)
90
92
  def test_run_seed_generic(*args):
File without changes
@@ -0,0 +1,21 @@
1
+ import os
2
+ import json
3
+ from unittest.mock import patch
4
+
5
+ from tests.utils import fixtures_path, fake_new_emission
6
+ from hestia_earth.models.ecoalimV9.cycle import MODEL, run
7
+
8
+ class_path = f"hestia_earth.models.{MODEL}.cycle"
9
+ fixtures_folder = os.path.join(fixtures_path, MODEL, 'cycle')
10
+
11
+
12
+ @patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
13
+ def test_run(*args):
14
+ with open(f"{fixtures_folder}/cycle.jsonld", encoding='utf-8') as f:
15
+ cycle = json.load(f)
16
+
17
+ with open(f"{fixtures_folder}/result.jsonld", encoding='utf-8') as f:
18
+ expected = json.load(f)
19
+
20
+ result = run(cycle)
21
+ assert result == expected
@@ -0,0 +1,24 @@
1
+ import os
2
+ import json
3
+ from unittest.mock import patch
4
+
5
+ from tests.utils import fixtures_path, fake_new_indicator
6
+ from hestia_earth.models.ecoalimV9.impact_assessment import MODEL, run
7
+
8
+ class_path = f"hestia_earth.models.{MODEL}.impact_assessment"
9
+ fixtures_folder = os.path.join(fixtures_path, MODEL, 'impact_assessment')
10
+
11
+
12
+ @patch(f"{class_path}._new_indicator", side_effect=fake_new_indicator)
13
+ def test_run(*args):
14
+ with open(f"{fixtures_folder}/impact.jsonld", encoding='utf-8') as f:
15
+ impact = json.load(f)
16
+ with open(os.path.join(fixtures_path, MODEL, 'cycle', 'cycle.jsonld'), encoding='utf-8') as f:
17
+ cycle = json.load(f)
18
+ impact['cycle'] = cycle
19
+
20
+ with open(f"{fixtures_folder}/result.jsonld", encoding='utf-8') as f:
21
+ expected = json.load(f)
22
+
23
+ result = run(impact)
24
+ assert result == expected
@@ -25,8 +25,10 @@ def test_run(mock_indicator, folder):
25
25
  with open(f"{fixtures_folder}/{folder}/impactassessment.jsonld", encoding='utf-8') as f:
26
26
  impactassessment = json.load(f)
27
27
 
28
- with open(f"{fixtures_folder}/{folder}/result.jsonld", encoding='utf-8') as f:
29
- expected = json.load(f)
28
+ expected = None
29
+ if os.path.exists(f"{fixtures_folder}/{folder}/result.jsonld"):
30
+ with open(f"{fixtures_folder}/{folder}/result.jsonld", encoding='utf-8') as f:
31
+ expected = json.load(f)
30
32
 
31
33
  value = run(impactassessment)
32
34
  assert value == expected, folder
@@ -17,7 +17,7 @@ def test_should_run(mock_has_coordinates, *args):
17
17
  assert not _should_run({})
18
18
 
19
19
 
20
- @patch(f"{class_path}.download_hestia", side_effect=fake_download_term)
20
+ @patch(f"{class_path}.download_term", side_effect=fake_download_term)
21
21
  @patch(f"{class_path}.download", return_value=None)
22
22
  def test_run(mock_download, *args):
23
23
  with open(f"{fixtures_path}/{MODEL}/site.jsonld", encoding='utf-8') as f:
@@ -17,7 +17,7 @@ def test_get_region_factor():
17
17
  assert get_region_factor('croppingIntensity', site, TermTermType.LANDUSEMANAGEMENT) == 0.9999775685587958
18
18
 
19
19
 
20
- @patch(f"{class_path}.download_hestia", return_value={'area': AREA})
20
+ @patch(f"{class_path}.download_term", return_value={'area': AREA})
21
21
  def test_get_area_size(*args):
22
22
  site = {'country': COUNTRY}
23
23
  assert get_area_size(site) == AREA
@@ -8,14 +8,14 @@ class_path = f"hestia_earth.models.{MODEL}.transport.{MODEL_KEY}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/transport/{MODEL_KEY}"
9
9
 
10
10
 
11
- def fake_download_hestia(id: str, *args):
11
+ def fake_download_term(id: str, *args):
12
12
  return {
13
13
  'GADM-FRA': {'latitude': 46.55891593, 'longitude': 2.55355253},
14
14
  'GADM-CHN': {'latitude': 36.56069891, 'longitude': 103.8579343}
15
15
  }[id]
16
16
 
17
17
 
18
- @patch(f"{class_path}.download_hestia", side_effect=fake_download_hestia)
18
+ @patch(f"{class_path}.download_term", side_effect=fake_download_term)
19
19
  @patch(f"{class_path}.include_methodModel", side_effect=_set_methodModel)
20
20
  def test_run(*args):
21
21
  with open(f"{fixtures_folder}/cycle.jsonld", encoding='utf-8') as f:
@@ -2,10 +2,10 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_product
4
4
 
5
- from hestia_earth.models.koble2014.aboveGroundCropResidue import run, _should_run
5
+ from hestia_earth.models.hestia.aboveGroundCropResidue import MODEL, run, _should_run
6
6
 
7
- class_path = 'hestia_earth.models.koble2014.aboveGroundCropResidue'
8
- fixtures_folder = f"{fixtures_path}/koble2014/aboveGroundCropResidue"
7
+ class_path = f"hestia_earth.models.{MODEL}.aboveGroundCropResidue"
8
+ fixtures_folder = f"{fixtures_path}/{MODEL}/aboveGroundCropResidue"
9
9
 
10
10
 
11
11
  @patch(f"{class_path}._is_term_type_incomplete", return_value=True)
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_product
4
4
 
5
- from hestia_earth.models.cycle.aboveGroundCropResidueTotal import MODEL, TERM_ID, run
5
+ from hestia_earth.models.hestia.aboveGroundCropResidueTotal import MODEL, TERM_ID, run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_measurement
4
4
 
5
- from hestia_earth.models.site.brackishWater import MODEL, TERM_ID, _should_run, run
5
+ from hestia_earth.models.hestia.brackishWater import MODEL, TERM_ID, _should_run, run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_measurement
4
4
 
5
- from hestia_earth.models.site.cationExchangeCapacityPerKgSoil import (
5
+ from hestia_earth.models.hestia.cationExchangeCapacityPerKgSoil import (
6
6
  MODEL, TERM_ID, run, _should_run_measurements
7
7
  )
8
8
 
@@ -4,7 +4,7 @@ import json
4
4
  from hestia_earth.schema import TermTermType
5
5
  from tests.utils import fixtures_path, fake_new_property
6
6
 
7
- from hestia_earth.models.cycle.coldCarcassWeightPerHead import MODEL, TERM_ID, _should_run, run
7
+ from hestia_earth.models.hestia.coldCarcassWeightPerHead import MODEL, TERM_ID, _should_run, run
8
8
 
9
9
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
10
10
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -4,7 +4,7 @@ import json
4
4
  from hestia_earth.schema import TermTermType
5
5
  from tests.utils import fixtures_path, fake_new_property
6
6
 
7
- from hestia_earth.models.cycle.coldDressedCarcassWeightPerHead import MODEL, TERM_ID, _should_run, run
7
+ from hestia_earth.models.hestia.coldDressedCarcassWeightPerHead import MODEL, TERM_ID, _should_run, run
8
8
 
9
9
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
10
10
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_property
4
4
 
5
- from hestia_earth.models.cycle.concentrateFeed import MODEL, _should_run, run
5
+ from hestia_earth.models.hestia.concentrateFeed import MODEL, _should_run, run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.concentrateFeed"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/concentrateFeed"
@@ -3,7 +3,7 @@ import json
3
3
  from tests.utils import fake_new_practice, fixtures_path
4
4
  from hestia_earth.schema import TermTermType
5
5
 
6
- from hestia_earth.models.cycle.cropResidueManagement import MODEL, _should_run, run
6
+ from hestia_earth.models.hestia.cropResidueManagement import MODEL, _should_run, run
7
7
 
8
8
  class_path = f"hestia_earth.models.{MODEL}.{TermTermType.CROPRESIDUEMANAGEMENT.value}"
9
9
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TermTermType.CROPRESIDUEMANAGEMENT.value}"
@@ -3,7 +3,7 @@ import pytest
3
3
  import json
4
4
  from tests.utils import fixtures_path, fake_new_practice
5
5
 
6
- from hestia_earth.models.cycle.croppingIntensity import MODEL, TERM_ID, run, _should_run
6
+ from hestia_earth.models.hestia.croppingIntensity import MODEL, TERM_ID, run, _should_run
7
7
 
8
8
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
9
9
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -2,10 +2,12 @@ from unittest.mock import patch
2
2
  import json
3
3
 
4
4
  from tests.utils import fixtures_path, fake_new_property
5
- from hestia_earth.models.cycle.energyContentLowerHeatingValue import TERM_ID, PROPERTY_KEY, run, _should_run_input
5
+ from hestia_earth.models.hestia.energyContentLowerHeatingValue import (
6
+ MODEL, TERM_ID, PROPERTY_KEY, run, _should_run_input
7
+ )
6
8
 
7
- class_path = f"hestia_earth.models.cycle.{TERM_ID}"
8
- fixtures_folder = f"{fixtures_path}/cycle/{TERM_ID}"
9
+ class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
10
+ fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
9
11
 
10
12
 
11
13
  def test_should_run_input():
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
 
4
4
  from tests.utils import fixtures_path, fake_new_product, order_list
5
- from hestia_earth.models.cycle.excretaKgMass import MODEL, run, _should_run
5
+ from hestia_earth.models.hestia.excretaKgMass import MODEL, run, _should_run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.excretaKgMass"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/excretaKgMass"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
 
4
4
  from tests.utils import fixtures_path, fake_new_product, order_list
5
- from hestia_earth.models.cycle.excretaKgN import MODEL, run, _should_run
5
+ from hestia_earth.models.hestia.excretaKgN import MODEL, run, _should_run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.excretaKgN"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/excretaKgN"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
 
4
4
  from tests.utils import fixtures_path, fake_new_product, order_list
5
- from hestia_earth.models.cycle.excretaKgVs import MODEL, run, _should_run
5
+ from hestia_earth.models.hestia.excretaKgVs import MODEL, run, _should_run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.excretaKgVs"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/excretaKgVs"
@@ -3,7 +3,7 @@ import json
3
3
  from hestia_earth.schema import TermTermType
4
4
  from tests.utils import fixtures_path, fake_new_practice
5
5
 
6
- from hestia_earth.models.cycle.feedConversionRatio import MODEL, run, _should_run
6
+ from hestia_earth.models.hestia.feedConversionRatio import MODEL, run, _should_run
7
7
 
8
8
  class_path = f"hestia_earth.models.{MODEL}.feedConversionRatio"
9
9
  fixtures_folder = f"{fixtures_path}/{MODEL}/feedConversionRatio"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_measurement
4
4
 
5
- from hestia_earth.models.site.flowingWater import MODEL, run, _should_run
5
+ from hestia_earth.models.hestia.flowingWater import MODEL, run, _should_run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.flowingWater"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/flowingWater"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_measurement
4
4
 
5
- from hestia_earth.models.site.freshWater import MODEL, TERM_ID, _should_run, run
5
+ from hestia_earth.models.hestia.freshWater import MODEL, TERM_ID, _should_run, run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_input
4
4
 
5
- from hestia_earth.models.cycle.inorganicFertiliser import MODEL, MODEL_KEY, run
5
+ from hestia_earth.models.hestia.inorganicFertiliser import MODEL, MODEL_KEY, run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{MODEL_KEY}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{MODEL_KEY}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_practice
4
4
 
5
- from hestia_earth.models.cycle.irrigatedTypeUnspecified import MODEL, TERM_ID, run
5
+ from hestia_earth.models.hestia.irrigatedTypeUnspecified import MODEL, TERM_ID, run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -22,11 +22,8 @@ def test_run_complete_low_irrigation(*argsm):
22
22
  with open(f"{fixtures_folder}/complete-low-irrigation/cycle.jsonld", encoding='utf-8') as f:
23
23
  cycle = json.load(f)
24
24
 
25
- with open(f"{fixtures_folder}/complete-low-irrigation/result.jsonld", encoding='utf-8') as f:
26
- expected = json.load(f)
27
-
28
25
  value = run(cycle)
29
- assert value == expected
26
+ assert value == []
30
27
 
31
28
 
32
29
  @patch(f"{class_path}._new_practice", side_effect=fake_new_practice)
@@ -1,6 +1,5 @@
1
- import csv
1
+ import os
2
2
  import json
3
- import numpy as np
4
3
  import pytest
5
4
  from unittest.mock import patch
6
5
 
@@ -13,6 +12,7 @@ from hestia_earth.models.hestia.landCover import (
13
12
 
14
13
  CLASS_PATH = f"hestia_earth.models.{MODEL}.{MODEL_KEY}"
15
14
  fixtures_folder = f"{fixtures_path}/{MODEL}/{MODEL_KEY}"
15
+ _folders = [d for d in os.listdir(fixtures_folder) if os.path.isdir(os.path.join(fixtures_folder, d))]
16
16
 
17
17
  FAOSTAT_CLASS_PATH = f"hestia_earth.models.{FAOSTAT_MODEL}.utils"
18
18
  faostat_fixtures_folder = f"{fixtures_path}/{FAOSTAT_MODEL}/utils"
@@ -42,19 +42,6 @@ BRAZIL_SITE = {
42
42
  }
43
43
 
44
44
 
45
- def recfromcsv_mod(filename, **kwargs):
46
- def rewrite_csv_as_tab(csv_name):
47
- with open(csv_name, newline='') as fp:
48
- for row in csv.reader(fp, delimiter=","):
49
- yield "\t".join(row)
50
- return np.recfromcsv(
51
- rewrite_csv_as_tab(filename), delimiter="\t", encoding=None, **kwargs)
52
-
53
-
54
- def _download_fixture(filepath: str):
55
- return recfromcsv_mod(filename=filepath)
56
-
57
-
58
45
  def test_get_changes():
59
46
  result, missing_values = get_changes(
60
47
  country_id="GADM-AFG",
@@ -232,26 +219,9 @@ def test_scale_values_to_one(dictionary, expected_result):
232
219
  assert round(v, 3) == round(expected_result[k], 3)
233
220
 
234
221
 
235
- @pytest.mark.parametrize(
236
- "subfolder",
237
- [
238
- "albania_example",
239
- "argentina_example",
240
- "armenia_example",
241
- "brazil_example",
242
- "zimbabwe_example",
243
- "brazil_empty_example",
244
- "gbr_example",
245
- "malaysia",
246
- "prior_landCover",
247
- "nigeria_cassava",
248
- "cover_crops",
249
- "missing_fao_date",
250
- "iran_sistan"
251
- ]
252
- )
222
+ @pytest.mark.parametrize("subfolder", _folders)
253
223
  @patch(f"{CLASS_PATH}._new_management", side_effect=fake_new_management)
254
- def test_run(mock, subfolder):
224
+ def test_run(mock, subfolder: str):
255
225
  folder = f"{fixtures_folder}/{subfolder}"
256
226
  with open(f"{folder}/site.jsonld", encoding='utf-8') as f:
257
227
  site = json.load(f)
@@ -3,7 +3,7 @@ import json
3
3
  from hestia_earth.schema import TermTermType
4
4
 
5
5
  from tests.utils import fixtures_path, fake_new_product
6
- from hestia_earth.models.cycle.liveAnimal import MODEL, MODEL_KEY, run, _should_run
6
+ from hestia_earth.models.hestia.liveAnimal import MODEL, MODEL_KEY, run, _should_run
7
7
 
8
8
  class_path = f"hestia_earth.models.{MODEL}.{MODEL_KEY}"
9
9
  fixtures_folder = f"{fixtures_path}/{MODEL}/{MODEL_KEY}"
@@ -3,7 +3,7 @@ import pytest
3
3
  import json
4
4
  from tests.utils import fixtures_path, fake_new_practice
5
5
 
6
- from hestia_earth.models.cycle.longFallowRatio import MODEL, TERM_ID, run, _should_run
6
+ from hestia_earth.models.hestia.longFallowRatio import MODEL, TERM_ID, run, _should_run
7
7
 
8
8
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
9
9
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -5,7 +5,7 @@ from unittest.mock import Mock, patch
5
5
  from hestia_earth.schema import SiteSiteType
6
6
 
7
7
  from tests.utils import fixtures_path, fake_new_management
8
- from hestia_earth.models.site.management import MODEL, MODEL_KEY, run
8
+ from hestia_earth.models.hestia.management import MODEL, MODEL_KEY, run
9
9
 
10
10
  class_path = f"hestia_earth.models.{MODEL}.{MODEL_KEY}"
11
11
  fixtures_folder = os.path.join(fixtures_path, MODEL, MODEL_KEY)
@@ -4,7 +4,7 @@ import pytest
4
4
  from hestia_earth.utils.tools import to_precision
5
5
 
6
6
  from tests.utils import fixtures_path, fake_new_input
7
- from hestia_earth.models.cycle.materialAndSubstrate import MODEL, MODEL_KEY, run, calculate_value
7
+ from hestia_earth.models.hestia.materialAndSubstrate import MODEL, MODEL_KEY, run, calculate_value
8
8
 
9
9
  class_path = f"hestia_earth.models.{MODEL}.{MODEL_KEY}"
10
10
  fixtures_folder = f"{fixtures_path}/{MODEL}/{MODEL_KEY}"
@@ -3,7 +3,7 @@ import json
3
3
  from hestia_earth.schema import TermTermType
4
4
 
5
5
  from tests.utils import fixtures_path, fake_new_practice
6
- from hestia_earth.models.cycle.milkYield import MODEL, MODEL_KEY, run, _should_run
6
+ from hestia_earth.models.hestia.milkYield import MODEL, MODEL_KEY, run, _should_run
7
7
 
8
8
  class_path = f"hestia_earth.models.{MODEL}.{MODEL_KEY}"
9
9
  fixtures_folder = f"{fixtures_path}/{MODEL}/{MODEL_KEY}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_measurement
4
4
 
5
- from hestia_earth.models.site.netPrimaryProduction import MODEL, TERM_ID, run, _should_run
5
+ from hestia_earth.models.hestia.netPrimaryProduction import MODEL, TERM_ID, run, _should_run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -4,7 +4,7 @@ from unittest.mock import patch
4
4
 
5
5
  from tests.utils import fixtures_path, fake_new_measurement
6
6
 
7
- from hestia_earth.models.site.organicCarbonPerHa import (
7
+ from hestia_earth.models.hestia.organicCarbonPerHa import (
8
8
  MODEL, TERM_ID, run, _cdf, _c_to_depth, _get_most_relevant_soc_node, _get_last_date
9
9
  )
10
10
 
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_measurement
4
4
 
5
- from hestia_earth.models.site.organicCarbonPerKgSoil import MODEL, TERM_ID, run, _should_run
5
+ from hestia_earth.models.hestia.organicCarbonPerKgSoil import MODEL, TERM_ID, run, _should_run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_measurement
4
4
 
5
- from hestia_earth.models.site.organicCarbonPerM3Soil import MODEL, TERM_ID, run, _should_run
5
+ from hestia_earth.models.hestia.organicCarbonPerM3Soil import MODEL, TERM_ID, run, _should_run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_measurement
4
4
 
5
- from hestia_earth.models.site.organicMatterPerKgSoil import MODEL, TERM_ID, run, _should_run
5
+ from hestia_earth.models.hestia.organicMatterPerKgSoil import MODEL, TERM_ID, run, _should_run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_measurement
4
4
 
5
- from hestia_earth.models.site.organicMatterPerM3Soil import MODEL, TERM_ID, run, _should_run
5
+ from hestia_earth.models.hestia.organicMatterPerM3Soil import MODEL, TERM_ID, run, _should_run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fake_new_practice, fixtures_path
4
4
 
5
- from hestia_earth.models.cycle.pastureGrass import MODEL, TERM_ID, KEY_TERM_ID, _should_run, run
5
+ from hestia_earth.models.hestia.pastureGrass import MODEL, TERM_ID, KEY_TERM_ID, _should_run, run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -3,7 +3,7 @@ import json
3
3
  from hestia_earth.schema import TermTermType
4
4
 
5
5
  from tests.utils import fixtures_path, fake_new_practice
6
- from hestia_earth.models.cycle.pastureSystem import MODEL, MODEL_KEY, run, _should_run
6
+ from hestia_earth.models.hestia.pastureSystem import MODEL, MODEL_KEY, run, _should_run
7
7
 
8
8
  class_path = f"hestia_earth.models.{MODEL}.{MODEL_KEY}"
9
9
  fixtures_folder = f"{fixtures_path}/{MODEL}/{MODEL_KEY}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_measurement
4
4
 
5
- from hestia_earth.models.site.potentialEvapotranspirationAnnual import MODEL, TERM_ID, run, _should_run
5
+ from hestia_earth.models.hestia.potentialEvapotranspirationAnnual import MODEL, TERM_ID, run, _should_run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_measurement
4
4
 
5
- from hestia_earth.models.site.potentialEvapotranspirationMonthly import MODEL, TERM_ID, run, _should_run
5
+ from hestia_earth.models.hestia.potentialEvapotranspirationMonthly import MODEL, TERM_ID, run, _should_run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_measurement
4
4
 
5
- from hestia_earth.models.site.precipitationAnnual import MODEL, TERM_ID, run, _should_run
5
+ from hestia_earth.models.hestia.precipitationAnnual import MODEL, TERM_ID, run, _should_run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"