hestia-earth-models 0.58.0__py3-none-any.whl → 0.59.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.

Files changed (35) hide show
  1. hestia_earth/models/cycle/{irrigated.py → irrigatedTypeUnspecified.py} +4 -4
  2. hestia_earth/models/cycle/residueIncorporated.py +1 -1
  3. hestia_earth/models/emepEea2019/nh3ToAirInorganicFertiliser.py +2 -2
  4. hestia_earth/models/geospatialDatabase/clayContent.py +17 -4
  5. hestia_earth/models/geospatialDatabase/sandContent.py +17 -4
  6. hestia_earth/models/impact_assessment/irrigated.py +0 -3
  7. hestia_earth/models/ipcc2019/co2ToAirSoilCarbonStockChangeManagementChange.py +10 -9
  8. hestia_earth/models/ipcc2019/n2OToAirCropResidueDecompositionDirect.py +4 -51
  9. hestia_earth/models/ipcc2019/n2OToAirInorganicFertiliserDirect.py +104 -0
  10. hestia_earth/models/ipcc2019/n2OToAirOrganicFertiliserDirect.py +105 -0
  11. hestia_earth/models/ipcc2019/organicCarbonPerHa.py +1059 -1220
  12. hestia_earth/models/ipcc2019/utils.py +82 -1
  13. hestia_earth/models/mocking/search-results.json +165 -95
  14. hestia_earth/models/site/management.py +12 -9
  15. hestia_earth/models/site/organicCarbonPerHa.py +251 -89
  16. hestia_earth/models/utils/blank_node.py +157 -34
  17. hestia_earth/models/utils/cycle.py +6 -3
  18. hestia_earth/models/utils/measurement.py +1 -1
  19. hestia_earth/models/utils/site.py +1 -1
  20. hestia_earth/models/utils/term.py +46 -1
  21. hestia_earth/models/version.py +1 -1
  22. {hestia_earth_models-0.58.0.dist-info → hestia_earth_models-0.59.1.dist-info}/METADATA +4 -8
  23. {hestia_earth_models-0.58.0.dist-info → hestia_earth_models-0.59.1.dist-info}/RECORD +35 -31
  24. tests/models/cycle/{test_irrigated.py → test_irrigatedTypeUnspecified.py} +1 -1
  25. tests/models/geospatialDatabase/test_clayContent.py +9 -3
  26. tests/models/geospatialDatabase/test_sandContent.py +9 -3
  27. tests/models/ipcc2019/test_n2OToAirInorganicFertiliserDirect.py +74 -0
  28. tests/models/ipcc2019/test_n2OToAirOrganicFertiliserDirect.py +74 -0
  29. tests/models/ipcc2019/test_organicCarbonPerHa.py +303 -1044
  30. tests/models/site/test_organicCarbonPerHa.py +51 -5
  31. tests/models/utils/test_blank_node.py +102 -42
  32. tests/models/utils/test_term.py +17 -3
  33. {hestia_earth_models-0.58.0.dist-info → hestia_earth_models-0.59.1.dist-info}/LICENSE +0 -0
  34. {hestia_earth_models-0.58.0.dist-info → hestia_earth_models-0.59.1.dist-info}/WHEEL +0 -0
  35. {hestia_earth_models-0.58.0.dist-info → hestia_earth_models-0.59.1.dist-info}/top_level.txt +0 -0
@@ -3,7 +3,7 @@ hestia_earth/models/__init__.py,sha256=qEFeq3yuf3lQKVseALmL8aPM8fpCS54B_5pry00M3
3
3
  hestia_earth/models/cache_sites.py,sha256=kp_3D09P-JdAn9vt7eU-KKTwd6BAXWKQL_0UQCDsH2s,4798
4
4
  hestia_earth/models/log.py,sha256=b63I3qyTtQs17xxbq8RI0Fv2lvZ1oDZ9k0njhxqiFFk,3459
5
5
  hestia_earth/models/requirements.py,sha256=znNZJAhwX2iYiKcAQXPftY7z_1MsNa0QxCXkXyHm_U0,17363
6
- hestia_earth/models/version.py,sha256=bOEQGvipVcE5o-_UBd4E9apv0XXPRIDQEF0I1ItvYic,19
6
+ hestia_earth/models/version.py,sha256=LsmLTJIb3gRkCkowNKNONE3gjzMidoU3T3ZdHLRP_xc,19
7
7
  hestia_earth/models/agribalyse2016/__init__.py,sha256=WvK0qCQbnYtg9oZxrACd1wGormZyXibPtpCnIQeDqbw,415
8
8
  hestia_earth/models/agribalyse2016/fuelElectricity.py,sha256=mrh8seYSYdTgcMDCETLiknuPeJehg071YoG4UiyW0yU,4404
9
9
  hestia_earth/models/agribalyse2016/machineryInfrastructureDepreciatedAmountPerCycle.py,sha256=_Rbngu0DzHKa62JwBl58ZC_ui1zLF2que_nB7ukhOQc,3392
@@ -44,14 +44,14 @@ hestia_earth/models/cycle/excretaKgMass.py,sha256=iA8Kfl3WvyxbQpx1QOGPQZ9O_Pc5rj
44
44
  hestia_earth/models/cycle/excretaKgN.py,sha256=mgJTneQIYJ9Su-rTK5ppb_k3YhICFNWsfPZtGR98RI0,2968
45
45
  hestia_earth/models/cycle/excretaKgVs.py,sha256=ed-DcQoQXZgWF8UZDs2N-G6EBIOPmpXu3BD6jdmh0V0,2973
46
46
  hestia_earth/models/cycle/inorganicFertiliser.py,sha256=3pJRcbZ0OQSNkFq_YC4McpiwLvWJpnL29AhhmCxr7RI,6938
47
- hestia_earth/models/cycle/irrigated.py,sha256=CjQb6zJxBNXuvtQRj8kICjTYGlYdV9Bjn2PARTfJeSY,2288
47
+ hestia_earth/models/cycle/irrigatedTypeUnspecified.py,sha256=OgKEuGmLLieS_aZ-2eA6r78UcXo1jcA0JJRZUllMHJg,2303
48
48
  hestia_earth/models/cycle/liveAnimal.py,sha256=orJz6ZN3bbGNzU9s5xsTk3u8K4ntPSv1_PyG0Nwslh8,3934
49
49
  hestia_earth/models/cycle/milkYield.py,sha256=RGaD5RtinMTsu6p49YUgr5z1NAVgCNFNPmwWa_Wrk3Q,5718
50
50
  hestia_earth/models/cycle/pastureGrass.py,sha256=7PrmDMJPtsbKGa8WIOh_4NXNtbH3Pxb23pmjawQuY9o,1226
