hestia-earth-models 0.59.3__py3-none-any.whl → 0.59.5__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/cycle/liveAnimal.py +3 -0
- hestia_earth/models/cycle/milkYield.py +1 -1
- hestia_earth/models/cycle/utils.py +1 -1
- hestia_earth/models/geospatialDatabase/potentialEvapotranspirationLongTermAnnualMean.py +2 -2
- hestia_earth/models/geospatialDatabase/potentialEvapotranspirationMonthly.py +99 -0
- hestia_earth/models/geospatialDatabase/precipitationMonthly.py +100 -0
- hestia_earth/models/geospatialDatabase/temperatureAnnual.py +2 -6
- hestia_earth/models/geospatialDatabase/temperatureLongTermAnnualMean.py +2 -3
- hestia_earth/models/geospatialDatabase/temperatureMonthly.py +98 -0
- hestia_earth/models/geospatialDatabase/utils.py +13 -1
- hestia_earth/models/ipcc2019/organicCarbonPerHa.py +72 -135
- hestia_earth/models/linkedImpactAssessment/__init__.py +78 -43
- hestia_earth/models/mocking/search-results.json +8 -47
- hestia_earth/models/schmidt2007/n2OToAirWasteTreatmentDirect.py +58 -0
- hestia_earth/models/schmidt2007/nh3ToAirWasteTreatment.py +58 -0
- hestia_earth/models/site/management.py +106 -13
- hestia_earth/models/site/pre_checks/cache_geospatialDatabase.py +27 -7
- hestia_earth/models/site/soilMeasurement.py +9 -9
- hestia_earth/models/site/utils.py +2 -6
- hestia_earth/models/utils/__init__.py +9 -0
- hestia_earth/models/utils/blank_node.py +3 -3
- hestia_earth/models/utils/site.py +8 -5
- hestia_earth/models/utils/term.py +0 -23
- hestia_earth/models/version.py +1 -1
- {hestia_earth_models-0.59.3.dist-info → hestia_earth_models-0.59.5.dist-info}/METADATA +2 -2
- {hestia_earth_models-0.59.3.dist-info → hestia_earth_models-0.59.5.dist-info}/RECORD +39 -29
- tests/models/geospatialDatabase/test_potentialEvapotranspirationMonthly.py +20 -0
- tests/models/geospatialDatabase/test_precipitationMonthly.py +20 -0
- tests/models/geospatialDatabase/test_temperatureMonthly.py +20 -0
- tests/models/ipcc2019/test_organicCarbonPerHa.py +8 -39
- tests/models/schmidt2007/test_n2OToAirWasteTreatmentDirect.py +45 -0
- tests/models/schmidt2007/test_nh3ToAirWasteTreatment.py +45 -0
- tests/models/site/test_management.py +37 -16
- tests/models/site/test_soilMeasurement.py +40 -21
- tests/models/utils/test_site.py +1 -1
- tests/models/utils/test_term.py +1 -8
- {hestia_earth_models-0.59.3.dist-info → hestia_earth_models-0.59.5.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.59.3.dist-info → hestia_earth_models-0.59.5.dist-info}/WHEEL +0 -0
- {hestia_earth_models-0.59.3.dist-info → hestia_earth_models-0.59.5.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=
|
|
6
|
+
hestia_earth/models/version.py,sha256=0NY7cXt4Am8fMi02-LZZcS2D6qeEySfNIWf5ny01kfY,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
|
|
@@ -45,8 +45,8 @@ hestia_earth/models/cycle/excretaKgN.py,sha256=mgJTneQIYJ9Su-rTK5ppb_k3YhICFNWsf
|
|
|
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
47
|
hestia_earth/models/cycle/irrigatedTypeUnspecified.py,sha256=KlIa5eDvT47Twz6Q1kpw0rMlRjCK25CExaW58DEvc9w,2125
|
|
48
|
-
hestia_earth/models/cycle/liveAnimal.py,sha256=
|
|
49
|
-
hestia_earth/models/cycle/milkYield.py,sha256=
|
|
48
|
+
hestia_earth/models/cycle/liveAnimal.py,sha256=LWAMnNKRoLDdChrGApVIN-Ns7em0Lspz5UtLbf7PPLY,3988
|
|
49
|
+
hestia_earth/models/cycle/milkYield.py,sha256=UNNlSJE_jHLp28oDPCOxEtq2YycY_JADuaPfdz0be6Y,5724
|
|
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
|
|
@@ -56,7 +56,7 @@ hestia_earth/models/cycle/residueLeftOnField.py,sha256=qYxKGAdUORN7Vjqj7AZC2VGV_
|
|
|
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
|
|
58
58
|
hestia_earth/models/cycle/transformation.py,sha256=06KTfVubh2I47dfnG9Iv6AbuUBbURM8BAVOkRu7XmHw,1255
|
|
59
|
-
hestia_earth/models/cycle/utils.py,sha256=
|
|
59
|
+
hestia_earth/models/cycle/utils.py,sha256=ZcVwvRwVNK48jZfnhrHl2ai4a96YzcmRgO-eQXwQNjo,1408
|
|
60
60
|
hestia_earth/models/cycle/animal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
61
|
hestia_earth/models/cycle/animal/properties.py,sha256=OGjRl79w-h439jTkjA8b4V61fMuo0McoUs3JrgK-0Zc,596
|
|
62
62
|
hestia_earth/models/cycle/animal/input/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -142,20 +142,23 @@ hestia_earth/models/geospatialDatabase/longFallowRatio.py,sha256=VnTW2Y7qpoxlEar
|
|
|
142
142
|
hestia_earth/models/geospatialDatabase/nutrientLossToAquaticEnvironment.py,sha256=uEsoYJ1mzgUo6fQhUrcJ-ATcFw1j9oEgqMXKbQuFRxQ,1973
|
|
143
143
|
hestia_earth/models/geospatialDatabase/organicCarbonPerKgSoil.py,sha256=gt3-crrUN0HPtIKY7Hf9dUteCXkegSICVjO-jufDqas,2196
|
|
144
144
|
hestia_earth/models/geospatialDatabase/potentialEvapotranspirationAnnual.py,sha256=UlCBvAD-6H-4sdryfPuX1YDlOsGPOI8T9y0q4O0Tau8,2544
|
|
145
|
-
hestia_earth/models/geospatialDatabase/potentialEvapotranspirationLongTermAnnualMean.py,sha256=
|
|
145
|
+
hestia_earth/models/geospatialDatabase/potentialEvapotranspirationLongTermAnnualMean.py,sha256=YywD9wCkGFF1q60LocXNvLr-tQ2_9km2PrVnXRgN83E,2125
|
|
146
|
+
hestia_earth/models/geospatialDatabase/potentialEvapotranspirationMonthly.py,sha256=3VmoobXfTVP77vyBrxkplTToe3RnLeTrNStA2r6sdzY,3357
|
|
146
147
|
hestia_earth/models/geospatialDatabase/precipitationAnnual.py,sha256=8_lMKVUPClnp7tetHrsoUY2ZGG2J7c-cXqJD8rznp0Q,2803
|
|
147
148
|
hestia_earth/models/geospatialDatabase/precipitationLongTermAnnualMean.py,sha256=fS5knfil5f2QP8-gxFdXuoGTxXpzoJQZ9h4UjWIWjCA,2376
|
|
149
|
+
hestia_earth/models/geospatialDatabase/precipitationMonthly.py,sha256=D2HNR7cIP2Dd47uxmXp6p_wPhmxR6i-4trX83WpH3z4,3407
|
|
148
150
|
hestia_earth/models/geospatialDatabase/region.py,sha256=rdywdsI4OglcO05tih0UQx0qbnm8BAn7mP-x74iV03c,1462
|
|
149
151
|
hestia_earth/models/geospatialDatabase/sandContent.py,sha256=BZUn2z4BN1HgCGZ2Xsifca2CRTaZ4gdcaZ8A1_UoPQM,2704
|
|
150
152
|
hestia_earth/models/geospatialDatabase/siltContent.py,sha256=0GnBZHjqS_Py4730s4LqzQ_GikBSxFyUGYG4dEiXiGs,2162
|
|
151
153
|
hestia_earth/models/geospatialDatabase/slope.py,sha256=g1SpuYks60injv2w-CMjESNfu8KM1JsiYnRT9XZfSuY,1859
|
|
152
154
|
hestia_earth/models/geospatialDatabase/slopeLength.py,sha256=6pGr1qR0EiiUKkeflpYut7eI6UsnXAzHDoHhAzXKFJk,1864
|
|
153
155
|
hestia_earth/models/geospatialDatabase/soilPh.py,sha256=egvtnVPCL0El2J9oVLAFxl6HoZQsK-RrNobA0LMAtOY,2109
|
|
154
|
-
hestia_earth/models/geospatialDatabase/temperatureAnnual.py,sha256=
|
|
155
|
-
hestia_earth/models/geospatialDatabase/temperatureLongTermAnnualMean.py,sha256=
|
|
156
|
+
hestia_earth/models/geospatialDatabase/temperatureAnnual.py,sha256=UCTr8zvz9AH13nd-ynqjYZ1gABn8cw5PHXS29SzbhyE,2712
|
|
157
|
+
hestia_earth/models/geospatialDatabase/temperatureLongTermAnnualMean.py,sha256=j5vsDYZeEQYqgOzBGepD5oGFtRvjhk__uZ7ux37gapQ,2229
|
|
158
|
+
hestia_earth/models/geospatialDatabase/temperatureMonthly.py,sha256=hJjbnTgefBtRwL5IJHaaPFtRvzTDv7l5nDI8vdadMCg,3353
|
|
156
159
|
hestia_earth/models/geospatialDatabase/totalNitrogenPerKgSoil.py,sha256=kjP3ue-tlzMQNx2hBM56_CBBRa8Pcosmd2BPgyiNVW4,2081
|
|
157
160
|
hestia_earth/models/geospatialDatabase/totalPhosphorusPerKgSoil.py,sha256=5oasLMYgfnPwSse0D8EEe_pV57AMusac853BgVSUh5E,2070
|
|
158
|
-
hestia_earth/models/geospatialDatabase/utils.py,sha256=
|
|
161
|
+
hestia_earth/models/geospatialDatabase/utils.py,sha256=hKzR6wlVtkSyvCGcUKjI1YdvRk9mrNfvdmae4yHGLrM,6229
|
|
159
162
|
hestia_earth/models/geospatialDatabase/waterDepth.py,sha256=Xy2UxwAJrgdOkcw59NetEHMt5vgRYE6qg4fgXb1ptlU,1643
|
|
160
163
|
hestia_earth/models/globalCropWaterModel2008/__init__.py,sha256=vQxexzFCl2Uv2RiIJfcppkRi9RgzBsJ68yhVDK4GvAU,425
|
|
161
164
|
hestia_earth/models/globalCropWaterModel2008/rootingDepth.py,sha256=pajS-6UWxqIqnzW0IjkgNm-2Vl3bMor2UZOQtQQERuc,4096
|
|
@@ -245,7 +248,7 @@ hestia_earth/models/ipcc2019/no3ToGroundwaterInorganicFertiliser.py,sha256=wTvMB
|
|
|
245
248
|
hestia_earth/models/ipcc2019/no3ToGroundwaterOrganicFertiliser.py,sha256=zOhp6NhYUuUNU_LMMwhZBP78YC2XRWRlGnajBUX2AN8,3095
|
|
246
249
|
hestia_earth/models/ipcc2019/noxToAirInorganicFertiliser.py,sha256=D-UyzY55mOiIcXRzEtvPY-r1bDFgb9YqA08SmHsQeNA,4226
|
|
247
250
|
hestia_earth/models/ipcc2019/noxToAirOrganicFertiliser.py,sha256=SVgVNp76bIv9oUjrZZuI6xYLo4Gw2DRU5tbp14gydOE,3911
|
|
248
|
-
hestia_earth/models/ipcc2019/organicCarbonPerHa.py,sha256=
|
|
251
|
+
hestia_earth/models/ipcc2019/organicCarbonPerHa.py,sha256=_13qQlsaAljIKw4KbrGXEMnc0Do3N3TiKypBToGj52c,140870
|
|
249
252
|
hestia_earth/models/ipcc2019/pastureGrass.py,sha256=CpDEtdnbKd_8eaDLcflJ-dGik3t879HIoEIzuaHNmC0,23168
|
|
250
253
|
hestia_earth/models/ipcc2019/utils.py,sha256=MSDMu15D9DnilFUgi4_6jYXC0FaKso3OODauGTMB6hs,6229
|
|
251
254
|
hestia_earth/models/ipcc2021/__init__.py,sha256=VTgGFKhwMmk_nuI1RRq0in27fHYVPBonlXlPK00K8no,409
|
|
@@ -345,10 +348,10 @@ hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystems
|
|
|
345
348
|
hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py,sha256=t8DTybm_3DIlvtpSJP-KBWsgp0SKe4d_pw2Y0BKGxMg,1175
|
|
346
349
|
hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialAcidification.py,sha256=U74max756dWZLVbLNUAHcHeUiHADLxuvRbvpJc4eSLc,1182
|
|
347
350
|
hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py,sha256=-8e8-lt0yByEcVbk7bTF4-z3t51w5iQKVdZ5bgYsyJg,1063
|
|
348
|
-
hestia_earth/models/linkedImpactAssessment/__init__.py,sha256=
|
|
351
|
+
hestia_earth/models/linkedImpactAssessment/__init__.py,sha256=fSO3M1dmQD6fuEZkzJycscjUf7HtjQyoV8u2W7ItvSk,6236
|
|
349
352
|
hestia_earth/models/mocking/__init__.py,sha256=kmSeOTSvurMUxw7Ajhf3G-SVPQ1NgmirMTk4TSOEicY,765
|
|
350
353
|
hestia_earth/models/mocking/mock_search.py,sha256=V-ycVBTkJu7PP37Ivy_16hpKBV4aEtJb5S9DfChPNSU,2038
|
|
351
|
-
hestia_earth/models/mocking/search-results.json,sha256=
|
|
354
|
+
hestia_earth/models/mocking/search-results.json,sha256=FIdOQLItwJDbNc79gILosT0PVCvFBueaL2XRMYVDHHw,39085
|
|
352
355
|
hestia_earth/models/pooreNemecek2018/__init__.py,sha256=nPboL7ULJzL5nJD5q7q9VOZt_fxbKVm8fmn1Az5YkVY,417
|
|
353
356
|
hestia_earth/models/pooreNemecek2018/aboveGroundCropResidueTotal.py,sha256=Qt-mel4dkhK6N5uUOutNOinCTFjbjtGzITaaI0LvYc4,2396
|
|
354
357
|
hestia_earth/models/pooreNemecek2018/belowGroundCropResidue.py,sha256=JT0RybbvWVlo01FO8K0Yj41HrEaJT3Kj1xfayr2X-xw,2315
|
|
@@ -437,11 +440,13 @@ hestia_earth/models/schererPfister2015/pToSurfaceWaterSoilFlux.py,sha256=CuqIsy3
|
|
|
437
440
|
hestia_earth/models/schererPfister2015/utils.py,sha256=LEvz9guqto0kuF5rXcQjgYsD3CvEmORvJQqRA1f7uMI,3130
|
|
438
441
|
hestia_earth/models/schmidt2007/__init__.py,sha256=xheSN6LOGXpWx7Hnv83onhe60Xk1_jk1PJg1nH_aZOQ,412
|
|
439
442
|
hestia_earth/models/schmidt2007/ch4ToAirWasteTreatment.py,sha256=-N5uLvVHlA2djOs_lwR_8RmbeCfkPw5p3vmbqG2kzkI,1474
|
|
443
|
+
hestia_earth/models/schmidt2007/n2OToAirWasteTreatmentDirect.py,sha256=3i7tgar2DODXzug36HBAbbx94ybst15Efode7AzvVEs,1480
|
|
444
|
+
hestia_earth/models/schmidt2007/nh3ToAirWasteTreatment.py,sha256=yGrw7LHTrgRU_LyUsdl96TO6omEZju7JaBbW_A8ufX4,1474
|
|
440
445
|
hestia_earth/models/schmidt2007/utils.py,sha256=pQ76IBWMwi10Wa5PjsehtdnOMw-GVgDtB4nLGYKT-Ic,812
|
|
441
446
|
hestia_earth/models/site/__init__.py,sha256=aVuLLhq0OQVm-_MZoq4JAKMidqexUWJBg_7mmojmDzc,405
|
|
442
447
|
hestia_earth/models/site/cationExchangeCapacityPerKgSoil.py,sha256=0eH4A-tXJ0hvIkiYXWxlx8TfrdbIKUGYUDk97-yQJgg,3653
|
|
443
448
|
hestia_earth/models/site/flowingWater.py,sha256=0ZuSXMr3EUTY3wsy8hdfuXeZcNX-n3D45MfX3dwyaeA,1728
|
|
444
|
-
hestia_earth/models/site/management.py,sha256=
|
|
449
|
+
hestia_earth/models/site/management.py,sha256=FSSOiisV87nmqQ32ww3ElwspyDS8JvkxOXhUEsUj-gw,8555
|
|
445
450
|
hestia_earth/models/site/netPrimaryProduction.py,sha256=UIIQkYd911qVzrWjxBLrC37e-RARIVgDwLdARY9BuLw,1849
|
|
446
451
|
hestia_earth/models/site/organicCarbonPerHa.py,sha256=gcmhZavc2EWvkroKkpFM5xXowPTgyXGh1XL6lgs3CX4,14303
|
|
447
452
|
hestia_earth/models/site/organicCarbonPerKgSoil.py,sha256=t--wAshiAKS-JvEKhLFRadGvgSBv5NFZ68jdyms_wh4,1945
|
|
@@ -454,18 +459,18 @@ hestia_earth/models/site/precipitationAnnual.py,sha256=to14BEFjUaYyCu5aIBQZtuaIr
|
|
|
454
459
|
hestia_earth/models/site/precipitationMonthly.py,sha256=yGUbiUCu1Prp3qVHuZodGrcfrbYu170WTUGyaj-KEjY,1896
|
|
455
460
|
hestia_earth/models/site/rainfallAnnual.py,sha256=Ix_B8Ny7IIRkJ_3lUvoHOjPgqCyR9I0U3_ADUUtMqsY,2003
|
|
456
461
|
hestia_earth/models/site/rainfallMonthly.py,sha256=2Uo8F-YxnTK0_txlHmiAyVp1bGfWD4bneRKyg4tdQkI,1881
|
|
457
|
-
hestia_earth/models/site/soilMeasurement.py,sha256=
|
|
462
|
+
hestia_earth/models/site/soilMeasurement.py,sha256=q5CJ4caCqH8pSbQxen0IqTjrFyMRLrrCU2M2BMUgzTE,7851
|
|
458
463
|
hestia_earth/models/site/temperatureAnnual.py,sha256=Q3b1RH2_hpA0JWwOYA5nKgMGcXHjV8-akXT9vB0cbwc,2012
|
|
459
464
|
hestia_earth/models/site/temperatureMonthly.py,sha256=yXwpFCGT2tUqvVBNedaPyBmN_KlzZqo5yv2TWem1pBk,1890
|
|
460
465
|
hestia_earth/models/site/totalNitrogenPerKgSoil.py,sha256=8ERrTZpN_yCRUyFg_EYaX4abE9jLcyX3lx3MO4Bi6CE,1938
|
|
461
|
-
hestia_earth/models/site/utils.py,sha256=
|
|
466
|
+
hestia_earth/models/site/utils.py,sha256=b5y6jNmTclC1Vs8FzwW22u3sVyFsvs5if3NJzvLZQLs,3176
|
|
462
467
|
hestia_earth/models/site/waterDepth.py,sha256=uasApPdOzibZMiOyKNKr_ajAkzwUEEPm1j0FNEy49TY,1293
|
|
463
468
|
hestia_earth/models/site/measurement/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
464
469
|
hestia_earth/models/site/measurement/value.py,sha256=7IhUbIj7n5vB7yXoNxXsWbliEJjg1Ww3T5g_P2IyNCU,1661
|
|
465
470
|
hestia_earth/models/site/post_checks/__init__.py,sha256=CkExxesk1GuG8NjrbKfix1iDuVUgU-9i1ccM_X7MZn4,284
|
|
466
471
|
hestia_earth/models/site/post_checks/cache.py,sha256=_MZsNsclecUdHDT2MsYx4cEsVUXydIasddgZNA6SU4k,284
|
|
467
472
|
hestia_earth/models/site/pre_checks/__init__.py,sha256=fjv6nU5fiL-CLyaa-cBpiLB-xujgPzeK7i7ZJuTOjCI,394
|
|
468
|
-
hestia_earth/models/site/pre_checks/cache_geospatialDatabase.py,sha256=
|
|
473
|
+
hestia_earth/models/site/pre_checks/cache_geospatialDatabase.py,sha256=XmAJAohSQQwbjqx-xTqB6LuU4lyz5lcG8njVuWFDGsU,4820
|
|
469
474
|
hestia_earth/models/site/pre_checks/cache_sources.py,sha256=RzvSgHJTpVkAB3mEvRju_irDQmdJRK7GUdU6PhS2Gaw,904
|
|
470
475
|
hestia_earth/models/site/pre_checks/cache_years.py,sha256=qGwTaHlWxnVT7iVxXVcpJ-oG6M-VH4ZpCDTdTixUHR4,883
|
|
471
476
|
hestia_earth/models/stehfestBouwman2006/__init__.py,sha256=EhvD4NK6oEPevusLb1WdYV3GT_fCtQx4gvdMhK_dEIQ,420
|
|
@@ -498,11 +503,11 @@ hestia_earth/models/transformation/product/__init__.py,sha256=47DEQpj8HBSa-_TImW
|
|
|
498
503
|
hestia_earth/models/transformation/product/excreta.py,sha256=Yj9wMF5if-zivb6qbN3vy1X51ZNYxvoyG9f4KPp3Y18,5700
|
|
499
504
|
hestia_earth/models/usetoxV2/__init__.py,sha256=pK37V3H-KvYcvRKw4Mv8CWrB2N0LFLzmv0jKLdhGGqs,409
|
|
500
505
|
hestia_earth/models/usetoxV2/freshwaterEcotoxicityPotentialCtue.py,sha256=oYNwThnMXjZymif5buyHiczFiOq_61jOdDMOAyy8vwQ,1018
|
|
501
|
-
hestia_earth/models/utils/__init__.py,sha256
|
|
506
|
+
hestia_earth/models/utils/__init__.py,sha256=-kuwCLmQOihU3n1RxqhojRa3Izd6PGOqA30k7qKl4vc,4275
|
|
502
507
|
hestia_earth/models/utils/aggregated.py,sha256=sz6usleZmo_tC_hIvmGgYsX8-H0dulXmmhHK4EkA5Kg,4946
|
|
503
508
|
hestia_earth/models/utils/animalProduct.py,sha256=JA-xGQiwsz-VPR_8UfI5hKa918bpQOWIok3--b_iVuM,681
|
|
504
509
|
hestia_earth/models/utils/aquacultureManagement.py,sha256=3uSTSMDNNPa26NTJGZCYwByv3QZVyxj6bh2aFCoBzHk,126
|
|
505
|
-
hestia_earth/models/utils/blank_node.py,sha256=
|
|
510
|
+
hestia_earth/models/utils/blank_node.py,sha256=Yubi--CeQDSrkbZOh7PQ-IL3foe74yH9YGrPrO6nxfM,40822
|
|
506
511
|
hestia_earth/models/utils/completeness.py,sha256=gRl8LkAYmanEZf9ln8IrQPXtW1Ds75rvu1ST0g5-2zI,1246
|
|
507
512
|
hestia_earth/models/utils/constant.py,sha256=5H7odhRwU_LmUhYwf8c1LsdqXSYbLWkuknvtRDqUBTQ,3194
|
|
508
513
|
hestia_earth/models/utils/crop.py,sha256=S8UycHpkgx_TznW3Q7pchEMlCQ623T_SqU6V5fBLBLc,1520
|
|
@@ -527,10 +532,10 @@ hestia_earth/models/utils/practice.py,sha256=tNadOzsrNlCEt801B815XaruJXzZ5yPASam
|
|
|
527
532
|
hestia_earth/models/utils/product.py,sha256=XwxrRwdREWc4N5cE0oLJbLdEucKFRKgKNDj-Kd8mZEQ,9837
|
|
528
533
|
hestia_earth/models/utils/productivity.py,sha256=bUBVCZInGqHuHZvHDSYPQkjWXQxOtTjEk-1-f_BsFOo,594
|
|
529
534
|
hestia_earth/models/utils/property.py,sha256=7UV9pxSX49RnUsbEqOeohzxyXXShao1XAnEYCCVKS0k,4923
|
|
530
|
-
hestia_earth/models/utils/site.py,sha256=
|
|
535
|
+
hestia_earth/models/utils/site.py,sha256=OhSpyDqVwnIglBtoa3iUImzVr0Xj254oYR1wMiAiOHs,3176
|
|
531
536
|
hestia_earth/models/utils/source.py,sha256=HhZkvQoFdy6j6FC2cwP5EbHXHFM4pif9gpnuzeDwEh4,1746
|
|
532
537
|
hestia_earth/models/utils/temperature.py,sha256=ljlG4-yCgFFb6LRZweb18cZKLrr7K2mqd4E4Hz_D1f8,476
|
|
533
|
-
hestia_earth/models/utils/term.py,sha256=
|
|
538
|
+
hestia_earth/models/utils/term.py,sha256=XH3-xTkv8WNB0obOjo6Y5YLT8B3zcON6Z-JeskCsCXY,17112
|
|
534
539
|
hestia_earth/models/utils/transformation.py,sha256=nyT5Mz4_VgFwhkL8JoNX9kxxow0zuxzsYl3W8xOu2p0,370
|
|
535
540
|
hestia_earth/models/webbEtAl2012AndSintermannEtAl2012/__init__.py,sha256=Niv7ZFMBCwThlbCKGOwA17QdkpOUDFrqrFItGNqnZAA,434
|
|
536
541
|
hestia_earth/models/webbEtAl2012AndSintermannEtAl2012/nh3ToAirOrganicFertiliser.py,sha256=G2eq00XGdr1ZEZ5Ru1nBIR-sD7iM9hGYhvk8r5wL3dA,3910
|
|
@@ -668,8 +673,10 @@ tests/models/geospatialDatabase/test_nutrientLossToAquaticEnvironment.py,sha256=
|
|
|
668
673
|
tests/models/geospatialDatabase/test_organicCarbonPerKgSoil.py,sha256=WomlRdVl4f6ooJz2YctPf0YGiNs-9To6XFwTdtpm0SQ,1024
|
|
669
674
|
tests/models/geospatialDatabase/test_potentialEvapotranspirationAnnual.py,sha256=6s4XDmKi__njKE_3tFMIAHr0a1w7X4t8uFRtihN_cm4,706
|
|
670
675
|
tests/models/geospatialDatabase/test_potentialEvapotranspirationLongTermAnnualMean.py,sha256=KzIXuYeO5IZ8l4tKsIEaWcFeV_vSPDSpR6xiuvt_x4o,1003
|
|
676
|
+
tests/models/geospatialDatabase/test_potentialEvapotranspirationMonthly.py,sha256=iu8HWAwl52fWDQJ_Nz5AZIAzbuMAjQfiQwxCHlciI-o,762
|
|
671
677
|
tests/models/geospatialDatabase/test_precipitationAnnual.py,sha256=OhN7dbLZUG8ofvV7C56RKE_hGFXGtOuzXYz3EwFcQyg,744
|
|
672
678
|
tests/models/geospatialDatabase/test_precipitationLongTermAnnualMean.py,sha256=wGGKXGemg3OEgDRRXy52oFf5p8jU57iraTgQMWDzusQ,1033
|
|
679
|
+
tests/models/geospatialDatabase/test_precipitationMonthly.py,sha256=FTmnMXqwxuV_FwNzx8ZJsF5DCdaOdXPNV9UQ5gFKALs,748
|
|
673
680
|
tests/models/geospatialDatabase/test_region.py,sha256=5q3q5TK7yzvoZI2gknf-TPNcmDqVkMo0D3-KY401J2k,882
|
|
674
681
|
tests/models/geospatialDatabase/test_sandContent.py,sha256=hvV0Z51hKPLoSBNsjLJ18upGSt3FUHYbp2ofx7fBUvU,1177
|
|
675
682
|
tests/models/geospatialDatabase/test_siltContent.py,sha256=udJDh2gidlkQVkotxWjCCsXRkbvAQxfpFAjEj5dtNJE,1124
|
|
@@ -678,6 +685,7 @@ tests/models/geospatialDatabase/test_slopeLength.py,sha256=56iCm-qn41NpeVHU9dKtA
|
|
|
678
685
|
tests/models/geospatialDatabase/test_soilPh.py,sha256=Xi-SQ9HesSbvpaUd97n7KbDhxLVZLh07mQ-YtOR0FZU,1008
|
|
679
686
|
tests/models/geospatialDatabase/test_temperatureAnnual.py,sha256=1hW0fHUlFOAWiPqYZm4ZbTGqjpOAmLb1mkucnAaTrIQ,742
|
|
680
687
|
tests/models/geospatialDatabase/test_temperatureLongTermAnnualMean.py,sha256=Wrz9dbDvXM0OgBA3mXpzY0WZk-yqIp980JRKenxFqno,1031
|
|
688
|
+
tests/models/geospatialDatabase/test_temperatureMonthly.py,sha256=eUaI1TZ-9sXFxWR2UoKBbca8dzW21zp5jGcfbooTt3M,746
|
|
681
689
|
tests/models/geospatialDatabase/test_totalNitrogenPerKgSoil.py,sha256=_U3j5hqwYezG7e9v2WyO9ik2QJ9MqjM1QWPGkDChP7M,1024
|
|
682
690
|
tests/models/geospatialDatabase/test_totalPhosphorusPerKgSoil.py,sha256=N5Vqf3YKlxHxWRe1PP3Kpbd30bhPOsB8eYr2IGS7quk,1026
|
|
683
691
|
tests/models/geospatialDatabase/test_utils.py,sha256=2AOTtxs7KjPUVQXyErHsm7578523a5WNODVbbuxafAY,758
|
|
@@ -769,7 +777,7 @@ tests/models/ipcc2019/test_no3ToGroundwaterInorganicFertiliser.py,sha256=e7REnQ9
|
|
|
769
777
|
tests/models/ipcc2019/test_no3ToGroundwaterOrganicFertiliser.py,sha256=e1ZViD12qB3bLdH3TJw3GbBP8iqMen-UJbcFkytb3VQ,1609
|
|
770
778
|
tests/models/ipcc2019/test_noxToAirInorganicFertiliser.py,sha256=NZBSBJLM_j2PEpHRON2ysgKNF8x5sHfQVoAKQdGsfzk,1537
|
|
771
779
|
tests/models/ipcc2019/test_noxToAirOrganicFertiliser.py,sha256=LR5pjV5vRbgSSQAw8kYRp_ij4CHInzgaDS6EggQuBiw,1104
|
|
772
|
-
tests/models/ipcc2019/test_organicCarbonPerHa.py,sha256=
|
|
780
|
+
tests/models/ipcc2019/test_organicCarbonPerHa.py,sha256=iUKKqTModA2ZC_EU6gQ4pzxJ1YN3rV1iUJQa932fiJ0,20529
|
|
773
781
|
tests/models/ipcc2019/test_pastureGrass.py,sha256=pE4PWdR541v4xWDYihP7Dou8V1iqg5GwD5_rjGRzrds,2292
|
|
774
782
|
tests/models/ipcc2021/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
775
783
|
tests/models/ipcc2021/test_gwp100.py,sha256=JRklKMSg-OXopb9ZufGgl94deuMuJSsfNXRZDBtOZrE,1119
|
|
@@ -954,11 +962,13 @@ tests/models/schererPfister2015/test_pToGroundwaterSoilFlux.py,sha256=lOTL-ue6hE
|
|
|
954
962
|
tests/models/schererPfister2015/test_pToSurfaceWaterSoilFlux.py,sha256=1VJo9q-Kb2OboK2RMp3-bkP6lXfkFbqMz1ACJC75FWw,1441
|
|
955
963
|
tests/models/schmidt2007/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
956
964
|
tests/models/schmidt2007/test_ch4ToAirWasteTreatment.py,sha256=5VSxT6sEbNp6c4Y07WzJGFDwVnjJbziG9HmbJNF6r6A,1454
|
|
965
|
+
tests/models/schmidt2007/test_n2OToAirWasteTreatmentDirect.py,sha256=xgikZTGcDqiYdT4b1lR-2g7SQEIenV2-RSzeB68dqRM,1460
|
|
966
|
+
tests/models/schmidt2007/test_nh3ToAirWasteTreatment.py,sha256=22x5Hc0keF41LYMKvARrJvmPtOjIKJ6vCrF2d8AOyAc,1454
|
|
957
967
|
tests/models/schmidt2007/test_utils.py,sha256=rmtOV3xiFynjgx8lQNGsJqquG8HDxz3LDmh1efN8AkI,1278
|
|
958
968
|
tests/models/site/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
959
969
|
tests/models/site/test_cationExchangeCapacityPerKgSoil.py,sha256=tNMhN998vcjQ15I-5mNnFh2d7mHzEBIBO6o1VSfQNUE,1075
|
|
960
970
|
tests/models/site/test_flowingWater.py,sha256=t_rxvdlmUVDsFBoDF20_zDM-0iiLKkNCV7knO9l1T7o,1370
|
|
961
|
-
tests/models/site/test_management.py,sha256=
|
|
971
|
+
tests/models/site/test_management.py,sha256=CO9wghyFmnG5ynU6iuKcJ3LkZCoV9pY35hQedrY6-kk,4470
|
|
962
972
|
tests/models/site/test_netPrimaryProduction.py,sha256=JCxG0MODbKVvl3hOqmKzh4FjHYn3Xs9KsVod6LvKQII,1108
|
|
963
973
|
tests/models/site/test_organicCarbonPerHa.py,sha256=6Qtc0Xmveir7MmNF4Ekv5YkV92TNp8GfDnURPVg05-4,3471
|
|
964
974
|
tests/models/site/test_organicCarbonPerKgSoil.py,sha256=0M-NMg_T3UXzGT_VlKOKhSxg4cZ0_zhd3FRgY5Hpj6o,1087
|
|
@@ -971,7 +981,7 @@ tests/models/site/test_precipitationAnnual.py,sha256=h0tXvykZw4Zaw225RHfvw-3DvAy
|
|
|
971
981
|
tests/models/site/test_precipitationMonthly.py,sha256=iccr-_ZrseM_OT3AKZbTNQhRFSIe-R6wXTDS-2wIVew,995
|
|
972
982
|
tests/models/site/test_rainfallAnnual.py,sha256=4YYna66qjJptPJ_URvdcQuRC3dri9SB0xmWP8DFwslM,986
|
|
973
983
|
tests/models/site/test_rainfallMonthly.py,sha256=A3gIe2Yxt9CLtLcAJNCQ0-8aRB49VdfKBLBy-7eDgJw,985
|
|
974
|
-
tests/models/site/test_soilMeasurement.py,sha256=
|
|
984
|
+
tests/models/site/test_soilMeasurement.py,sha256=IMSnjbyBYAqWicXGgpdNPpJ_OQw6QEJEmfHJxyF4iec,4887
|
|
975
985
|
tests/models/site/test_temperatureAnnual.py,sha256=nOJG9ZJ8NCMM8T47uxxBeloIYLFN6-xtvUBqJsqt8xk,992
|
|
976
986
|
tests/models/site/test_temperatureMonthly.py,sha256=C2lv-lpYqH7VUGOlxNLE6d7k_dFS6NYe8BvMlrJorCw,991
|
|
977
987
|
tests/models/site/test_totalNitrogenPerKgSoil.py,sha256=2ILrA0jQKGniiKwS5FF3ZLtudgUgjcMnzFtrHpJKPTc,1161
|
|
@@ -1028,13 +1038,13 @@ tests/models/utils/test_measurement.py,sha256=Sl5dPZgu1Nrb7kliFiUpx-kEH81v7MdxiH
|
|
|
1028
1038
|
tests/models/utils/test_practice.py,sha256=ILaxkb3qICor9AquAGYiOtA-YKnq0hppmJQzNC_VNyA,612
|
|
1029
1039
|
tests/models/utils/test_product.py,sha256=kwvgAeeEoRgkeStX0zQcFd-4DJhoUhX6Apaks0MU2L0,2305
|
|
1030
1040
|
tests/models/utils/test_property.py,sha256=t2npw86IK7C6G4ypiPtanFi0db4PB7G5VBR1GjRGl34,618
|
|
1031
|
-
tests/models/utils/test_site.py,sha256=
|
|
1041
|
+
tests/models/utils/test_site.py,sha256=5nCW3onTk6GF_N-h4NYDrlSoxHhXY2GVMbjaDsicbSE,1187
|
|
1032
1042
|
tests/models/utils/test_source.py,sha256=mv3vHZV5cjpoLA2I1109-YUkuzAiuhbRSnv_76_f0CA,631
|
|
1033
|
-
tests/models/utils/test_term.py,sha256=
|
|
1043
|
+
tests/models/utils/test_term.py,sha256=M5Sa26v2gzQYbZ4H_fo7DspnaCx__-WtL-MULGapCWk,3509
|
|
1034
1044
|
tests/models/webbEtAl2012AndSintermannEtAl2012/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1035
1045
|
tests/models/webbEtAl2012AndSintermannEtAl2012/test_nh3ToAirOrganicFertiliser.py,sha256=qi2FNXS5Af2WDtm7nq_FsprH3BfCF0XxnE0XHmC4aIY,2244
|
|
1036
|
-
hestia_earth_models-0.59.
|
|
1037
|
-
hestia_earth_models-0.59.
|
|
1038
|
-
hestia_earth_models-0.59.
|
|
1039
|
-
hestia_earth_models-0.59.
|
|
1040
|
-
hestia_earth_models-0.59.
|
|
1046
|
+
hestia_earth_models-0.59.5.dist-info/LICENSE,sha256=EFSZhfUdZCTsCIYdHzTGewMKfRfp7X9t1s2aaKxm8O0,1154
|
|
1047
|
+
hestia_earth_models-0.59.5.dist-info/METADATA,sha256=nswhxTNJU9lqQpd8DbRhIXzP2QgBYed7LLoAbLUmkSw,3134
|
|
1048
|
+
hestia_earth_models-0.59.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
1049
|
+
hestia_earth_models-0.59.5.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
|
|
1050
|
+
hestia_earth_models-0.59.5.dist-info/RECORD,,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from unittest.mock import patch
|
|
2
|
+
import json
|
|
3
|
+
from tests.utils import fixtures_path, fake_new_measurement
|
|
4
|
+
|
|
5
|
+
from hestia_earth.models.geospatialDatabase.potentialEvapotranspirationMonthly import MODEL, TERM_ID, 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}.get_source", return_value={})
|
|
12
|
+
@patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
|
|
13
|
+
@patch(f"{class_path}.related_years", return_value=['2009'])
|
|
14
|
+
@patch(f"{class_path}.download", return_value=None)
|
|
15
|
+
def test_run(mock_download, *args):
|
|
16
|
+
with open(f"{fixtures_path}/{MODEL}/site.jsonld", encoding='utf-8') as f:
|
|
17
|
+
site = json.load(f)
|
|
18
|
+
|
|
19
|
+
run(site)
|
|
20
|
+
assert mock_download.call_count == 12
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from unittest.mock import patch
|
|
2
|
+
import json
|
|
3
|
+
from tests.utils import fixtures_path, fake_new_measurement
|
|
4
|
+
|
|
5
|
+
from hestia_earth.models.geospatialDatabase.precipitationMonthly import MODEL, TERM_ID, 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}.get_source", return_value={})
|
|
12
|
+
@patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
|
|
13
|
+
@patch(f"{class_path}.related_years", return_value=['2009'])
|
|
14
|
+
@patch(f"{class_path}.download", return_value=None)
|
|
15
|
+
def test_run(mock_download, *args):
|
|
16
|
+
with open(f"{fixtures_path}/{MODEL}/site.jsonld", encoding='utf-8') as f:
|
|
17
|
+
site = json.load(f)
|
|
18
|
+
|
|
19
|
+
run(site)
|
|
20
|
+
assert mock_download.call_count == 12
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from unittest.mock import patch
|
|
2
|
+
import json
|
|
3
|
+
from tests.utils import fixtures_path, fake_new_measurement
|
|
4
|
+
|
|
5
|
+
from hestia_earth.models.geospatialDatabase.temperatureMonthly import MODEL, TERM_ID, 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}.get_source", return_value={})
|
|
12
|
+
@patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
|
|
13
|
+
@patch(f"{class_path}.related_years", return_value=['2009'])
|
|
14
|
+
@patch(f"{class_path}.download", return_value=None)
|
|
15
|
+
def test_run(mock_download, *args):
|
|
16
|
+
with open(f"{fixtures_path}/{MODEL}/site.jsonld", encoding='utf-8') as f:
|
|
17
|
+
site = json.load(f)
|
|
18
|
+
|
|
19
|
+
run(site)
|
|
20
|
+
assert mock_download.call_count == 12
|
|
@@ -16,7 +16,6 @@ from hestia_earth.models.ipcc2019.organicCarbonPerHa import (
|
|
|
16
16
|
_calc_temperature_factor,
|
|
17
17
|
_calc_tier_1_soc_stocks,
|
|
18
18
|
_calc_water_factor,
|
|
19
|
-
_calculated_cycles,
|
|
20
19
|
_check_cropland_low_category,
|
|
21
20
|
_check_cropland_medium_category,
|
|
22
21
|
_get_carbon_input_kwargs,
|
|
@@ -68,11 +67,6 @@ IRRIGATED_TERM_IDS = [
|
|
|
68
67
|
"irrigatedSurfaceIrrigationDrainageRegimeUnspecified"
|
|
69
68
|
]
|
|
70
69
|
|
|
71
|
-
LONG_FALLOW_LAND_COVER_TERM_IDS = [
|
|
72
|
-
"longFallow",
|
|
73
|
-
"longBareFallow"
|
|
74
|
-
]
|
|
75
|
-
|
|
76
70
|
RESIDUE_REMOVED_OR_BURNT_TERM_IDS = [
|
|
77
71
|
"residueBurnt",
|
|
78
72
|
"residueRemoved"
|
|
@@ -129,7 +123,9 @@ RUN_SUBFOLDERS = [
|
|
|
129
123
|
("tier-1/cropland-without-measured-soc", False),
|
|
130
124
|
("tier-1/permanent-pasture", False),
|
|
131
125
|
("tier-1/should-not-run", False),
|
|
132
|
-
("tier-1/without-management-with-measured-soc", False)
|
|
126
|
+
("tier-1/without-management-with-measured-soc", False),
|
|
127
|
+
("tier-1/land-use-change", False), # Closes issue 755
|
|
128
|
+
("tier-1/run-with-site-type", False) # Closes issue 755
|
|
133
129
|
]
|
|
134
130
|
|
|
135
131
|
|
|
@@ -142,19 +138,17 @@ RUN_SUBFOLDERS = [
|
|
|
142
138
|
@patch(f"{class_path}.get_cover_crop_property_terms", return_value=COVER_CROP_PROPERTY_TERM_IDS)
|
|
143
139
|
@patch(f"{class_path}.get_crop_residue_incorporated_or_left_on_field_terms", return_value=CROP_RESIDUE_INCORP_TERM_IDS)
|
|
144
140
|
@patch(f"{class_path}.get_irrigated_terms", return_value=IRRIGATED_TERM_IDS)
|
|
145
|
-
@patch(f"{class_path}.get_long_fallow_land_cover_terms", return_value=LONG_FALLOW_LAND_COVER_TERM_IDS)
|
|
146
141
|
@patch(f"{class_path}.get_residue_removed_or_burnt_terms", return_value=RESIDUE_REMOVED_OR_BURNT_TERM_IDS)
|
|
147
142
|
@patch(f"{class_path}.get_upland_rice_land_cover_terms", return_value=UPLAND_RICE_LAND_COVER_TERM_IDS)
|
|
148
143
|
@patch(f"{class_path}.get_upland_rice_crop_terms", return_value=UPLAND_RICE_CROP_TERM_IDS)
|
|
149
|
-
@patch(f"{class_path}.
|
|
144
|
+
@patch(f"{class_path}.related_cycles")
|
|
150
145
|
@patch("hestia_earth.models.utils.property.find_term_property")
|
|
151
146
|
def test_run(
|
|
152
147
|
mock_find_term_property,
|
|
153
|
-
|
|
148
|
+
mock_related_cycles,
|
|
154
149
|
_mock_get_upland_rice_crop_terms,
|
|
155
150
|
_mock_get_upland_rice_land_cover_terms,
|
|
156
151
|
_mock_get_residue_removed_or_burnt_terms,
|
|
157
|
-
_mock_get_long_fallow_land_cover_terms,
|
|
158
152
|
_mock_get_irrigated_terms,
|
|
159
153
|
_mock_get_crop_residue_incorporated_or_left_on_field_terms,
|
|
160
154
|
_mock_get_cover_crop_property_terms,
|
|
@@ -169,7 +163,7 @@ def test_run(
|
|
|
169
163
|
return json.load(f)
|
|
170
164
|
|
|
171
165
|
mock_find_term_property.side_effect = find_term_property_side_effect
|
|
172
|
-
|
|
166
|
+
mock_related_cycles.return_value = load_cycles_from_file() if load_cycles else []
|
|
173
167
|
|
|
174
168
|
with open(f"{folder}/site.jsonld", encoding='utf-8') as f:
|
|
175
169
|
site = json.load(f)
|
|
@@ -185,11 +179,10 @@ def test_run(
|
|
|
185
179
|
@patch(f"{class_path}.get_cover_crop_property_terms", return_value=COVER_CROP_PROPERTY_TERM_IDS)
|
|
186
180
|
@patch(f"{class_path}.get_crop_residue_incorporated_or_left_on_field_terms", return_value=CROP_RESIDUE_INCORP_TERM_IDS)
|
|
187
181
|
@patch(f"{class_path}.get_irrigated_terms", return_value=IRRIGATED_TERM_IDS)
|
|
188
|
-
@patch(f"{class_path}.get_long_fallow_land_cover_terms", return_value=LONG_FALLOW_LAND_COVER_TERM_IDS)
|
|
189
182
|
@patch(f"{class_path}.get_residue_removed_or_burnt_terms", return_value=RESIDUE_REMOVED_OR_BURNT_TERM_IDS)
|
|
190
183
|
@patch(f"{class_path}.get_upland_rice_land_cover_terms", return_value=UPLAND_RICE_LAND_COVER_TERM_IDS)
|
|
191
184
|
@patch(f"{class_path}.get_upland_rice_crop_terms", return_value=UPLAND_RICE_CROP_TERM_IDS)
|
|
192
|
-
@patch(f"{class_path}.
|
|
185
|
+
@patch(f"{class_path}.related_cycles", return_value=[])
|
|
193
186
|
def test_run_no_data(*args):
|
|
194
187
|
SITE = {}
|
|
195
188
|
EXPECTED = []
|
|
@@ -234,22 +227,6 @@ def test_calc_water_factor():
|
|
|
234
227
|
assert _calc_water_factor(1, 1) == _calc_water_factor(1000, 1000)
|
|
235
228
|
|
|
236
229
|
|
|
237
|
-
@patch(f"{class_path}.find_related")
|
|
238
|
-
@patch("hestia_earth.models.utils.download_hestia")
|
|
239
|
-
def test_calculated_cycles(mock_download_hestia, mock_find_related):
|
|
240
|
-
CYCLES = [{"@id": "cycle"}]
|
|
241
|
-
EXPECTED = [{"@id": "cycle", "@type": "Cycle"}]
|
|
242
|
-
|
|
243
|
-
mock_download_hestia.side_effect = lambda node_id, node_type, **_: {
|
|
244
|
-
"@type": node_type.value,
|
|
245
|
-
"@id": node_id
|
|
246
|
-
}
|
|
247
|
-
mock_find_related.return_value = CYCLES
|
|
248
|
-
|
|
249
|
-
result = _calculated_cycles({})
|
|
250
|
-
assert EXPECTED == result
|
|
251
|
-
|
|
252
|
-
|
|
253
230
|
# --- IPCC SOIL CATEGORY TESTS ---
|
|
254
231
|
|
|
255
232
|
|
|
@@ -317,11 +294,9 @@ LAND_USE_CATEGORY_PARAMS = [
|
|
|
317
294
|
ids=[params[0] for params in LAND_USE_CATEGORY_PARAMS]
|
|
318
295
|
)
|
|
319
296
|
@patch(f"{class_path}.get_irrigated_terms", return_value=IRRIGATED_TERM_IDS)
|
|
320
|
-
@patch(f"{class_path}.get_long_fallow_land_cover_terms", return_value=LONG_FALLOW_LAND_COVER_TERM_IDS)
|
|
321
297
|
@patch(f"{class_path}.get_upland_rice_land_cover_terms", return_value=UPLAND_RICE_LAND_COVER_TERM_IDS)
|
|
322
298
|
def test_assign_ipcc_land_use_category(
|
|
323
299
|
_mock_get_upland_rice_land_cover_terms,
|
|
324
|
-
_mock_get_long_fallow_land_cover_terms,
|
|
325
300
|
_mock_get_irrigated_terms,
|
|
326
301
|
subfolder,
|
|
327
302
|
soil_category,
|
|
@@ -332,7 +307,7 @@ def test_assign_ipcc_land_use_category(
|
|
|
332
307
|
with open(f"{folder}/site.jsonld", encoding='utf-8') as f:
|
|
333
308
|
site = json.load(f)
|
|
334
309
|
|
|
335
|
-
result = _assign_ipcc_land_use_category(site.get("
|
|
310
|
+
result = _assign_ipcc_land_use_category(site.get("management", []), soil_category)
|
|
336
311
|
assert result == expected
|
|
337
312
|
|
|
338
313
|
|
|
@@ -380,11 +355,9 @@ def test_assign_ipcc_management_category(subfolder, land_use_category, expected)
|
|
|
380
355
|
@patch(f"{class_path}.get_cover_crop_property_terms", return_value=COVER_CROP_PROPERTY_TERM_IDS)
|
|
381
356
|
@patch(f"{class_path}.get_crop_residue_incorporated_or_left_on_field_terms", return_value=CROP_RESIDUE_INCORP_TERM_IDS)
|
|
382
357
|
@patch(f"{class_path}.get_irrigated_terms", return_value=IRRIGATED_TERM_IDS)
|
|
383
|
-
@patch(f"{class_path}.get_long_fallow_land_cover_terms", return_value=LONG_FALLOW_LAND_COVER_TERM_IDS)
|
|
384
358
|
@patch(f"{class_path}.get_residue_removed_or_burnt_terms", return_value=RESIDUE_REMOVED_OR_BURNT_TERM_IDS)
|
|
385
359
|
def test_check_cropland_medium_category(
|
|
386
360
|
_mock_get_residue_removed_or_burnt_terms,
|
|
387
|
-
_mock_get_long_fallow_land_cover_terms,
|
|
388
361
|
_mock_get_irrigated_terms,
|
|
389
362
|
_mock_get_crop_residue_incorporated_or_left_on_field_terms,
|
|
390
363
|
_mock_get_cover_crop_property_terms,
|
|
@@ -407,11 +380,9 @@ def test_check_cropland_medium_category(
|
|
|
407
380
|
@patch(f"{class_path}.get_cover_crop_property_terms", return_value=COVER_CROP_PROPERTY_TERM_IDS)
|
|
408
381
|
@patch(f"{class_path}.get_crop_residue_incorporated_or_left_on_field_terms", return_value=CROP_RESIDUE_INCORP_TERM_IDS)
|
|
409
382
|
@patch(f"{class_path}.get_irrigated_terms", return_value=IRRIGATED_TERM_IDS)
|
|
410
|
-
@patch(f"{class_path}.get_long_fallow_land_cover_terms", return_value=LONG_FALLOW_LAND_COVER_TERM_IDS)
|
|
411
383
|
@patch(f"{class_path}.get_residue_removed_or_burnt_terms", return_value=RESIDUE_REMOVED_OR_BURNT_TERM_IDS)
|
|
412
384
|
def test_check_cropland_low_category(
|
|
413
385
|
_mock_get_residue_removed_or_burnt_terms,
|
|
414
|
-
_mock_get_long_fallow_land_cover_terms,
|
|
415
386
|
_mock_get_irrigated_terms,
|
|
416
387
|
_mock_get_crop_residue_incorporated_or_left_on_field_terms,
|
|
417
388
|
_mock_get_cover_crop_property_terms,
|
|
@@ -476,11 +447,9 @@ CARBON_INPUT_CATEGORY_PARAMS = [
|
|
|
476
447
|
@patch(f"{class_path}.get_cover_crop_property_terms", return_value=COVER_CROP_PROPERTY_TERM_IDS)
|
|
477
448
|
@patch(f"{class_path}.get_crop_residue_incorporated_or_left_on_field_terms", return_value=CROP_RESIDUE_INCORP_TERM_IDS)
|
|
478
449
|
@patch(f"{class_path}.get_irrigated_terms", return_value=IRRIGATED_TERM_IDS)
|
|
479
|
-
@patch(f"{class_path}.get_long_fallow_land_cover_terms", return_value=LONG_FALLOW_LAND_COVER_TERM_IDS)
|
|
480
450
|
@patch(f"{class_path}.get_residue_removed_or_burnt_terms", return_value=RESIDUE_REMOVED_OR_BURNT_TERM_IDS)
|
|
481
451
|
def test_assign_ipcc_carbon_input_category(
|
|
482
452
|
_mock_get_residue_removed_or_burnt_terms,
|
|
483
|
-
_mock_get_long_fallow_land_cover_terms,
|
|
484
453
|
_mock_get_irrigated_terms,
|
|
485
454
|
_mock_get_crop_residue_incorporated_or_left_on_field_terms,
|
|
486
455
|
_mock_get_cover_crop_property_terms,
|
|
@@ -0,0 +1,45 @@
|
|
|
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.schmidt2007.n2OToAirWasteTreatmentDirect 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}.get_waste_values")
|
|
12
|
+
def test_should_run(mock_get_waste_values):
|
|
13
|
+
# no fuel values => no run
|
|
14
|
+
mock_get_waste_values.return_value = []
|
|
15
|
+
should_run, *args = _should_run({})
|
|
16
|
+
assert not should_run
|
|
17
|
+
|
|
18
|
+
# with fuel values => run
|
|
19
|
+
mock_get_waste_values.return_value = [0]
|
|
20
|
+
should_run, *args = _should_run({})
|
|
21
|
+
assert should_run is True
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
|
|
25
|
+
def test_run(*args):
|
|
26
|
+
with open(f"{fixtures_folder}/cycle.jsonld", encoding='utf-8') as f:
|
|
27
|
+
cycle = json.load(f)
|
|
28
|
+
|
|
29
|
+
with open(f"{fixtures_folder}/result.jsonld", encoding='utf-8') as f:
|
|
30
|
+
expected = json.load(f)
|
|
31
|
+
|
|
32
|
+
value = run(cycle)
|
|
33
|
+
assert value == expected
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
|
|
37
|
+
def test_run_data_complete(*args):
|
|
38
|
+
with open(f"{fixtures_folder}/no-input-data-complete/cycle.jsonld", encoding='utf-8') as f:
|
|
39
|
+
cycle = json.load(f)
|
|
40
|
+
|
|
41
|
+
with open(f"{fixtures_folder}/no-input-data-complete/result.jsonld", encoding='utf-8') as f:
|
|
42
|
+
expected = json.load(f)
|
|
43
|
+
|
|
44
|
+
value = run(cycle)
|
|
45
|
+
assert value == expected
|
|
@@ -0,0 +1,45 @@
|
|
|
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.schmidt2007.nh3ToAirWasteTreatment 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}.get_waste_values")
|
|
12
|
+
def test_should_run(mock_get_waste_values):
|
|
13
|
+
# no fuel values => no run
|
|
14
|
+
mock_get_waste_values.return_value = []
|
|
15
|
+
should_run, *args = _should_run({})
|
|
16
|
+
assert not should_run
|
|
17
|
+
|
|
18
|
+
# with fuel values => run
|
|
19
|
+
mock_get_waste_values.return_value = [0]
|
|
20
|
+
should_run, *args = _should_run({})
|
|
21
|
+
assert should_run is True
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
|
|
25
|
+
def test_run(*args):
|
|
26
|
+
with open(f"{fixtures_folder}/cycle.jsonld", encoding='utf-8') as f:
|
|
27
|
+
cycle = json.load(f)
|
|
28
|
+
|
|
29
|
+
with open(f"{fixtures_folder}/result.jsonld", encoding='utf-8') as f:
|
|
30
|
+
expected = json.load(f)
|
|
31
|
+
|
|
32
|
+
value = run(cycle)
|
|
33
|
+
assert value == expected
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
|
|
37
|
+
def test_run_data_complete(*args):
|
|
38
|
+
with open(f"{fixtures_folder}/no-input-data-complete/cycle.jsonld", encoding='utf-8') as f:
|
|
39
|
+
cycle = json.load(f)
|
|
40
|
+
|
|
41
|
+
with open(f"{fixtures_folder}/no-input-data-complete/result.jsonld", encoding='utf-8') as f:
|
|
42
|
+
expected = json.load(f)
|
|
43
|
+
|
|
44
|
+
value = run(cycle)
|
|
45
|
+
assert value == expected
|