51
51
  hestia_earth/models/cycle/pastureSystem.py,sha256=uksVgl_3bp_t2niwZ5BvS3VT-Kndx26Se6GpzqG0bX8,2709
52
52
  hestia_earth/models/cycle/readyToCookWeightPerHead.py,sha256=F4UtK1gSsIYqbQ1V2hSUszSrq2HFN5LdMB33Yc-bfTQ,2927
53
53
  hestia_earth/models/cycle/residueBurnt.py,sha256=HwU1D9ibiIul-FlXDUcEMDEc_KxpB8ug0SLz-4rXxKk,2106
54
- hestia_earth/models/cycle/residueIncorporated.py,sha256=6Gls2Uam9H9gt045D02FOEIcKwL5m0hgC4vP_MRfBAM,2762
54
+ hestia_earth/models/cycle/residueIncorporated.py,sha256=9_s2RMOy5D20eq9ziDBEA_Y7RiFFMeK0bDJ65CW4qlE,2763
55
55
  hestia_earth/models/cycle/residueLeftOnField.py,sha256=qYxKGAdUORN7Vjqj7AZC2VGV_rM3MN0-padDGhgjiNU,2175
56
56
  hestia_earth/models/cycle/residueRemoved.py,sha256=jxDu_Jfcyd-rm-qo8ZuRIf-GGxtFBMpmGy1zHOavwy0,2135
57
57
  hestia_earth/models/cycle/siteDuration.py,sha256=Hox20n3Y-tJ4ydmkrOreWOXAENxOnd827B7qH7_66T0,1058
@@ -108,7 +108,7 @@ hestia_earth/models/emepEea2019/__init__.py,sha256=l90-pWrqIzt1ap1WNk0gF4iZeF5_T
108
108
  hestia_earth/models/emepEea2019/co2ToAirFuelCombustion.py,sha256=DfoGlB5HjA1gafO0OutJjfsA6yPP_PsAd-p16evwCiQ,1609
109
109
  hestia_earth/models/emepEea2019/n2OToAirFuelCombustionDirect.py,sha256=R3lRF5-Md4Jd7irvTe8WJZJPc9-wa1pD6UWVk7lnGtQ,1616
110
110
  hestia_earth/models/emepEea2019/nh3ToAirExcreta.py,sha256=lWo1AaorIk4HtTCQAND3RFbCHO-em1DbA5ZOxv0Ldn8,3750
111
- hestia_earth/models/emepEea2019/nh3ToAirInorganicFertiliser.py,sha256=n7m9X4dqjmZdaB_2RuClUp39L_cZ3_9jhdDcKqMPQtA,6377
111
+ hestia_earth/models/emepEea2019/nh3ToAirInorganicFertiliser.py,sha256=AGQwJX3GwI2PbV8fqW-do8EyaW8pgrQ7iVmzXNceJTg,6377
112
112
  hestia_earth/models/emepEea2019/noxToAirFuelCombustion.py,sha256=y49RvO5OkrZ4iK7o2Kmx5xW52y8SS9xEKAmlXlTQtWc,1609
113
113
  hestia_earth/models/emepEea2019/so2ToAirFuelCombustion.py,sha256=bo_0mFcwicpOkPsvZRAnL2tDBDRBAQqsPD_Wc5e20K4,1609
114
114
  hestia_earth/models/emepEea2019/utils.py,sha256=ikoZn3JPe9wz-_voVlIqVwh4jBgmnfKi2oyLhi7_7E4,1398
@@ -130,7 +130,7 @@ hestia_earth/models/faostat2018/product/__init__.py,sha256=47DEQpj8HBSa-_TImW-5J
130
130
  hestia_earth/models/faostat2018/product/price.py,sha256=VoWA9PyQKRFPiIv2woKLW3XNMh9Ayc4JHWZ97f5IYRk,8217
131
131
  hestia_earth/models/geospatialDatabase/__init__.py,sha256=TH-FW3aoL7r1GquRChr7rde7uQonKQRDR00udG8tDrQ,957
132
132
  hestia_earth/models/geospatialDatabase/aware.py,sha256=cbxFnShXW8QUCIjU4uuO1DdK9KhYiLf41ZVjS9hSppI,1358
133
- hestia_earth/models/geospatialDatabase/clayContent.py,sha256=oqeJUrPsWdz-iUkI8tCN1t-dZU_PGaU_XNiS1lH0qmE,2120
133
+ hestia_earth/models/geospatialDatabase/clayContent.py,sha256=HWaswqkf1FZXcRHw8DrMvvpH2Uo3nbjX4C0D1tqyTBw,2710
134
134
  hestia_earth/models/geospatialDatabase/croppingIntensity.py,sha256=NcUUP3UxpY-Bd5lxLrX5q93OJtYeaq-a3seLq1T2ab0,1876
135
135
  hestia_earth/models/geospatialDatabase/drainageClass.py,sha256=CVagB2wxLnHgQQauDyYCJCfJw21OPB7Ry8BVyt2uPak,1883
136
136
  hestia_earth/models/geospatialDatabase/ecoClimateZone.py,sha256=hzK9Je_4NvbLtgAM48G7yf-6jrcMpsDzqSlLkVP3oYg,3625
@@ -146,7 +146,7 @@ hestia_earth/models/geospatialDatabase/potentialEvapotranspirationLongTermAnnual
146
146
  hestia_earth/models/geospatialDatabase/precipitationAnnual.py,sha256=8_lMKVUPClnp7tetHrsoUY2ZGG2J7c-cXqJD8rznp0Q,2803
147
147
  hestia_earth/models/geospatialDatabase/precipitationLongTermAnnualMean.py,sha256=fS5knfil5f2QP8-gxFdXuoGTxXpzoJQZ9h4UjWIWjCA,2376
148
148
  hestia_earth/models/geospatialDatabase/region.py,sha256=rdywdsI4OglcO05tih0UQx0qbnm8BAn7mP-x74iV03c,1462
149
- hestia_earth/models/geospatialDatabase/sandContent.py,sha256=34gmXDuv8pA7KGmxWQ8YEVnaJxHN2oS6lCgFVmr6qHc,2114
149
+ hestia_earth/models/geospatialDatabase/sandContent.py,sha256=BZUn2z4BN1HgCGZ2Xsifca2CRTaZ4gdcaZ8A1_UoPQM,2704
150
150
  hestia_earth/models/geospatialDatabase/siltContent.py,sha256=0GnBZHjqS_Py4730s4LqzQ_GikBSxFyUGYG4dEiXiGs,2162
151
151
  hestia_earth/models/geospatialDatabase/slope.py,sha256=g1SpuYks60injv2w-CMjESNfu8KM1JsiYnRT9XZfSuY,1859
152
152
  hestia_earth/models/geospatialDatabase/slopeLength.py,sha256=6pGr1qR0EiiUKkeflpYut7eI6UsnXAzHDoHhAzXKFJk,1864
@@ -176,7 +176,7 @@ hestia_earth/models/impact_assessment/__init__.py,sha256=gTR_PhWps593fPhm-V826VL
176
176
  hestia_earth/models/impact_assessment/emissions.py,sha256=zRQd17joMqij8mjRcrY9LssHgwzsYC5bkoy7iGdjj-Q,3429
177
177
  hestia_earth/models/impact_assessment/freshwaterWithdrawalsDuringCycle.py,sha256=wvNwABEh4blgm95G9y_yorMNEjyYsq4MZiFggkPRuIE,3932
178
178
  hestia_earth/models/impact_assessment/freshwaterWithdrawalsInputsProduction.py,sha256=DSLX_aEWaUFcFZRD46bG5lIQ4TtAtIqH-sMkVCJH2Dg,990
179
- hestia_earth/models/impact_assessment/irrigated.py,sha256=0lFUPRUwQze283F6aCsqiBJ2pbFNPvApcbppwbSF2SE,749
179
+ hestia_earth/models/impact_assessment/irrigated.py,sha256=bXUQdF3SrL9Lqh6QztL5Gcbar0AfTiN5FHVco0JvMpA,704
180
180
  hestia_earth/models/impact_assessment/landOccupationInputsProduction.py,sha256=SggB_4tpiKNeb6TIQWBm-X9VwG4pzLoyHdK8JroRIsE,576
181
181
  hestia_earth/models/impact_assessment/landTransformationFromCropland100YearAverageInputsProduction.py,sha256=jxeJS8r1qYIoyeEE-MGKbldEDL3x9CG8aIb4JdcUnj4,1036
182
182
  hestia_earth/models/impact_assessment/landTransformationFromCropland20YearAverageInputsProduction.py,sha256=vluuIcr1jYhs11oz7nANk2qUuUVPy5uNkvpfMv_M4LE,1034
@@ -223,22 +223,24 @@ hestia_earth/models/ipcc2019/ch4ToAirEntericFermentation.py,sha256=khX90Njkmlvos
223
223
  hestia_earth/models/ipcc2019/ch4ToAirExcreta.py,sha256=IzYHdnzT8Z-WQGoZIt9-O98VqriA5rKr38He_TbYadk,6723
224
224
  hestia_earth/models/ipcc2019/ch4ToAirFloodedRice.py,sha256=f3orp6tDZ7f8bE9-lLZC0H_SgCKsDASAlphVRAHKJ0I,6885
225
225
  hestia_earth/models/ipcc2019/co2ToAirLimeHydrolysis.py,sha256=VBNNt9q8Mku4jOog0MjT1wGbfHqtEjtYXqhqaIITwkU,2455
226
- hestia_earth/models/ipcc2019/co2ToAirSoilCarbonStockChangeManagementChange.py,sha256=wD-Z0o35eyWLASZNfaFX8KrqRUGZvbqm2vmCWY9oqM8,25281
226
+ hestia_earth/models/ipcc2019/co2ToAirSoilCarbonStockChangeManagementChange.py,sha256=lW3OZcIO3QEifrs_g_K_aytSXvpPFN51vYVuZRGIdDc,25367
227
227
  hestia_earth/models/ipcc2019/co2ToAirUreaHydrolysis.py,sha256=ICE3r8GMoHj6WfMUxQdqdejRpOLa3cxDMyF3GvSTW0U,3700
228
228
  hestia_earth/models/ipcc2019/croppingDuration.py,sha256=_jlFrTNDOARH2_g8s4dzuaCoLHSX2BHzSQd3uuQN32Y,3173
229
229
  hestia_earth/models/ipcc2019/ligninContent.py,sha256=wp5EbCthCDAKyvPBfZULS9-uKEY58TQQ8ey1pf-juv8,7267
230
- hestia_earth/models/ipcc2019/n2OToAirCropResidueDecompositionDirect.py,sha256=wY0mpslI73lY3WqrHT44K42RCCfzlhR0LDPBwKJV40U,5630
230
+ hestia_earth/models/ipcc2019/n2OToAirCropResidueDecompositionDirect.py,sha256=c4DOH5Evmxgm4x6MmUMzi4x77D8otT-sdlD-spQVIOs,4069
231
231
  hestia_earth/models/ipcc2019/n2OToAirExcretaDirect.py,sha256=9rpp5NvFZOGRSnkfLhBoMqArdzKSd4fH-fgQEnbTT4I,1722
232
+ hestia_earth/models/ipcc2019/n2OToAirInorganicFertiliserDirect.py,sha256=NfS6EiEVSf-hpWHqO3r-1PKPuHPVb6ijTNLTbOlRCp0,4062
232
233
  hestia_earth/models/ipcc2019/n2OToAirInorganicFertiliserIndirect.py,sha256=9tCk0ZIUitj6XXfz8wvnGL6SR6L3aRhXL0FFpaXxQkE,4216
234
+ hestia_earth/models/ipcc2019/n2OToAirOrganicFertiliserDirect.py,sha256=pMyl6UtUVgPWfczgA_cdm1RUdMGi4Ln16qWrw1eesv4,4138
233
235
  hestia_earth/models/ipcc2019/n2OToAirOrganicFertiliserIndirect.py,sha256=g6vWbuooOU9Xg4V0Oqo8730UeeiwOwNPCVJMz9NoeTw,4110
234
236
  hestia_earth/models/ipcc2019/nitrogenContent.py,sha256=6fGG7diDp9zAidVH75gXz9c8uxURx0Q2COo8KrkT3I4,7191
235
237
  hestia_earth/models/ipcc2019/no3ToGroundwaterCropResidueDecomposition.py,sha256=8NOjbqJuQ-wnLz3bYmwaygSzKBdaF3N7hoELGNnO4YQ,3115
236
238
  hestia_earth/models/ipcc2019/no3ToGroundwaterExcreta.py,sha256=mJUXLGtg9EOZq9LH0KFOKvzER1ypCUucs0ZMaNYMShc,2991
237
239
  hestia_earth/models/ipcc2019/no3ToGroundwaterInorganicFertiliser.py,sha256=wTvMBthqmiKMn4nLbL4VD6_8_gGI2WGR3OYz3KK8sXs,3105
238
240
  hestia_earth/models/ipcc2019/no3ToGroundwaterOrganicFertiliser.py,sha256=zOhp6NhYUuUNU_LMMwhZBP78YC2XRWRlGnajBUX2AN8,3095
239
- hestia_earth/models/ipcc2019/organicCarbonPerHa.py,sha256=RnteIUYNO3avZi3kim55fmhiymHhR8o7YeczqQUFvNI,143083
241
+ hestia_earth/models/ipcc2019/organicCarbonPerHa.py,sha256=7FXRYTrgFFdU1Fjo4HegfipiWPbY5ChcBi3qRfc7aXE,141142
240
242
  hestia_earth/models/ipcc2019/pastureGrass.py,sha256=CpDEtdnbKd_8eaDLcflJ-dGik3t879HIoEIzuaHNmC0,23168
241
- hestia_earth/models/ipcc2019/utils.py,sha256=-hAbZx3auMGUmwsL873euKqRsTbKHTj-6feK5gLxPvs,3881
243
+ hestia_earth/models/ipcc2019/utils.py,sha256=1DfHJxVktu7vZMqj-yVjGb_59sHi7lu91GDnB5-qR4o,6504
242
244
  hestia_earth/models/ipcc2021/__init__.py,sha256=VTgGFKhwMmk_nuI1RRq0in27fHYVPBonlXlPK00K8no,409
243
245
  hestia_earth/models/ipcc2021/gwp100.py,sha256=v-DYU-11XnWI1Ns1GEiKrJqL3JafxvhTsLmuBuFcxJU,1021
244
246
  hestia_earth/models/jarvisAndPain1994/__init__.py,sha256=ercUwy29sV7oPIESj8UjsGB5lqiBCss9OZcbjxeeG8E,418
@@ -339,7 +341,7 @@ hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystems
339
341
  hestia_earth/models/linkedImpactAssessment/__init__.py,sha256=GZb-7uylALKNabUQaPjwekZHqBBeVCuL3wG2OzHeEo8,4565
340
342
  hestia_earth/models/mocking/__init__.py,sha256=kmSeOTSvurMUxw7Ajhf3G-SVPQ1NgmirMTk4TSOEicY,765
341
343
  hestia_earth/models/mocking/mock_search.py,sha256=V-ycVBTkJu7PP37Ivy_16hpKBV4aEtJb5S9DfChPNSU,2038
342
- hestia_earth/models/mocking/search-results.json,sha256=WkosNBe37s0bLCn90fyZx1R-fNFBdNFqe-qpI18cIZY,38440
344
+ hestia_earth/models/mocking/search-results.json,sha256=lqiVVybBoRY40119-ykY8FND8RfzK0WLCcBKlQzHE-8,39777
343
345
  hestia_earth/models/pooreNemecek2018/__init__.py,sha256=nPboL7ULJzL5nJD5q7q9VOZt_fxbKVm8fmn1Az5YkVY,417
344
346
  hestia_earth/models/pooreNemecek2018/aboveGroundCropResidueTotal.py,sha256=Qt-mel4dkhK6N5uUOutNOinCTFjbjtGzITaaI0LvYc4,2396
345
347
  hestia_earth/models/pooreNemecek2018/belowGroundCropResidue.py,sha256=JT0RybbvWVlo01FO8K0Yj41HrEaJT3Kj1xfayr2X-xw,2315
@@ -432,9 +434,9 @@ hestia_earth/models/schmidt2007/utils.py,sha256=pQ76IBWMwi10Wa5PjsehtdnOMw-GVgDt
432
434
  hestia_earth/models/site/__init__.py,sha256=aVuLLhq0OQVm-_MZoq4JAKMidqexUWJBg_7mmojmDzc,405
433
435
  hestia_earth/models/site/cationExchangeCapacityPerKgSoil.py,sha256=0eH4A-tXJ0hvIkiYXWxlx8TfrdbIKUGYUDk97-yQJgg,3653
434
436
  hestia_earth/models/site/flowingWater.py,sha256=0ZuSXMr3EUTY3wsy8hdfuXeZcNX-n3D45MfX3dwyaeA,1728
435
- hestia_earth/models/site/management.py,sha256=SKdSgufha4jawvN3-ybftEKxq3gayetitjLkuIvOE0E,5215
437
+ hestia_earth/models/site/management.py,sha256=3jZuDfBVoSuG9xCXYVv3yVLmzxvQvejvZ23FZTkGeO8,5402
436
438
  hestia_earth/models/site/netPrimaryProduction.py,sha256=UIIQkYd911qVzrWjxBLrC37e-RARIVgDwLdARY9BuLw,1849
437
- hestia_earth/models/site/organicCarbonPerHa.py,sha256=glyeuy0LEJbvt-xoS_r6uFWpKJ6FXqA_qXXt3eTD3Gg,8849
439
+ hestia_earth/models/site/organicCarbonPerHa.py,sha256=gcmhZavc2EWvkroKkpFM5xXowPTgyXGh1XL6lgs3CX4,14303
438
440
  hestia_earth/models/site/organicCarbonPerKgSoil.py,sha256=t--wAshiAKS-JvEKhLFRadGvgSBv5NFZ68jdyms_wh4,1945
439
441
  hestia_earth/models/site/organicCarbonPerM3Soil.py,sha256=pdv5V-ojcfhlGzPwRS9s-vEnxiHZQPZP-ESVcz2pt0g,1945
440
442
  hestia_earth/models/site/organicMatterPerKgSoil.py,sha256=fJpFVkpuCjnrBhgV0RtwKqQHvAJWWtZO9xtmnJnl8O4,1945
@@ -492,14 +494,14 @@ hestia_earth/models/utils/__init__.py,sha256=ooBopT4rd4fO_zx07tJ2-RTCaLpuQzoh-xI
492
494
  hestia_earth/models/utils/aggregated.py,sha256=sz6usleZmo_tC_hIvmGgYsX8-H0dulXmmhHK4EkA5Kg,4946
493
495
  hestia_earth/models/utils/animalProduct.py,sha256=JA-xGQiwsz-VPR_8UfI5hKa918bpQOWIok3--b_iVuM,681
494
496
  hestia_earth/models/utils/aquacultureManagement.py,sha256=3uSTSMDNNPa26NTJGZCYwByv3QZVyxj6bh2aFCoBzHk,126
495
- hestia_earth/models/utils/blank_node.py,sha256=NlL0nHc8BodcTz4NmNX3jQ2ELzy5jGXt5T-7FVy4s9M,36657
497
+ hestia_earth/models/utils/blank_node.py,sha256=5yeqm6mQs0ithjuov_U39De9HyEaZxFHLJGD6Xb0sYw,40825
496
498
  hestia_earth/models/utils/completeness.py,sha256=gRl8LkAYmanEZf9ln8IrQPXtW1Ds75rvu1ST0g5-2zI,1246
497
499
  hestia_earth/models/utils/constant.py,sha256=5H7odhRwU_LmUhYwf8c1LsdqXSYbLWkuknvtRDqUBTQ,3194
498
500
  hestia_earth/models/utils/crop.py,sha256=S8UycHpkgx_TznW3Q7pchEMlCQ623T_SqU6V5fBLBLc,1520
499
501
  hestia_earth/models/utils/cropResidue.py,sha256=_0Q35CrliJeo31xGHsPWe8A2oHxijdIsOrf3gBEqhlA,612
500
502
  hestia_earth/models/utils/cropResidueManagement.py,sha256=nIDFjf39rDD10UHSVudfDyu-EiL261g8jyrgS-2aDKw,347
501
503
  hestia_earth/models/utils/currency.py,sha256=f_ArJANb--pZq4LL49SXQ1AMX_oKroqwBXKRRQqZwsM,578
502
- hestia_earth/models/utils/cycle.py,sha256=afG83tkqf2QII09XaNBbJbXN6pHuYgeJCcf89WNws7g,16354
504
+ hestia_earth/models/utils/cycle.py,sha256=gDCGfAb_bZ9pdqZrIhUMNUJ_qT11GyY-w1zlayvoAsA,16511
503
505
  hestia_earth/models/utils/ecoClimateZone.py,sha256=NHFt-A9EiWXC6tUNIxkgOWUZOjj4I4uwJIP9ddDZegw,1112
504
506
  hestia_earth/models/utils/emission.py,sha256=W0yCUnr_FQB5f6-SF6skoDC6MzC6zglwNrKWTPYCUdo,748
505
507
  hestia_earth/models/utils/excretaManagement.py,sha256=NuWPQjFZxMVt9sYgBjcqhGWCFk_OKb3sA9Ovcff3fRQ,428
@@ -511,16 +513,16 @@ hestia_earth/models/utils/inorganicFertiliser.py,sha256=T48wQlPAAZNpmbAq-58y7wlR
511
513
  hestia_earth/models/utils/input.py,sha256=YycsAbSBfVDMu6PftDsisMFGnEp87wOj-3rrnHnOgzo,4927
512
514
  hestia_earth/models/utils/liveAnimal.py,sha256=GnajBPZw5d94raf80KtLloaOqlfqGAPwUtP9bRlGWeE,1754
513
515
  hestia_earth/models/utils/lookup.py,sha256=3tXnOaTGF91NhL9NsM0hQ05Vm_bQQG6aNgC5dEq0KdQ,6255
514
- hestia_earth/models/utils/measurement.py,sha256=BKw-bu0vlooYnXK_I1C3ie_LczK_ybRd-hzTTLCortY,7998
516
+ hestia_earth/models/utils/measurement.py,sha256=7ePiS9ZnI8AbnFqMS75m1g_UYLqK2RYPi372Ok2R7dA,8062
515
517
  hestia_earth/models/utils/pesticideAI.py,sha256=oAQTUlgXnSJrBGvIphlmVcjx2gbCHH6k5zqfuitJD_I,2789
516
518
  hestia_earth/models/utils/practice.py,sha256=tNadOzsrNlCEt801B815XaruJXzZ5yPASam7B3sWpXE,1091
517
519
  hestia_earth/models/utils/product.py,sha256=XwxrRwdREWc4N5cE0oLJbLdEucKFRKgKNDj-Kd8mZEQ,9837
518
520
  hestia_earth/models/utils/productivity.py,sha256=bUBVCZInGqHuHZvHDSYPQkjWXQxOtTjEk-1-f_BsFOo,594
519
521
  hestia_earth/models/utils/property.py,sha256=7UV9pxSX49RnUsbEqOeohzxyXXShao1XAnEYCCVKS0k,4923
520
- hestia_earth/models/utils/site.py,sha256=3mV7lwKFdTGcb4Po1fRKHjsc3gtF680tX06M8UA7qvQ,3145
522
+ hestia_earth/models/utils/site.py,sha256=4i6rjvFIzOEcsNcF1B9I8OFdVR_iFDODcWgq2_XFXfc,3155
521
523
  hestia_earth/models/utils/source.py,sha256=HhZkvQoFdy6j6FC2cwP5EbHXHFM4pif9gpnuzeDwEh4,1746
522
524
  hestia_earth/models/utils/temperature.py,sha256=ljlG4-yCgFFb6LRZweb18cZKLrr7K2mqd4E4Hz_D1f8,476
523
- hestia_earth/models/utils/term.py,sha256=IhhnBphxwli-zvKbw8SOpqDXqFurj9yvnE9nfQwkodU,16525
525
+ hestia_earth/models/utils/term.py,sha256=_DahtnHIS5wtyEXew3gpV52QjnsAWQZmyxnz4fu6mrI,17780
524
526
  hestia_earth/models/utils/transformation.py,sha256=nyT5Mz4_VgFwhkL8JoNX9kxxow0zuxzsYl3W8xOu2p0,370
525
527
  hestia_earth/models/webbEtAl2012AndSintermannEtAl2012/__init__.py,sha256=Niv7ZFMBCwThlbCKGOwA17QdkpOUDFrqrFItGNqnZAA,434
526
528
  hestia_earth/models/webbEtAl2012AndSintermannEtAl2012/nh3ToAirOrganicFertiliser.py,sha256=G2eq00XGdr1ZEZ5Ru1nBIR-sD7iM9hGYhvk8r5wL3dA,3910
@@ -570,7 +572,7 @@ tests/models/cycle/test_excretaKgN.py,sha256=xoe0PF-DwhVkihN-1BonUa7u_QNM9lr7CmG
570
572
  tests/models/cycle/test_excretaKgVs.py,sha256=A5IzG9vcjJxba_ZjBeTprjGL4hO3NkwrS0LSqgX8eOs,1093
571
573
  tests/models/cycle/test_feedConversionRatio.py,sha256=AikefswCdd0_YS800_v5uh9rdP8LsWdXfTXjY24C5e0,1759
572
574
  tests/models/cycle/test_inorganicFertiliser.py,sha256=c-JDYC0qDK4JWlYDaGX53AcKfetz_YifSfdhy-v-WMo,642
573
- tests/models/cycle/test_irrigated.py,sha256=B90RztnBWZjCIKJO7267MIzzT7mXSsfQyzWDI1YxfJo,2136
575
+ tests/models/cycle/test_irrigatedTypeUnspecified.py,sha256=9YGwpDO_RHMaldvjJZ0xdrdfUzYDnLPt6nMJ2eRXSTI,2151
574
576
  tests/models/cycle/test_liveAnimal.py,sha256=7fRPgEnIwcir-tYwUNnr6gc2e5_vnZi-t8EuuiPioeM,2139
575
577
  tests/models/cycle/test_milkYield.py,sha256=7e5JJzLkc47OnQf3xni1Nkyq7N4xi1RglnE8caE9TfY,1778
576
578
  tests/models/cycle/test_pastureGrass.py,sha256=hNRjBLYXGybzHPMfBOCgcRjGkDBmW0k_G6tn9TLrycY,1025
@@ -645,7 +647,7 @@ tests/models/faostat2018/product/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
645
647
  tests/models/faostat2018/product/test_price.py,sha256=GolnQfcsGRmpyr9_A3_c-ySaywHHlZeY4sHUM39JSFA,3860
646
648
  tests/models/geospatialDatabase/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
647
649
  tests/models/geospatialDatabase/test_aware.py,sha256=tbBBvXrOqdO0cMPJTa02UfhlwfosH8iNoJLzZNFs1NU,857
648
- tests/models/geospatialDatabase/test_clayContent.py,sha256=aYBCmGom8WInRCLmtgy_diNAJE65-irTyUQS4FUxvSg,1013
650
+ tests/models/geospatialDatabase/test_clayContent.py,sha256=KdkmsJMB1FsJXZCggcGWh3LlDKDDlwvcmSLEhZpdM_g,1177
649
651
  tests/models/geospatialDatabase/test_croppingIntensity.py,sha256=e2opH6R2BIAEg5_Qm80UGJfzpDle0vjN5wvVBNmXdDc,943
650
652
  tests/models/geospatialDatabase/test_drainageClass.py,sha256=X75v6f8N5i40grULUNMvNOu_UC27VoahuW6BaQb19LY,1015
651
653
  tests/models/geospatialDatabase/test_ecoClimateZone.py,sha256=ad0BBOhjl6uMUP_-QhAHEG3kTo7x3EaXuEahbbnx10E,1119
@@ -661,7 +663,7 @@ tests/models/geospatialDatabase/test_potentialEvapotranspirationLongTermAnnualMe
661
663
  tests/models/geospatialDatabase/test_precipitationAnnual.py,sha256=OhN7dbLZUG8ofvV7C56RKE_hGFXGtOuzXYz3EwFcQyg,744
662
664
  tests/models/geospatialDatabase/test_precipitationLongTermAnnualMean.py,sha256=wGGKXGemg3OEgDRRXy52oFf5p8jU57iraTgQMWDzusQ,1033
663
665
  tests/models/geospatialDatabase/test_region.py,sha256=5q3q5TK7yzvoZI2gknf-TPNcmDqVkMo0D3-KY401J2k,882
664
- tests/models/geospatialDatabase/test_sandContent.py,sha256=56lwV8fmL30rU2pkir_3DVb9OLS_gVuy9tRVKm14O0M,1013
666
+ tests/models/geospatialDatabase/test_sandContent.py,sha256=hvV0Z51hKPLoSBNsjLJ18upGSt3FUHYbp2ofx7fBUvU,1177
665
667
  tests/models/geospatialDatabase/test_siltContent.py,sha256=udJDh2gidlkQVkotxWjCCsXRkbvAQxfpFAjEj5dtNJE,1124
666
668
  tests/models/geospatialDatabase/test_slope.py,sha256=OQBjH1K1VDgbZ5B9hSy-oPzPnaqYU8Bkb2Cvd-KMqa0,1007
667
669
  tests/models/geospatialDatabase/test_slopeLength.py,sha256=56iCm-qn41NpeVHU9dKtAUIrbuEYGbQMOa3sg5dJ5X0,1013
@@ -743,14 +745,16 @@ tests/models/ipcc2019/test_croppingDuration.py,sha256=gLRXeR6Tqa7ciD9KTRfsIflSeI
743
745
  tests/models/ipcc2019/test_ligninContent.py,sha256=eIKEN__ab-0R52EhlhPSBiHnmTl6xOf1XbI33O-W9A4,4146
744
746
  tests/models/ipcc2019/test_n2OToAirCropResidueDecompositionDirect.py,sha256=lVfSKpVszGK42pzo2FefXNZRmXbqOt25IBcnxvhC_X0,2418
745
747
  tests/models/ipcc2019/test_n2OToAirExcretaDirect.py,sha256=JYvBK4edcqfHrMPwgBFXF6km51ew9RISUcfQ_RNf2RY,1216
748
+ tests/models/ipcc2019/test_n2OToAirInorganicFertiliserDirect.py,sha256=ffk-aom1BqyEmqm-JESWX5MErrAVAgVuH1gjW32U5Pk,2407
746
749
  tests/models/ipcc2019/test_n2OToAirInorganicFertiliserIndirect.py,sha256=X61AE9Eb0Lqwy4AkfKKaHKU-p4C5JZIo326t8BT6ALs,1613
750
+ tests/models/ipcc2019/test_n2OToAirOrganicFertiliserDirect.py,sha256=XQpzdEFT7qSw6KKRYEZ6Cmzkc_xLyG98FHH1PSfOUo0,2403
747
751
  tests/models/ipcc2019/test_n2OToAirOrganicFertiliserIndirect.py,sha256=cPXdknWmXJig9i_AR19oX4g3GjTcEo8455DsD2w8M10,1609
748
752
  tests/models/ipcc2019/test_nitrogenContent.py,sha256=rKl_05PCC0OSsAhG0cHJOqnt9LsCaFnRpJorkm1TShA,3704
749
753
  tests/models/ipcc2019/test_no3ToGroundwaterCropResidueDecomposition.py,sha256=4__3HDUDWt5KjQGcXEFXHBgP_jT0rxvIzpBLH_mP9WE,1729
750
754
  tests/models/ipcc2019/test_no3ToGroundwaterExcreta.py,sha256=Z-pCBQvlUf0ttmCERgezW-6e3KlX45YEVccOwthf5lU,1588
751
755
  tests/models/ipcc2019/test_no3ToGroundwaterInorganicFertiliser.py,sha256=e7REnQ9r9a8xroq5aPp0NIzmkad_6MyTuceRTYoKdkE,1613
752
756
  tests/models/ipcc2019/test_no3ToGroundwaterOrganicFertiliser.py,sha256=e1ZViD12qB3bLdH3TJw3GbBP8iqMen-UJbcFkytb3VQ,1609
753
- tests/models/ipcc2019/test_organicCarbonPerHa.py,sha256=PH6HwKvgTGXThQqKjSfSEr9dUYi2t_CW7Uan0JKwj8I,43589
757
+ tests/models/ipcc2019/test_organicCarbonPerHa.py,sha256=UtiFAYJSqIz8_zb0H4qFRfh-6c-m422THoV3KfHHXpQ,20374
754
758
  tests/models/ipcc2019/test_pastureGrass.py,sha256=pE4PWdR541v4xWDYihP7Dou8V1iqg5GwD5_rjGRzrds,2292
755
759
  tests/models/ipcc2021/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
756
760
  tests/models/ipcc2021/test_gwp100.py,sha256=JRklKMSg-OXopb9ZufGgl94deuMuJSsfNXRZDBtOZrE,1119
@@ -941,7 +945,7 @@ tests/models/site/test_cationExchangeCapacityPerKgSoil.py,sha256=tNMhN998vcjQ15I
941
945
  tests/models/site/test_flowingWater.py,sha256=t_rxvdlmUVDsFBoDF20_zDM-0iiLKkNCV7knO9l1T7o,1370
942
946
  tests/models/site/test_management.py,sha256=wwXuaIaGz5kh65PPXqp9WvvlKYSCNFZQoHJMU-mKJ-4,3779
943
947
  tests/models/site/test_netPrimaryProduction.py,sha256=JCxG0MODbKVvl3hOqmKzh4FjHYn3Xs9KsVod6LvKQII,1108
944
- tests/models/site/test_organicCarbonPerHa.py,sha256=2UI5UPgIWxpxlv8keRJ43xHkZdyuF4TwyQfq_98tuD8,2126
948
+ tests/models/site/test_organicCarbonPerHa.py,sha256=6Qtc0Xmveir7MmNF4Ekv5YkV92TNp8GfDnURPVg05-4,3471
945
949
  tests/models/site/test_organicCarbonPerKgSoil.py,sha256=0M-NMg_T3UXzGT_VlKOKhSxg4cZ0_zhd3FRgY5Hpj6o,1087
946
950
  tests/models/site/test_organicCarbonPerM3Soil.py,sha256=_teZwZKVM7b6YIokWJdqkYbIlSDY8eeOX4vZo7-0Mdo,1087
947
951
  tests/models/site/test_organicMatterPerKgSoil.py,sha256=ustKqQcv4GWa-0SdHvLlxJBDlY2zU9kdBCQoUIKO2BI,1087
@@ -993,7 +997,7 @@ tests/models/transformation/product/test_excreta.py,sha256=Q9OQpk8qVPv3alIz2i5XQ
993
997
  tests/models/usetoxV2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
994
998
  tests/models/usetoxV2/test_freshwaterEcotoxicityPotentialCtue.py,sha256=eq7Gcmfya9g0eOKKkuBhz8vq7xi_CmZ_LTSxueBwZt4,835
995
999
  tests/models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
996
- tests/models/utils/test_blank_node.py,sha256=DxsDOBjFTogvm6WyTkaurG0XRFX9HrVg_VTl8WSh1yw,29554
1000
+ tests/models/utils/test_blank_node.py,sha256=xlyddD7moTRvjiHq2Z9uKJODV05WW8YZkliUOCHy4b8,31488
997
1001
  tests/models/utils/test_cropResidueManagement.py,sha256=RQt8lexeJzCyxZceIutgDpw7BpcqmjsUB0C0yZC2QpY,930
998
1002
  tests/models/utils/test_currency.py,sha256=BPsojPsY9QW2aj8vgbjkPQXU8GU6wDwwtPZ3HdC4KTU,277
999
1003
  tests/models/utils/test_cycle.py,sha256=evTHH73ftNVhv5vHlYE2973msKE4pSCd3D0GfX1ZPUA,465
@@ -1010,11 +1014,11 @@ tests/models/utils/test_product.py,sha256=kwvgAeeEoRgkeStX0zQcFd-4DJhoUhX6Apaks0
1010
1014
  tests/models/utils/test_property.py,sha256=t2npw86IK7C6G4ypiPtanFi0db4PB7G5VBR1GjRGl34,618
1011
1015
  tests/models/utils/test_site.py,sha256=cSKrkLeerymMLZAwCnbQce38NwgxXojQHAVm9DPUTpg,1181
1012
1016
  tests/models/utils/test_source.py,sha256=mv3vHZV5cjpoLA2I1109-YUkuzAiuhbRSnv_76_f0CA,631
1013
- tests/models/utils/test_term.py,sha256=bzFKzd6vYxKxcITFtvR_3lDxRUc20hWXdZd493L2fTs,3265
1017
+ tests/models/utils/test_term.py,sha256=JJmzyHnhVGeQ7tG-T6DjE7CoIJPH0guH-y2kjGeZiJY,3756
1014
1018
  tests/models/webbEtAl2012AndSintermannEtAl2012/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1015
1019
  tests/models/webbEtAl2012AndSintermannEtAl2012/test_nh3ToAirOrganicFertiliser.py,sha256=qi2FNXS5Af2WDtm7nq_FsprH3BfCF0XxnE0XHmC4aIY,2244
1016
- hestia_earth_models-0.58.0.dist-info/LICENSE,sha256=EFSZhfUdZCTsCIYdHzTGewMKfRfp7X9t1s2aaKxm8O0,1154
1017
- hestia_earth_models-0.58.0.dist-info/METADATA,sha256=2Pu8vdQ8Tb0OIc-BHHrA3rzSf-yLPYD0YrBIWuhr1ng,3200
1018
- hestia_earth_models-0.58.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1019
- hestia_earth_models-0.58.0.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
1020
- hestia_earth_models-0.58.0.dist-info/RECORD,,
1020
+ hestia_earth_models-0.59.1.dist-info/LICENSE,sha256=EFSZhfUdZCTsCIYdHzTGewMKfRfp7X9t1s2aaKxm8O0,1154
1021
+ hestia_earth_models-0.59.1.dist-info/METADATA,sha256=OmSflUlcdw-cSbja7uMHn26Do72YujIz0dol2DND0Ek,3134
1022
+ hestia_earth_models-0.59.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1023
+ hestia_earth_models-0.59.1.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
1024
+ hestia_earth_models-0.59.1.dist-info/RECORD,,
@@ -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.irrigated import MODEL, TERM_ID, run
5
+ from hestia_earth.models.cycle.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}"
@@ -11,11 +11,17 @@ fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
11
11
  @patch(f"{class_path}.should_download", return_value=True)
12
12
  @patch(f"{class_path}.has_geospatial_data")
13
13
  def test_should_run(mock_has_geospatial_data, *args):
14
- mock_has_geospatial_data.return_value = True
15
- assert _should_run({}) is True
14
+ site = {}
16
15
 
17
16
  mock_has_geospatial_data.return_value = False
18
- assert not _should_run({})
17
+ assert not _should_run(site)
18
+
19
+ mock_has_geospatial_data.return_value = True
20
+ assert _should_run(site) is True
21
+
22
+ # with other texture measurements => not run
23
+ site['measurements'] = [{'term': {'@id': 'clayContent'}}]
24
+ assert not _should_run(site)
19
25
 
20
26
 
21
27
  @patch(f"{class_path}.get_source", return_value={})
@@ -11,11 +11,17 @@ fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
11
11
  @patch(f"{class_path}.should_download", return_value=True)
12
12
  @patch(f"{class_path}.has_geospatial_data")
13
13
  def test_should_run(mock_has_geospatial_data, *args):
14
- mock_has_geospatial_data.return_value = True
15
- assert _should_run({}) is True
14
+ site = {}
16
15
 
17
16
  mock_has_geospatial_data.return_value = False
18
- assert not _should_run({})
17
+ assert not _should_run(site)
18
+
19
+ mock_has_geospatial_data.return_value = True
20
+ assert _should_run(site) is True
21
+
22
+ # with other texture measurements => not run
23
+ site['measurements'] = [{'term': {'@id': 'clayContent'}}]
24
+ assert not _should_run(site)
19
25
 
20
26
 
21
27
  @patch(f"{class_path}.get_source", return_value={})
@@ -0,0 +1,74 @@
1
+ from unittest.mock import patch
2
+ import json
3
+ from tests.utils import fixtures_path, fake_new_emission
4
+
5
+ from hestia_earth.models.ipcc2019.n2OToAirInorganicFertiliserDirect import MODEL, TERM_ID, run, _should_run
6
+
7
+ class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
+ fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
9
+
10
+
11
+ @patch(f"{class_path}._is_term_type_complete", return_value=False)
12
+ @patch(f"{class_path}.get_inorganic_fertiliser_N_total", return_value=0)
13
+ def test_should_run(mock_N_total, mock_complete):
14
+ # no N => no run
15
+ should_run, *args = _should_run({})
16
+ assert not should_run
17
+
18
+ # with N => no run
19
+ mock_N_total.return_value = 10
20
+ should_run, *args = _should_run({})
21
+ assert not should_run
22
+
23
+ # is complete => run
24
+ mock_complete.return_value = True
25
+ should_run, *args = _should_run({})
26
+ assert should_run is True
27
+
28
+
29
+ @patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
30
+ def test_run(*args):
31
+ with open(f"{fixtures_folder}/cycle.jsonld", encoding='utf-8') as f:
32
+ cycle = json.load(f)
33
+
34
+ with open(f"{fixtures_folder}/result.jsonld", encoding='utf-8') as f:
35
+ expected = json.load(f)
36
+
37
+ value = run(cycle)
38
+ assert value == expected
39
+
40
+
41
+ @patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
42
+ def test_run_wet(*args):
43
+ with open(f"{fixtures_folder}/ecoClimateZone-wet/cycle.jsonld", encoding='utf-8') as f:
44
+ cycle = json.load(f)
45
+
46
+ with open(f"{fixtures_folder}/ecoClimateZone-wet/result.jsonld", encoding='utf-8') as f:
47
+ expected = json.load(f)
48
+
49
+ value = run(cycle)
50
+ assert value == expected
51
+
52
+
53
+ @patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
54
+ def test_run_dry(*args):
55
+ with open(f"{fixtures_folder}/ecoClimateZone-dry/cycle.jsonld", encoding='utf-8') as f:
56
+ cycle = json.load(f)
57
+
58
+ with open(f"{fixtures_folder}/ecoClimateZone-dry/result.jsonld", encoding='utf-8') as f:
59
+ expected = json.load(f)
60
+
61
+ value = run(cycle)
62
+ assert value == expected
63
+
64
+
65
+ @patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
66
+ def test_run_flooded_rice(*args):
67
+ with open(f"{fixtures_folder}/with-flooded-rice/cycle.jsonld", encoding='utf-8') as f:
68
+ cycle = json.load(f)
69
+
70
+ with open(f"{fixtures_folder}/with-flooded-rice/result.jsonld", encoding='utf-8') as f:
71
+ expected = json.load(f)
72
+
73
+ value = run(cycle)
74
+ assert value == expected
@@ -0,0 +1,74 @@
1
+ from unittest.mock import patch
2
+ import json
3
+ from tests.utils import fixtures_path, fake_new_emission
4
+
5
+ from hestia_earth.models.ipcc2019.n2OToAirOrganicFertiliserDirect import MODEL, TERM_ID, run, _should_run
6
+
7
+ class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
+ fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
9
+
10
+
11
+ @patch(f"{class_path}._is_term_type_complete", return_value=False)
12
+ @patch(f"{class_path}.get_organic_fertiliser_N_total", return_value=0)
13
+ def test_should_run(mock_N_total, mock_complete):
14
+ # no N => no run
15
+ should_run, *args = _should_run({})
16
+ assert not should_run
17
+
18
+ # with N => no run
19
+ mock_N_total.return_value = 10
20
+ should_run, *args = _should_run({})
21
+ assert not should_run
22
+
23
+ # is complete => run
24
+ mock_complete.return_value = True
25
+ should_run, *args = _should_run({})
26
+ assert should_run is True
27
+
28
+
29
+ @patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
30
+ def test_run(*args):
31
+ with open(f"{fixtures_folder}/cycle.jsonld", encoding='utf-8') as f:
32
+ cycle = json.load(f)
33
+
34
+ with open(f"{fixtures_folder}/result.jsonld", encoding='utf-8') as f:
35
+ expected = json.load(f)
36
+
37
+ value = run(cycle)
38
+ assert value == expected
39
+
40
+
41
+ @patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
42
+ def test_run_wet(*args):
43
+ with open(f"{fixtures_folder}/ecoClimateZone-wet/cycle.jsonld", encoding='utf-8') as f:
44
+ cycle = json.load(f)
45
+
46
+ with open(f"{fixtures_folder}/ecoClimateZone-wet/result.jsonld", encoding='utf-8') as f:
47
+ expected = json.load(f)
48
+
49
+ value = run(cycle)
50
+ assert value == expected
51
+
52
+
53
+ @patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
54
+ def test_run_dry(*args):
55
+ with open(f"{fixtures_folder}/ecoClimateZone-dry/cycle.jsonld", encoding='utf-8') as f:
56
+ cycle = json.load(f)
57
+
58
+ with open(f"{fixtures_folder}/ecoClimateZone-dry/result.jsonld", encoding='utf-8') as f:
59
+ expected = json.load(f)
60
+
61
+ value = run(cycle)
62
+ assert value == expected
63
+
64
+
65
+ @patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
66
+ def test_run_flooded_rice(*args):
67
+ with open(f"{fixtures_folder}/with-flooded-rice/cycle.jsonld", encoding='utf-8') as f:
68
+ cycle = json.load(f)
69
+
70
+ with open(f"{fixtures_folder}/with-flooded-rice/result.jsonld", encoding='utf-8') as f:
71
+ expected = json.load(f)
72
+
73
+ value = run(cycle)
74
+ assert value == expected