hestia-earth-models 0.70.1__py3-none-any.whl → 0.70.2__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.
- hestia_earth/models/cml2001Baseline/resourceUseMineralsAndMetalsDuringCycle.py +2 -1
- hestia_earth/models/config/Cycle.json +60 -0
- hestia_earth/models/config/Site.json +8 -0
- hestia_earth/models/hestia/excretaKgMass.py +1 -1
- hestia_earth/models/hestia/management.py +4 -6
- hestia_earth/models/hestia/pToSurfaceWaterAquacultureSystems.py +148 -0
- hestia_earth/models/hestia/soilMeasurement.py +1 -1
- hestia_earth/models/ipcc2019/ch4ToAirFloodedRice.py +8 -6
- hestia_earth/models/ipcc2019/ch4ToAirOrganicSoilCultivation.py +270 -0
- hestia_earth/models/ipcc2019/co2ToAirAboveGroundBiomassStockChange.py +0 -3
- hestia_earth/models/ipcc2019/co2ToAirBelowGroundBiomassStockChange.py +0 -3
- hestia_earth/models/ipcc2019/co2ToAirCarbonStockChange_utils.py +57 -43
- hestia_earth/models/ipcc2019/co2ToAirLimeHydrolysis.py +7 -5
- hestia_earth/models/ipcc2019/co2ToAirOrganicSoilCultivation.py +215 -0
- hestia_earth/models/ipcc2019/co2ToAirSoilOrganicCarbonStockChange.py +0 -3
- hestia_earth/models/ipcc2019/n2OToAirOrganicSoilCultivationDirect.py +161 -0
- hestia_earth/models/ipcc2019/organicSoilCultivation_utils.py +159 -0
- hestia_earth/models/mocking/search-results.json +714 -706
- hestia_earth/models/site/grouped_measurement.py +132 -0
- hestia_earth/models/utils/__init__.py +4 -3
- hestia_earth/models/utils/blank_node.py +38 -9
- hestia_earth/models/utils/constant.py +26 -20
- hestia_earth/models/utils/product.py +39 -1
- hestia_earth/models/utils/property.py +14 -6
- hestia_earth/models/version.py +1 -1
- {hestia_earth_models-0.70.1.dist-info → hestia_earth_models-0.70.2.dist-info}/METADATA +1 -1
- {hestia_earth_models-0.70.1.dist-info → hestia_earth_models-0.70.2.dist-info}/RECORD +42 -31
- tests/models/hestia/test_feedConversionRatio.py +2 -3
- tests/models/hestia/test_pToSurfaceWaterAquacultureSystems.py +56 -0
- tests/models/hestia/test_soilMeasurement.py +11 -19
- tests/models/ipcc2019/test_ch4ToAirEntericFermentation.py +2 -5
- tests/models/ipcc2019/test_ch4ToAirOrganicSoilCultivation.py +61 -0
- tests/models/ipcc2019/test_co2ToAirAboveGroundBiomassStockChange.py +11 -9
- tests/models/ipcc2019/test_co2ToAirBelowGroundBiomassStockChange.py +10 -8
- tests/models/ipcc2019/test_co2ToAirLimeHydrolysis.py +1 -1
- tests/models/ipcc2019/test_co2ToAirOrganicSoilCultivation.py +62 -0
- tests/models/ipcc2019/test_co2ToAirSoilOrganicCarbonStockChange.py +11 -9
- tests/models/ipcc2019/test_n2OToAirOrganicSoilCultivationDirect.py +61 -0
- tests/models/site/test_grouped_measurement.py +20 -0
- {hestia_earth_models-0.70.1.dist-info → hestia_earth_models-0.70.2.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.70.1.dist-info → hestia_earth_models-0.70.2.dist-info}/WHEEL +0 -0
- {hestia_earth_models-0.70.1.dist-info → hestia_earth_models-0.70.2.dist-info}/top_level.txt +0 -0
@@ -4,7 +4,7 @@ hestia_earth/models/cache_sites.py,sha256=BOhLkkdVWLJ-4Z7kxfQ8swqrYgZ43sACn1uzxY
|
|
4
4
|
hestia_earth/models/log.py,sha256=eRuH86v7Thuw-QXdKqaqVmA_MkwnOCo0UBEwtuDq4Oc,3554
|
5
5
|
hestia_earth/models/preload_requests.py,sha256=vK_G1UzhNMhYy7ymnCtHUz_vv3cfApCSKqv29VREEBQ,1943
|
6
6
|
hestia_earth/models/requirements.py,sha256=eU4yT443fx7BnaokhrLB_PCizJI7Y6m4auyo8vQauNg,17363
|
7
|
-
hestia_earth/models/version.py,sha256=
|
7
|
+
hestia_earth/models/version.py,sha256=FXrFGVyUGmPydZ629i9Ewt-kg-xGSch4AgpWPfJW1KM,19
|
8
8
|
hestia_earth/models/agribalyse2016/__init__.py,sha256=WvK0qCQbnYtg9oZxrACd1wGormZyXibPtpCnIQeDqbw,415
|
9
9
|
hestia_earth/models/agribalyse2016/fuelElectricity.py,sha256=1ngl8pdxeNhlVV8keAeWRwGorr_1uFXM9EoPUWx-uSc,4382
|
10
10
|
hestia_earth/models/agribalyse2016/machineryInfrastructureDepreciatedAmountPerCycle.py,sha256=queToXuzq0tQ9_XuUJ2pJgSywXmbt9uX3ZoIKgqkROM,2660
|
@@ -27,15 +27,15 @@ hestia_earth/models/cml2001Baseline/abioticResourceDepletionMineralsAndMetals.py
|
|
27
27
|
hestia_earth/models/cml2001Baseline/eutrophicationPotentialExcludingFate.py,sha256=nUWKsn3COqAOrYNmiBKnA2rUs88pj4o3k4fHKA0TVbU,1068
|
28
28
|
hestia_earth/models/cml2001Baseline/resourceUseEnergyDepletionDuringCycle.py,sha256=C9pXq8Al971s4Xn50S85mXmtw7OYHzKRnPH6kcqZTCY,5237
|
29
29
|
hestia_earth/models/cml2001Baseline/resourceUseEnergyDepletionInputsProduction.py,sha256=hXGdx1IA5yeVLHrRrSZWCP0s7ucSRWelYNr6aQ9YTyU,1205
|
30
|
-
hestia_earth/models/cml2001Baseline/resourceUseMineralsAndMetalsDuringCycle.py,sha256=
|
30
|
+
hestia_earth/models/cml2001Baseline/resourceUseMineralsAndMetalsDuringCycle.py,sha256=pLNdi92A68yG_4f05AWzEi61MCdYvY2KtM4kH0E0s0Q,2605
|
31
31
|
hestia_earth/models/cml2001Baseline/resourceUseMineralsAndMetalsInputsProduction.py,sha256=WfFL9n_KyR2XXPwliHu6gpgixFrOWB4XAO1VsJWgIio,1200
|
32
32
|
hestia_earth/models/cml2001Baseline/terrestrialAcidificationPotentialIncludingFateAverageEurope.py,sha256=N8neIISqeTAS7VGTNWbbbozOtfCb816qwwHCnv7Nnpw,1113
|
33
33
|
hestia_earth/models/cml2001NonBaseline/__init__.py,sha256=vI8wp8Og_e8DiJqYYvp33YoI3t4ffAC31LWlnV20JTg,419
|
34
34
|
hestia_earth/models/cml2001NonBaseline/eutrophicationPotentialIncludingFateAverageEurope.py,sha256=lcgyRHY08KCBFPERJNqV4DYGEJCvyHBDnJXD0kEkVqM,1097
|
35
35
|
hestia_earth/models/cml2001NonBaseline/terrestrialAcidificationPotentialExcludingFate.py,sha256=xcrxfs9UoV_EWvV-XzMt35oPWCUsTzqg2SGA3j2MFIw,1091
|
36
|
-
hestia_earth/models/config/Cycle.json,sha256=
|
36
|
+
hestia_earth/models/config/Cycle.json,sha256=AfkdbmDl0rZxl_2Wk8nMKx1QHiOSacemVubBhcvPobQ,58758
|
37
37
|
hestia_earth/models/config/ImpactAssessment.json,sha256=R22Pa6Szl05s13xFGKmrVZ4EgKD4UyUrruxxVujsJt4,56201
|
38
|
-
hestia_earth/models/config/Site.json,sha256=
|
38
|
+
hestia_earth/models/config/Site.json,sha256=vOjDsstMWe4i6PDDfpJ236Qb7gif5I0MMmscK1-LgKM,13866
|
39
39
|
hestia_earth/models/config/__init__.py,sha256=l1WqL7ezlank86ABP4zUia_hIvM9ba-sOE3z6wNrea8,2333
|
40
40
|
hestia_earth/models/config/run-calculations.json,sha256=e3nJ4M6CP1iFzfv8ou_ZUFbFxYkDxJgwuNDXTm4PBDc,615
|
41
41
|
hestia_earth/models/config/trigger-calculations.json,sha256=3dmn2bRuj6QEtSTOLdIy31ho7thgUXyDsnqZzPV9rAQ,623
|
@@ -192,7 +192,7 @@ hestia_earth/models/hestia/concentrateFeed.py,sha256=HnuG3zAECtFVdPRbTATGz5ImO2V
|
|
192
192
|
hestia_earth/models/hestia/cropResidueManagement.py,sha256=5t32oILM-lbOsPiP6tDiITpuLZ0eISlB6Lp0goDH8eE,2223
|
193
193
|
hestia_earth/models/hestia/croppingIntensity.py,sha256=xev3GOE06nBJ8ZY3XtbnE0eR2YR_kqAFPnrTuKFtLrQ,1777
|
194
194
|
hestia_earth/models/hestia/energyContentLowerHeatingValue.py,sha256=2gR7Iu5nUUCGSXjFrkTnss6XBGtQz-yKwexCQoy8TJU,2214
|
195
|
-
hestia_earth/models/hestia/excretaKgMass.py,sha256=
|
195
|
+
hestia_earth/models/hestia/excretaKgMass.py,sha256=8yUZZ_Mmx5HC6Jv2uQBFi-oJIzd-pR2Py1q0dhKY1Mo,4021
|
196
196
|
hestia_earth/models/hestia/excretaKgN.py,sha256=-GfHPx6AECNPW2i_ioCuf-DhW7Xau201xqe-qWcK474,2857
|
197
197
|
hestia_earth/models/hestia/excretaKgVs.py,sha256=fzBV7hgznevLTcvHyHKQk9upkCgmJ0xH1NuMETeSF8A,2860
|
198
198
|
hestia_earth/models/hestia/flowingWater.py,sha256=Iy5PCWun7GMrr0zszd0zpp9lKADpXesjC3doqLY4n28,1603
|
@@ -204,7 +204,7 @@ hestia_earth/models/hestia/landTransformation100YearAverageDuringCycle.py,sha256
|
|
204
204
|
hestia_earth/models/hestia/landTransformation20YearAverageDuringCycle.py,sha256=1StzrYhMsX-hdwBTeLnLMZWl5EEnCoEYpGPRkqy8a-A,1016
|
205
205
|
hestia_earth/models/hestia/liveAnimal.py,sha256=95HfqgFA_qRhdIeR2X5MJ9zzIm4nMHDvJ0BCnuTYe5Q,3860
|
206
206
|
hestia_earth/models/hestia/longFallowRatio.py,sha256=LkJaER1VNDI5351-oC8tru-LgiPK3sNMg0NhB5ic9RE,1690
|
207
|
-
hestia_earth/models/hestia/management.py,sha256=
|
207
|
+
hestia_earth/models/hestia/management.py,sha256=qkYAlCwuyrfmgoDx0R23MA6ZXzH9Glf__74SxraUbqM,14758
|
208
208
|
hestia_earth/models/hestia/materialAndSubstrate.py,sha256=abmM_7FOY5yaNb2yZEm-ncI4wFFcbzaebtnG9XWEA6M,5130
|
209
209
|
hestia_earth/models/hestia/milkYield.py,sha256=__3AdxRTUTWwS_GsqxFpPGklmTnnpADiN0khlRCMAss,5541
|
210
210
|
hestia_earth/models/hestia/netPrimaryProduction.py,sha256=uU4AZ7X6tbtWgR5YClA_aLpYWtlivq9lPQGZgt3-qoQ,1856
|
@@ -213,6 +213,7 @@ hestia_earth/models/hestia/organicCarbonPerKgSoil.py,sha256=t--wAshiAKS-JvEKhLFR
|
|
213
213
|
hestia_earth/models/hestia/organicCarbonPerM3Soil.py,sha256=pdv5V-ojcfhlGzPwRS9s-vEnxiHZQPZP-ESVcz2pt0g,1945
|
214
214
|
hestia_earth/models/hestia/organicMatterPerKgSoil.py,sha256=fJpFVkpuCjnrBhgV0RtwKqQHvAJWWtZO9xtmnJnl8O4,1945
|
215
215
|
hestia_earth/models/hestia/organicMatterPerM3Soil.py,sha256=FTNc0FKnWt91BvbsIrBx_0SoGfuqnAC0AlTUL5RvzZ8,1945
|
216
|
+
hestia_earth/models/hestia/pToSurfaceWaterAquacultureSystems.py,sha256=K-Remsxa3FG2OVNPioPO2PgwVJ608XoizHGyQTGCWuI,5528
|
216
217
|
hestia_earth/models/hestia/pastureGrass.py,sha256=2k3wvHDozW4cHW5JpmRvMOitA1x-80OIhRHhnRC1e0s,1275
|
217
218
|
hestia_earth/models/hestia/pastureSystem.py,sha256=Cremfv1q55pX1U1FYNvLz8gvZ-DX33o4P_i4VEfJsKo,2573
|
218
219
|
hestia_earth/models/hestia/potentialEvapotranspirationAnnual.py,sha256=FTMY7fjTg1Z4owSoXrxDKpWaIpVUm5HQ47jz4EdcQqU,2011
|
@@ -229,7 +230,7 @@ hestia_earth/models/hestia/residueRemoved.py,sha256=2I4wTJJcORrhkWiRJOzjwxRMIn3J
|
|
229
230
|
hestia_earth/models/hestia/resourceUse_utils.py,sha256=SYMN-40NW76LaVo2jVdnCbTgYN03mmSqvYRzgDzm5jI,8564
|
230
231
|
hestia_earth/models/hestia/salineWater.py,sha256=NB9nu1oiqbUd0k-9chBsY92vOsg5mDrSf1OCR3tlA6k,1263
|
231
232
|
hestia_earth/models/hestia/seed_emissions.py,sha256=Mn1iEaLrl6gz66Pqd7sD3JhR8UOrGwXLdg641nzUME0,11048
|
232
|
-
hestia_earth/models/hestia/soilMeasurement.py,sha256=
|
233
|
+
hestia_earth/models/hestia/soilMeasurement.py,sha256=cP4nuz2DE-FLaFbP-0fG5wbIgU28s3n4-lo8-RTFpF0,7088
|
233
234
|
hestia_earth/models/hestia/stockingDensityAnimalHousingAverage.py,sha256=Ce0RZmAADDtGksfXzhX4lh-jdAs3WlCQqy2FAF3xFjo,1850
|
234
235
|
hestia_earth/models/hestia/temperatureAnnual.py,sha256=IhMoO-SkSp1JBxgu9bSr1OCtr7QQlZsoCXqhsWeEprs,1963
|
235
236
|
hestia_earth/models/hestia/temperatureMonthly.py,sha256=sY4MrjCTm7X3BoDTUC0ZkxD7CWxvl51JW2UxDykCKzg,1842
|
@@ -287,12 +288,14 @@ hestia_earth/models/ipcc2019/carbonContent.py,sha256=tlQvu4Auhpjmaz7XrZz86xwxVrJ
|
|
287
288
|
hestia_earth/models/ipcc2019/ch4ToAirAquacultureSystems.py,sha256=q6yyEiYQhHJ2VyQy2Fa84cuTl1D8bjBXOK3UpaRuo20,3196
|
288
289
|
hestia_earth/models/ipcc2019/ch4ToAirEntericFermentation.py,sha256=8w78X5nJkPmoXuTy1WMxSGj-D5ubajNeqnyBknSqEtA,12477
|
289
290
|
hestia_earth/models/ipcc2019/ch4ToAirExcreta.py,sha256=UTTx7US4mGTGW9dX6OAgbhDSwtHfsbWJ5d0iF0TGMpE,6564
|
290
|
-
hestia_earth/models/ipcc2019/ch4ToAirFloodedRice.py,sha256=
|
291
|
-
hestia_earth/models/ipcc2019/
|
292
|
-
hestia_earth/models/ipcc2019/
|
293
|
-
hestia_earth/models/ipcc2019/
|
294
|
-
hestia_earth/models/ipcc2019/
|
295
|
-
hestia_earth/models/ipcc2019/
|
291
|
+
hestia_earth/models/ipcc2019/ch4ToAirFloodedRice.py,sha256=26WZtckmb7b3sbUN7hpshEdaSdvJpL3-Oer60III_KU,10225
|
292
|
+
hestia_earth/models/ipcc2019/ch4ToAirOrganicSoilCultivation.py,sha256=zLQklxpdgP2I_vuzUmUGfjXzXCnYkjogUltdtxtfva8,9509
|
293
|
+
hestia_earth/models/ipcc2019/co2ToAirAboveGroundBiomassStockChange.py,sha256=YRNjJgi_aBKwi-nDd0b20w3ebQ33vNgdf4zCLyTFcBw,6516
|
294
|
+
hestia_earth/models/ipcc2019/co2ToAirBelowGroundBiomassStockChange.py,sha256=5HdFdHkvMdwmA4ppSqbrAoASQaSX-Znq7WZqAaekqjk,6564
|
295
|
+
hestia_earth/models/ipcc2019/co2ToAirCarbonStockChange_utils.py,sha256=pJCdb8hysUbG9t8lOB4Nd2xGdlac_6Tg74k2CMU078o,58533
|
296
|
+
hestia_earth/models/ipcc2019/co2ToAirLimeHydrolysis.py,sha256=X3-M4Mn3fdGsUR7ZGjBXXWrPFBGD1ipV8_4O94lB7Z8,2487
|
297
|
+
hestia_earth/models/ipcc2019/co2ToAirOrganicSoilCultivation.py,sha256=xTN9Vy62bmzuPqSt7VS3tSVNnHYHtycDoi87UV8NfdQ,7568
|
298
|
+
hestia_earth/models/ipcc2019/co2ToAirSoilOrganicCarbonStockChange.py,sha256=4aRBzNpDNSw20IKNzz7zOq28sorrJUB5gxmHemgOZT0,6576
|
296
299
|
hestia_earth/models/ipcc2019/co2ToAirUreaHydrolysis.py,sha256=3TXZa2zuj-Df54qAPz3CUcml5T3MpAvGH8vDPIGha_c,3738
|
297
300
|
hestia_earth/models/ipcc2019/croppingDuration.py,sha256=wgXzEHsl2demqzKnZK6Ak7UKUu_CVU41ZsmwxG2uiOg,3055
|
298
301
|
hestia_earth/models/ipcc2019/ligninContent.py,sha256=Qh-UH4lv1TIf7wWlbAPwIZZHxzbbmQgND3m15pt5Si8,7285
|
@@ -304,6 +307,7 @@ hestia_earth/models/ipcc2019/n2OToAirInorganicFertiliserDirect.py,sha256=vmUhlNG
|
|
304
307
|
hestia_earth/models/ipcc2019/n2OToAirInorganicFertiliserIndirect.py,sha256=ilc6D3cgmvmdkmPbdbxS-SzsG2RQRNKaQooxbeLl43w,3714
|
305
308
|
hestia_earth/models/ipcc2019/n2OToAirOrganicFertiliserDirect.py,sha256=Tq0lw-zGqA6S9ZWi2OTSWXA7nVp_STJeNT4X8Cra2rU,4358
|
306
309
|
hestia_earth/models/ipcc2019/n2OToAirOrganicFertiliserIndirect.py,sha256=g2ssg9GEH2ShuNtY4g4R5GUIHf85u1azx4c264Hdoag,3700
|
310
|
+
hestia_earth/models/ipcc2019/n2OToAirOrganicSoilCultivationDirect.py,sha256=6H9mIJI-g0M6LeLaHxWM3yIBObAUL6uDBuVJCEfQ3Qg,5881
|
307
311
|
hestia_earth/models/ipcc2019/nh3ToAirInorganicFertiliser.py,sha256=gvfv4VBHmEkppEMoHUIicAelYICdOjKxKBUw5f3meiQ,4480
|
308
312
|
hestia_earth/models/ipcc2019/nh3ToAirOrganicFertiliser.py,sha256=Oih-34cGl7AZ_sIYWXktOWrzmj3_onvk3EW5f8-7QKI,4152
|
309
313
|
hestia_earth/models/ipcc2019/nitrogenContent.py,sha256=YxlcDF0D9F79rYHTeuhl5kEtmb01UcspFInKi6I_zKM,7209
|
@@ -318,6 +322,7 @@ hestia_earth/models/ipcc2019/organicCarbonPerHa.py,sha256=D8Lph5clGjXb5F7sk-jlnq
|
|
318
322
|
hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_1.py,sha256=8g1kJbxCnXAOFUdbB9zzMsuDOzMgvVy7A5MwtJvGUaY,78547
|
319
323
|
hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_2.py,sha256=UVf85mcq-cNqkNEldg7h6RY5qa0RAtlXVKeb-GaFmAA,68913
|
320
324
|
hestia_earth/models/ipcc2019/organicCarbonPerHa_utils.py,sha256=s_F3fyHhPuqragrHxluqdK0GCGnEor17jGlGKue0UsA,9867
|
325
|
+
hestia_earth/models/ipcc2019/organicSoilCultivation_utils.py,sha256=hRMzbGqscOcIO1MvD_31mbgxhVcPsvHtjJRcOCkEOhI,5405
|
321
326
|
hestia_earth/models/ipcc2019/pastureGrass.py,sha256=_EwlAooSfrkcSy4rl_rk4PpeX1pcIiQcb7HE2lQkyn8,9847
|
322
327
|
hestia_earth/models/ipcc2019/pastureGrass_utils.py,sha256=KvjIQ3xwbq1rk3thHlkGgQaWKgh0hCkNnzC53JW9634,14178
|
323
328
|
hestia_earth/models/ipcc2019/utils.py,sha256=MSDMu15D9DnilFUgi4_6jYXC0FaKso3OODauGTMB6hs,6229
|
@@ -438,7 +443,7 @@ hestia_earth/models/linkedImpactAssessment/utils.py,sha256=S1zlux02gU2Lajrtoq-zQ
|
|
438
443
|
hestia_earth/models/mocking/__init__.py,sha256=9VX50c-grz-snfd-7MBS0KfF7AadtbKuj7kK6PqtsgE,687
|
439
444
|
hestia_earth/models/mocking/build_mock_search.py,sha256=p15ccEUmkmLp1RiGNznxMz3OFHbI8P1-29ExuohiQN8,1355
|
440
445
|
hestia_earth/models/mocking/mock_search.py,sha256=ccFe_WrI73JElFmxp4hPNLCX7eeU--lBC1JFR901KJY,1069
|
441
|
-
hestia_earth/models/mocking/search-results.json,sha256=
|
446
|
+
hestia_earth/models/mocking/search-results.json,sha256=lDhLUw6th-m6HxfUcTO3kDsCECtQ4qWK2OcwgGrXPek,162881
|
442
447
|
hestia_earth/models/pooreNemecek2018/__init__.py,sha256=nPboL7ULJzL5nJD5q7q9VOZt_fxbKVm8fmn1Az5YkVY,417
|
443
448
|
hestia_earth/models/pooreNemecek2018/aboveGroundCropResidueTotal.py,sha256=Qt-mel4dkhK6N5uUOutNOinCTFjbjtGzITaaI0LvYc4,2396
|
444
449
|
hestia_earth/models/pooreNemecek2018/belowGroundCropResidue.py,sha256=JT0RybbvWVlo01FO8K0Yj41HrEaJT3Kj1xfayr2X-xw,2315
|
@@ -538,6 +543,7 @@ hestia_earth/models/schmidt2007/utils.py,sha256=tbTFg5TXAyS12JCa-OXQg37M1YymHxKW
|
|
538
543
|
hestia_earth/models/site/__init__.py,sha256=aVuLLhq0OQVm-_MZoq4JAKMidqexUWJBg_7mmojmDzc,405
|
539
544
|
hestia_earth/models/site/defaultMethodClassification.py,sha256=1EIWC99Fegu7B8GFlpysvWhuXaLDmABom3wDelIYUjc,1068
|
540
545
|
hestia_earth/models/site/defaultMethodClassificationDescription.py,sha256=4YXf8grO9Zf5N7bPomKAqXKPOa7JhmLCXm6sO53I4is,1213
|
546
|
+
hestia_earth/models/site/grouped_measurement.py,sha256=S5EHKbLJOH5jPhAawzddR6vsaxa1ny1Vzuj_CstpTcQ,4230
|
541
547
|
hestia_earth/models/site/measurement/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
542
548
|
hestia_earth/models/site/measurement/value.py,sha256=D09-nYYqAEQEaiaAnYtZQGp-JNP0CVFapDoIFj7iOTA,1484
|
543
549
|
hestia_earth/models/site/post_checks/__init__.py,sha256=wgAeEJ-1oeUZP5yS8_7n5PclohdQeP57xnHnXmmYCaI,310
|
@@ -578,16 +584,16 @@ hestia_earth/models/transformation/product/__init__.py,sha256=47DEQpj8HBSa-_TImW
|
|
578
584
|
hestia_earth/models/transformation/product/excreta.py,sha256=tggXIoUujzu8O949_3KFog219k_bQ0IcytpCsJ8oMcc,5384
|
579
585
|
hestia_earth/models/usetoxV2/__init__.py,sha256=pK37V3H-KvYcvRKw4Mv8CWrB2N0LFLzmv0jKLdhGGqs,409
|
580
586
|
hestia_earth/models/usetoxV2/freshwaterEcotoxicityPotentialCtue.py,sha256=pPX8u-Aq6Pg5Y9xw0CS0S2WkAHQpOMl0lL2tLQwwOuU,918
|
581
|
-
hestia_earth/models/utils/__init__.py,sha256=
|
587
|
+
hestia_earth/models/utils/__init__.py,sha256=hXSBcHSMYWjg_Fe_H5IVsxu_OmVCTummZ205t_GE6pY,6847
|
582
588
|
hestia_earth/models/utils/aggregated.py,sha256=gZLSY9D8MMr3VGZ2sai_5LTxdPMReuW3CXVpjPLS8xk,4807
|
583
589
|
hestia_earth/models/utils/animalProduct.py,sha256=M5IunAKGY6oZv3j1Ascl34ywyeLWApqOIlBzbtlA2FE,721
|
584
590
|
hestia_earth/models/utils/aquacultureManagement.py,sha256=dxrbC1Xf140cohxTbSw6TxLAnAASWTdNZwBBam4yQnw,171
|
585
591
|
hestia_earth/models/utils/array_builders.py,sha256=ko1pDZKaUudZqxOZ99vJamKAdoR6ND4ZmxVrYH6YjPc,19498
|
586
592
|
hestia_earth/models/utils/background_emissions.py,sha256=R0tCA63q1_2DaZ87oI7FFjZsxAZ4Zds3Rr4fDf9KhkM,1850
|
587
|
-
hestia_earth/models/utils/blank_node.py,sha256=
|
593
|
+
hestia_earth/models/utils/blank_node.py,sha256=AveekcsdZz7UNgLPQXrcFq30CjKA7H-WyWB3GbgwffQ,55963
|
588
594
|
hestia_earth/models/utils/cache_sources.py,sha256=MBkrPpjwNiC4ApDjeYVHZjWBbpvAerXRDrMHpjasAZ0,377
|
589
595
|
hestia_earth/models/utils/completeness.py,sha256=iRG4uviOAQQ4T2Nr4LlelPVTS_F1felGZNJYxek_JG8,1239
|
590
|
-
hestia_earth/models/utils/constant.py,sha256=
|
596
|
+
hestia_earth/models/utils/constant.py,sha256=DmB3VVuoh7Pz2QDBJqiUG6yAML2i0fOy1BPuPHmhT1w,3442
|
591
597
|
hestia_earth/models/utils/crop.py,sha256=JF9vsXOlViiwsIkV-mQ9iRl4dZGgeP2mrgdAmKuhYaY,2713
|
592
598
|
hestia_earth/models/utils/cropResidue.py,sha256=_0Q35CrliJeo31xGHsPWe8A2oHxijdIsOrf3gBEqhlA,612
|
593
599
|
hestia_earth/models/utils/cropResidueManagement.py,sha256=nIDFjf39rDD10UHSVudfDyu-EiL261g8jyrgS-2aDKw,347
|
@@ -613,9 +619,9 @@ hestia_earth/models/utils/method.py,sha256=ZYN2_Fyeiwr9pmvD84ZPg7ZHBlvaIY2A6XL4F
|
|
613
619
|
hestia_earth/models/utils/organicFertiliser.py,sha256=2HY-a0EBzUw4DkEAXClLMXVCEZTKYf0BwFHBo7lQ5Tg,363
|
614
620
|
hestia_earth/models/utils/pesticideAI.py,sha256=_mlhKnA1TxF-x39CPNnOGXk6754SoSQqrkHVH2y6rv8,2038
|
615
621
|
hestia_earth/models/utils/practice.py,sha256=GEu2G2yMPbcIHldOzgv5OFp8bQ1Jt9OFgj0c_0F_kUc,372
|
616
|
-
hestia_earth/models/utils/product.py,sha256=
|
622
|
+
hestia_earth/models/utils/product.py,sha256=Oha4lMvediC1Lc5DksA6sAUT94Q1Cs9F4LFVe_uaqP4,11177
|
617
623
|
hestia_earth/models/utils/productivity.py,sha256=rTJX_nemxHpOcPN7jiM2hFHknoLUIW8y-hFxVxIkg70,593
|
618
|
-
hestia_earth/models/utils/property.py,sha256=
|
624
|
+
hestia_earth/models/utils/property.py,sha256=3jeA__YBHZvIOqcfDmbV1IOLfqtU1pA74aVrEVcHsNE,5340
|
619
625
|
hestia_earth/models/utils/site.py,sha256=ZYCxaBXZ3Zh4judbzOM_E5SNROiMH-S2LEkkklN5HK4,4041
|
620
626
|
hestia_earth/models/utils/source.py,sha256=D_QlW7Ul_NV1iOucMNE3szT64b1RdSdecIEm6OukYhw,2459
|
621
627
|
hestia_earth/models/utils/stats.py,sha256=-0vvhSDAhp4ZYXD1l6sO2hdok8_HgUM6OjCSYGSTHqU,15291
|
@@ -823,7 +829,7 @@ tests/models/hestia/test_energyContentLowerHeatingValue.py,sha256=sjFrRFNMGvZy8i
|
|
823
829
|
tests/models/hestia/test_excretaKgMass.py,sha256=tY4he1xRDHZi976slnFra-4lRqWwogx2fXkpXfJxpOY,2924
|
824
830
|
tests/models/hestia/test_excretaKgN.py,sha256=7yuF9-nrwfkcmU_VsQtFBYSO92RqEDtUU9kdL0ERiUk,1091
|
825
831
|
tests/models/hestia/test_excretaKgVs.py,sha256=3dNFATeYM5LI1y3Q3m5cbazvNp-zMKLwtEDqcI3Dvhk,1094
|
826
|
-
tests/models/hestia/test_feedConversionRatio.py,sha256=
|
832
|
+
tests/models/hestia/test_feedConversionRatio.py,sha256=LgO9Tl4yHKh0XyTe9dXqt1ccqY2UFcrJh5fIUfFMq9w,2132
|
827
833
|
tests/models/hestia/test_flowingWater.py,sha256=0-70Iyr0HKQHHC5jFEF9LUQQZ23spOo5tFWXQ8kfR7w,1372
|
828
834
|
tests/models/hestia/test_freshWater.py,sha256=v2UD69csKrniKP3MXkOEHxQeE6O3-lvIViCvLA7Zgws,984
|
829
835
|
tests/models/hestia/test_inorganicFertiliser.py,sha256=v2Zs1Ig-ChOaq9gXuurcBt12izkH2bRUUuzW6rh3rqQ,643
|
@@ -842,6 +848,7 @@ tests/models/hestia/test_organicCarbonPerKgSoil.py,sha256=pHG4WrBW6j-NZp0sJ1wrk8
|
|
842
848
|
tests/models/hestia/test_organicCarbonPerM3Soil.py,sha256=lJ35Qsn-D1d6r_eR-SBTs68-_1l3_dIbaQKLUnfoc1Q,1089
|
843
849
|
tests/models/hestia/test_organicMatterPerKgSoil.py,sha256=WorZv3aGr4F5pnEwGbHdPqn-nmg9ydxF5v9uUBcWH1c,1089
|
844
850
|
tests/models/hestia/test_organicMatterPerM3Soil.py,sha256=x4qELmNSKQFTlt0mc6FrPlk-U0w_jPxZIlO5TNR6YTQ,1089
|
851
|
+
tests/models/hestia/test_pToSurfaceWaterAquacultureSystems.py,sha256=Wb3tWZpxOwL80bJ8-Gcv4rXRnA7gKpaUfLyiLXMIXeY,1745
|
845
852
|
tests/models/hestia/test_pastureGrass.py,sha256=L1xwPFXEzMVOKJho49NPFJXThdCHRbUdIP134kqZim4,1024
|
846
853
|
tests/models/hestia/test_pastureSystem.py,sha256=rYfngWC5-j2Tcdicjq9Ck92-ok5wjhPIXrincXVIU-M,1591
|
847
854
|
tests/models/hestia/test_potentialEvapotranspirationAnnual.py,sha256=xJhWAfy8ZMTzSTp_EZbMW-hTtCpk0VeOo_ymEdd52Wg,1026
|
@@ -857,7 +864,7 @@ tests/models/hestia/test_residueLeftOnField.py,sha256=asOZqi2PtKXESa2aCtcb_DORuk
|
|
857
864
|
tests/models/hestia/test_residueRemoved.py,sha256=FZ2zfI-uEDWXRs2tSg2B6qszphgY1pX-piGZTC4Xc40,1069
|
858
865
|
tests/models/hestia/test_salineWater.py,sha256=a-JNyzcAPlP-VAQnJbJ6igYWkZ0GCJT_CbpslChYUjc,987
|
859
866
|
tests/models/hestia/test_seed_emissions.py,sha256=dCUuJBkhwNFBhhcypQN7eMqrWZ9iGCnypoidO5DfQYw,921
|
860
|
-
tests/models/hestia/test_soilMeasurement.py,sha256=
|
867
|
+
tests/models/hestia/test_soilMeasurement.py,sha256=hLJ1wlYIopFzDd4bSuHV64vR2jo4v4Js7Rgso71BX7o,4381
|
861
868
|
tests/models/hestia/test_stockingDensityAnimalHousingAverage.py,sha256=ZKLKU75FoYHiKIXqDuXPpfPN06InLA8ZHJFtkkLBhOY,1311
|
862
869
|
tests/models/hestia/test_temperatureAnnual.py,sha256=vYqcZu2efQgWfCKXTCTse_9trmMzmBwPz6IN81NzRoI,994
|
863
870
|
tests/models/hestia/test_temperatureMonthly.py,sha256=3fuyr-bBmRAb8f9LRJg9W02DcgQ-eIIF2OaXo_aWJYs,993
|
@@ -907,14 +914,16 @@ tests/models/ipcc2019/test_belowGroundCropResidue.py,sha256=no71pfxgOhn_tEWc_Ewu
|
|
907
914
|
tests/models/ipcc2019/test_biomass_utils.py,sha256=I2q4pDGAD0aY_kpZCMPJoC-KbRYxdzY1rhr4xtJFWIA,3592
|
908
915
|
tests/models/ipcc2019/test_carbonContent.py,sha256=_GWF5nGy-PxiqBZ5V7W_sHMz75YRzmxr79R-sZZg7yk,4146
|
909
916
|
tests/models/ipcc2019/test_ch4ToAirAquacultureSystems.py,sha256=o7bHOS4JkwexRrDhLzpfr8nyYCctgRL32YZbam5RBrI,1891
|
910
|
-
tests/models/ipcc2019/test_ch4ToAirEntericFermentation.py,sha256=
|
917
|
+
tests/models/ipcc2019/test_ch4ToAirEntericFermentation.py,sha256=7v0a5CcdpHixRbe4jhhIH2t4hlNsZInlEoHuipUBseg,8571
|
911
918
|
tests/models/ipcc2019/test_ch4ToAirExcreta.py,sha256=e58NXmBW2SNVLUqQO9A66Xq6jiGTyhdFZDZk51JApF8,2902
|
912
919
|
tests/models/ipcc2019/test_ch4ToAirFloodedRice.py,sha256=YRyxNaGPAgsCJBRXhwhEsZ6r44dawHMSN-Qmi-yS0xI,1025
|
913
|
-
tests/models/ipcc2019/
|
914
|
-
tests/models/ipcc2019/
|
920
|
+
tests/models/ipcc2019/test_ch4ToAirOrganicSoilCultivation.py,sha256=HJNE-M38eXCvjTDfOj70XlevSQgXut8w5EDzj1HKeyY,1703
|
921
|
+
tests/models/ipcc2019/test_co2ToAirAboveGroundBiomassStockChange.py,sha256=1lei99xqneCU3a_2fOTcnAmRKKN6_mYU7uOyfLhXqJ4,4546
|
922
|
+
tests/models/ipcc2019/test_co2ToAirBelowGroundBiomassStockChange.py,sha256=ZoxBDNmNXutv5MUfKzoASCeBTEavjRC75ZSI0irWSG0,4481
|
915
923
|
tests/models/ipcc2019/test_co2ToAirCarbonStockChange_utils.py,sha256=wCEtrbMl6zef8V-n_Ci_rtlQAlfuKm3khUVltr8eAcc,2173
|
916
|
-
tests/models/ipcc2019/test_co2ToAirLimeHydrolysis.py,sha256=
|
917
|
-
tests/models/ipcc2019/
|
924
|
+
tests/models/ipcc2019/test_co2ToAirLimeHydrolysis.py,sha256=r7QmCH0YURS41JZxH2mFAC0J29WqmdkKG9EoEgv27AA,1350
|
925
|
+
tests/models/ipcc2019/test_co2ToAirOrganicSoilCultivation.py,sha256=7LVoMpEP_byDXlaHARUJsjJA1JJ9btF0CU4rX3v8Y3w,1705
|
926
|
+
tests/models/ipcc2019/test_co2ToAirSoilOrganicCarbonStockChange.py,sha256=gPT_yyQBRoISSizW-7qE32VEeFXxsc55K3-3eZMJlOU,5688
|
918
927
|
tests/models/ipcc2019/test_co2ToAirUreaHydrolysis.py,sha256=MmtEME0xjsa3KojFk_fxOLK6RZM_6p5HIpY2DOFHVu4,1530
|
919
928
|
tests/models/ipcc2019/test_croppingDuration.py,sha256=1oRW1QaEwQvBadyVhaDi-jlkjuNqodyAinl88TdPmiY,1879
|
920
929
|
tests/models/ipcc2019/test_ligninContent.py,sha256=eIKEN__ab-0R52EhlhPSBiHnmTl6xOf1XbI33O-W9A4,4146
|
@@ -926,6 +935,7 @@ tests/models/ipcc2019/test_n2OToAirInorganicFertiliserDirect.py,sha256=uSdklDRTx
|
|
926
935
|
tests/models/ipcc2019/test_n2OToAirInorganicFertiliserIndirect.py,sha256=RnU8CkUCYBBO1bgJALnoVgjTHLL1L1sja2nsyeVA_cg,2113
|
927
936
|
tests/models/ipcc2019/test_n2OToAirOrganicFertiliserDirect.py,sha256=ofEcYrwvvXfoZHRWaaMtKMK2NbEtX_67laDeu_lDTXg,2714
|
928
937
|
tests/models/ipcc2019/test_n2OToAirOrganicFertiliserIndirect.py,sha256=hW84sTlhB8mKRSFJX_iQS4gYo74zCtY-9zr1VHLC5GU,2111
|
938
|
+
tests/models/ipcc2019/test_n2OToAirOrganicSoilCultivationDirect.py,sha256=cuBSXRDJSjwsHtMTIVFyjFpWpivG0ZwLXKOMHaLDDWY,1710
|
929
939
|
tests/models/ipcc2019/test_nh3ToAirInorganicFertiliser.py,sha256=xmRHSTmyh--EZX29Z5NHD4LqEZl7Lkc5HntBCXlIRHE,1537
|
930
940
|
tests/models/ipcc2019/test_nh3ToAirOrganicFertiliser.py,sha256=Z4a20I2UnZdzm6FqHnlHRXXVCY993_SHT7nG-zAhx-c,1104
|
931
941
|
tests/models/ipcc2019/test_nitrogenContent.py,sha256=rKl_05PCC0OSsAhG0cHJOqnt9LsCaFnRpJorkm1TShA,3704
|
@@ -1150,6 +1160,7 @@ tests/models/schmidt2007/test_utils.py,sha256=rmtOV3xiFynjgx8lQNGsJqquG8HDxz3LDm
|
|
1150
1160
|
tests/models/site/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1151
1161
|
tests/models/site/test_defaultMethodClassification.py,sha256=MoG9inlu5GrNL2QJpO0AWJZpc4682zDnO8-0mVgeV88,667
|
1152
1162
|
tests/models/site/test_defaultMethodClassificationDescription.py,sha256=7Dg40MLSZnW1X3ZXg2dXMzc1hUqIUIuiga5KX9cVscU,767
|
1163
|
+
tests/models/site/test_grouped_measurement.py,sha256=k63n5rWhamlztPw9-NAPQ6oYL8g5mZGWu4UoFl4RnEM,657
|
1153
1164
|
tests/models/site/measurement/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1154
1165
|
tests/models/site/measurement/test_value.py,sha256=i6w7X0Qb9utIGeopjQLz4S3tBrXVVFzZTh2q1JSxXu0,1001
|
1155
1166
|
tests/models/site/post_checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -1230,8 +1241,8 @@ tests/orchestrator/strategies/run/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
|
|
1230
1241
|
tests/orchestrator/strategies/run/test_add_blank_node_if_missing.py,sha256=K4xg4UAXfNhSaLyknKVPO7MGBF44Z_gD7CuZ_pe28gU,3512
|
1231
1242
|
tests/orchestrator/strategies/run/test_add_key_if_missing.py,sha256=hKwvk1ohcBVnQUCTiDhRW99J0xEa29BpwFi1KC0yWLE,329
|
1232
1243
|
tests/orchestrator/strategies/run/test_always.py,sha256=w5-Dhp6yLzgZGAeMRz3OrqZbbAed9gZ1O266a3z9k7w,134
|
1233
|
-
hestia_earth_models-0.70.
|
1234
|
-
hestia_earth_models-0.70.
|
1235
|
-
hestia_earth_models-0.70.
|
1236
|
-
hestia_earth_models-0.70.
|
1237
|
-
hestia_earth_models-0.70.
|
1244
|
+
hestia_earth_models-0.70.2.dist-info/LICENSE,sha256=TD25LoiRJsA5CPUNrcyt1PXlGcbUGFMAeZoBcfCrCNE,1154
|
1245
|
+
hestia_earth_models-0.70.2.dist-info/METADATA,sha256=vzarmK_NB5tg_ymkLsxwangcpt6RyzbBcGrm81A39BQ,4045
|
1246
|
+
hestia_earth_models-0.70.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
1247
|
+
hestia_earth_models-0.70.2.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
|
1248
|
+
hestia_earth_models-0.70.2.dist-info/RECORD,,
|
@@ -9,12 +9,11 @@ class_path = f"hestia_earth.models.{MODEL}.feedConversionRatio"
|
|
9
9
|
fixtures_folder = f"{fixtures_path}/{MODEL}/feedConversionRatio"
|
10
10
|
|
11
11
|
TERMS_BY_ID = {
|
12
|
-
'energyContentHigherHeatingValue': {'units': 'MJ / kg'}
|
13
|
-
'crudeProteinContent': {'units': '%'},
|
12
|
+
'energyContentHigherHeatingValue': {'units': 'MJ / kg'}
|
14
13
|
}
|
15
14
|
|
16
15
|
|
17
|
-
def fake_download_term(term_id: str, *args): return TERMS_BY_ID
|
16
|
+
def fake_download_term(term_id: str, *args): return TERMS_BY_ID.get(term_id, {'@id': term_id, 'units': '%'})
|
18
17
|
|
19
18
|
|
20
19
|
@patch(f"{class_path}.get_total_value_converted_with_min_ratio", return_value=10)
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import os
|
2
|
+
import json
|
3
|
+
import pytest
|
4
|
+
from unittest.mock import Mock, patch
|
5
|
+
from tests.utils import fixtures_path, fake_new_emission
|
6
|
+
|
7
|
+
from hestia_earth.models.hestia.pToSurfaceWaterAquacultureSystems import MODEL, TERM_ID, run, _should_run
|
8
|
+
|
9
|
+
class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
|
10
|
+
fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
|
11
|
+
_folders = [d for d in os.listdir(fixtures_folder) if os.path.isdir(os.path.join(fixtures_folder, d))]
|
12
|
+
|
13
|
+
|
14
|
+
def _fake_download_term(term_id, *args):
|
15
|
+
return {'@id': term_id, 'units': '%'}
|
16
|
+
|
17
|
+
|
18
|
+
@pytest.mark.parametrize(
|
19
|
+
'test_name,cycle,expected_should_run',
|
20
|
+
[
|
21
|
+
(
|
22
|
+
'incomplete => no run',
|
23
|
+
{},
|
24
|
+
False
|
25
|
+
),
|
26
|
+
(
|
27
|
+
'complete => run',
|
28
|
+
{
|
29
|
+
'completeness': {
|
30
|
+
'animalFeed': True,
|
31
|
+
'product': True,
|
32
|
+
'fertiliser': True,
|
33
|
+
'liveAnimalInput': True,
|
34
|
+
}
|
35
|
+
},
|
36
|
+
True
|
37
|
+
),
|
38
|
+
]
|
39
|
+
)
|
40
|
+
def test_should_run(test_name, cycle, expected_should_run):
|
41
|
+
should_run = _should_run(cycle)
|
42
|
+
assert should_run == expected_should_run, test_name
|
43
|
+
|
44
|
+
|
45
|
+
@pytest.mark.parametrize('folder', _folders)
|
46
|
+
@patch('hestia_earth.models.utils.property.download_term', side_effect=_fake_download_term)
|
47
|
+
@patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
|
48
|
+
def test_run(mock_new_emission: Mock, mock_download_term: Mock, folder):
|
49
|
+
with open(f"{fixtures_folder}/{folder}/cycle.jsonld", encoding='utf-8') as f:
|
50
|
+
cycle = json.load(f)
|
51
|
+
|
52
|
+
with open(f"{fixtures_folder}/{folder}/result.jsonld", encoding='utf-8') as f:
|
53
|
+
expected = json.load(f)
|
54
|
+
|
55
|
+
value = run(cycle)
|
56
|
+
assert value == expected, folder
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
import os
|
2
|
+
from unittest.mock import Mock, patch
|
2
3
|
import json
|
3
4
|
import pytest
|
4
5
|
|
@@ -14,6 +15,7 @@ from hestia_earth.models.hestia.soilMeasurement import (
|
|
14
15
|
|
15
16
|
class_path = f"hestia_earth.models.{MODEL}.{MODEL_KEY}"
|
16
17
|
fixtures_folder = f"{fixtures_path}/{MODEL}/soilMeasurement"
|
18
|
+
_folders = [d for d in os.listdir(fixtures_folder) if os.path.isdir(os.path.join(fixtures_folder, d))]
|
17
19
|
|
18
20
|
|
19
21
|
@pytest.mark.parametrize(
|
@@ -140,25 +142,15 @@ def test_should_run(test_name, site, expected_should_run):
|
|
140
142
|
assert should_run == expected_should_run, test_name
|
141
143
|
|
142
144
|
|
143
|
-
@pytest.mark.parametrize(
|
144
|
-
"test_name",
|
145
|
-
[
|
146
|
-
"missing-depth",
|
147
|
-
"missing-value",
|
148
|
-
"simple-soilPh",
|
149
|
-
"clayContent",
|
150
|
-
"non-unique-measurements",
|
151
|
-
"arrays",
|
152
|
-
"standard-intervals"
|
153
|
-
]
|
154
|
-
)
|
145
|
+
@pytest.mark.parametrize('folder', _folders)
|
155
146
|
@patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
|
156
|
-
def test_run(mock_new_measurement,
|
157
|
-
with open(f"{fixtures_folder}/{
|
147
|
+
def test_run(mock_new_measurement: Mock, folder):
|
148
|
+
with open(f"{fixtures_folder}/{folder}/site.jsonld", encoding='utf-8') as f:
|
158
149
|
site = json.load(f)
|
159
150
|
|
160
|
-
with open(f"{fixtures_folder}/{
|
161
|
-
|
151
|
+
with open(f"{fixtures_folder}/{folder}/result.jsonld", encoding='utf-8') as f:
|
152
|
+
expected = json.load(f)
|
162
153
|
|
163
|
-
|
164
|
-
|
154
|
+
result = run(site)
|
155
|
+
print(json.dumps(result, indent=2))
|
156
|
+
assert result == expected, folder
|
@@ -8,15 +8,12 @@ class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
|
|
8
8
|
fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
|
9
9
|
|
10
10
|
TERMS_BY_ID = {
|
11
|
-
'energyContentHigherHeatingValue': {'units': 'MJ / kg'}
|
12
|
-
'energyDigestibilityRuminants': {'units': '%'},
|
13
|
-
'energyDigestibilityPoultry': {'units': '%'},
|
14
|
-
'neutralDetergentFibreContent': {'units': '%'}
|
11
|
+
'energyContentHigherHeatingValue': {'units': 'MJ / kg'}
|
15
12
|
}
|
16
13
|
IONOPHORE_TERMS = ['ionophores', 'ionophoreAntibiotics']
|
17
14
|
|
18
15
|
|
19
|
-
def fake_download_term(term_id: str, *args): return TERMS_BY_ID
|
16
|
+
def fake_download_term(term_id: str, *args): return TERMS_BY_ID.get(term_id, {'@id': term_id, 'units': '%'})
|
20
17
|
|
21
18
|
|
22
19
|
@patch(f"{class_path}.get_ionophore_terms", return_value=IONOPHORE_TERMS)
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import json
|
2
|
+
from pytest import mark
|
3
|
+
from unittest.mock import MagicMock, patch
|
4
|
+
|
5
|
+
from hestia_earth.models.ipcc2019.ch4ToAirOrganicSoilCultivation import MODEL, TERM_ID, _should_run, run
|
6
|
+
from tests.utils import fake_new_emission, fixtures_path
|
7
|
+
|
8
|
+
class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
|
9
|
+
fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
|
10
|
+
|
11
|
+
# subfolder, should_run
|
12
|
+
PARAMS_SHOULD_RUN = [
|
13
|
+
("acacia", True),
|
14
|
+
("annual-crops", True),
|
15
|
+
("grassland", True),
|
16
|
+
("oil-palm", True),
|
17
|
+
("other", False),
|
18
|
+
("paddy-rice-cultivation", True),
|
19
|
+
("perennial-crops", True),
|
20
|
+
("sago-palm", True),
|
21
|
+
("polar", False),
|
22
|
+
("mineral-soil", True),
|
23
|
+
("unknown-soil", False),
|
24
|
+
("unknown-land-occupation", False)
|
25
|
+
]
|
26
|
+
IDS_SHOULD_RUN = [p[0] for p in PARAMS_SHOULD_RUN]
|
27
|
+
|
28
|
+
|
29
|
+
@mark.parametrize("subfolder, expected", PARAMS_SHOULD_RUN, ids=IDS_SHOULD_RUN)
|
30
|
+
def test_should_run(
|
31
|
+
subfolder: str,
|
32
|
+
expected: bool
|
33
|
+
):
|
34
|
+
folder = f"{fixtures_folder}/{subfolder}"
|
35
|
+
|
36
|
+
with open(f"{folder}/cycle.jsonld", encoding="utf-8") as f:
|
37
|
+
cycle = json.load(f)
|
38
|
+
|
39
|
+
result, *_ = _should_run(cycle)
|
40
|
+
assert result == expected
|
41
|
+
|
42
|
+
|
43
|
+
PARAMS_RUN = [subfolder for subfolder, should_run in PARAMS_SHOULD_RUN if should_run]
|
44
|
+
|
45
|
+
|
46
|
+
@mark.parametrize("subfolder", PARAMS_RUN)
|
47
|
+
@patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
|
48
|
+
def test_run(
|
49
|
+
_mock_new_emission: MagicMock,
|
50
|
+
subfolder: str
|
51
|
+
):
|
52
|
+
folder = f"{fixtures_folder}/{subfolder}"
|
53
|
+
|
54
|
+
with open(f"{folder}/cycle.jsonld", encoding="utf-8") as f:
|
55
|
+
cycle = json.load(f)
|
56
|
+
|
57
|
+
with open(f"{folder}/result.jsonld", encoding="utf-8") as f:
|
58
|
+
expected = json.load(f)
|
59
|
+
|
60
|
+
result = run(cycle)
|
61
|
+
assert result == expected
|
@@ -35,15 +35,17 @@ RUN_SCENARIOS = [
|
|
35
35
|
("overlapping-cycles", 4),
|
36
36
|
("complex-overlapping-cycles", 5),
|
37
37
|
("missing-measurement-dates", 3),
|
38
|
-
("no-biomass-measurements", 1), # Closes
|
39
|
-
("non-consecutive-biomass-measurements", 1), # Closes
|
40
|
-
("multiple-method-classifications", 5), # Closes
|
41
|
-
("non-soil-based-gohac-system", 3), # Closes
|
42
|
-
("soil-based-gohac-system", 3), # Closes
|
43
|
-
("with-gapfilled-start-date-end-date", 1), # Closes
|
44
|
-
("forest-to-orchard-with-ground-cover", 3), # Closes
|
45
|
-
("orchard-data-complete", 3), # Closes
|
46
|
-
("orchard-data-partially-complete", 3)
|
38
|
+
("no-biomass-measurements", 1), # Closes #700
|
39
|
+
("non-consecutive-biomass-measurements", 1), # Closes #827
|
40
|
+
("multiple-method-classifications", 5), # Closes #764
|
41
|
+
("non-soil-based-gohac-system", 3), # Closes #848
|
42
|
+
("soil-based-gohac-system", 3), # Closes #848
|
43
|
+
("with-gapfilled-start-date-end-date", 1), # Closes #972
|
44
|
+
("forest-to-orchard-with-ground-cover", 3), # Closes #989
|
45
|
+
("orchard-data-complete", 3), # Closes #1011
|
46
|
+
("orchard-data-partially-complete", 3), # Closes #1011
|
47
|
+
("no-measurements-data-complete", 1), # Closes #1227
|
48
|
+
("no-measurements-data-incomplete", 1) # Closes #1227
|
47
49
|
]
|
48
50
|
"""List of (subfolder: str, num_cycles: int)."""
|
49
51
|
|
@@ -35,14 +35,16 @@ RUN_SCENARIOS = [
|
|
35
35
|
("overlapping-cycles", 4),
|
36
36
|
("complex-overlapping-cycles", 5),
|
37
37
|
("missing-measurement-dates", 3),
|
38
|
-
("no-biomass-measurements", 1), # Closes
|
39
|
-
("non-consecutive-biomass-measurements", 1), # Closes
|
40
|
-
("multiple-method-classifications", 5), # Closes
|
41
|
-
("non-soil-based-gohac-system", 3), # Closes
|
42
|
-
("with-gapfilled-start-date-end-date", 1), # Closes
|
43
|
-
("forest-to-orchard-with-ground-cover", 3), # Closes
|
44
|
-
("orchard-data-complete", 3), # Closes
|
45
|
-
("orchard-data-partially-complete", 3)
|
38
|
+
("no-biomass-measurements", 1), # Closes #700
|
39
|
+
("non-consecutive-biomass-measurements", 1), # Closes #827
|
40
|
+
("multiple-method-classifications", 5), # Closes #764
|
41
|
+
("non-soil-based-gohac-system", 3), # Closes #848
|
42
|
+
("with-gapfilled-start-date-end-date", 1), # Closes #972
|
43
|
+
("forest-to-orchard-with-ground-cover", 3), # Closes #989
|
44
|
+
("orchard-data-complete", 3), # Closes #1011
|
45
|
+
("orchard-data-partially-complete", 3), # Closes #1011
|
46
|
+
("no-measurements-data-complete", 1), # Closes #1227
|
47
|
+
("no-measurements-data-incomplete", 1) # Closes #1227
|
46
48
|
]
|
47
49
|
"""List of (subfolder: str, num_cycles: int)."""
|
48
50
|
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import json
|
2
|
+
from pytest import mark
|
3
|
+
from unittest.mock import MagicMock, patch
|
4
|
+
|
5
|
+
from hestia_earth.models.ipcc2019.co2ToAirOrganicSoilCultivation import MODEL, TERM_ID, _should_run, run
|
6
|
+
from tests.utils import fake_new_emission, fixtures_path
|
7
|
+
|
8
|
+
class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
|
9
|
+
fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
|
10
|
+
|
11
|
+
|
12
|
+
# subfolder, should_run
|
13
|
+
PARAMS_SHOULD_RUN = [
|
14
|
+
("acacia", True),
|
15
|
+
("annual-crops", True),
|
16
|
+
("grassland", True),
|
17
|
+
("oil-palm", True),
|
18
|
+
("other", False),
|
19
|
+
("paddy-rice-cultivation", True),
|
20
|
+
("perennial-crops", True),
|
21
|
+
("sago-palm", True),
|
22
|
+
("polar", False),
|
23
|
+
("mineral-soil", True),
|
24
|
+
("unknown-soil", False),
|
25
|
+
("unknown-land-occupation", False)
|
26
|
+
]
|
27
|
+
IDS_SHOULD_RUN = [p[0] for p in PARAMS_SHOULD_RUN]
|
28
|
+
|
29
|
+
|
30
|
+
@mark.parametrize("subfolder, expected", PARAMS_SHOULD_RUN, ids=IDS_SHOULD_RUN)
|
31
|
+
def test_should_run(
|
32
|
+
subfolder: str,
|
33
|
+
expected: bool
|
34
|
+
):
|
35
|
+
folder = f"{fixtures_folder}/{subfolder}"
|
36
|
+
|
37
|
+
with open(f"{folder}/cycle.jsonld", encoding="utf-8") as f:
|
38
|
+
cycle = json.load(f)
|
39
|
+
|
40
|
+
result, *_ = _should_run(cycle)
|
41
|
+
assert result == expected
|
42
|
+
|
43
|
+
|
44
|
+
PARAMS_RUN = [subfolder for subfolder, should_run in PARAMS_SHOULD_RUN if should_run]
|
45
|
+
|
46
|
+
|
47
|
+
@mark.parametrize("subfolder", PARAMS_RUN)
|
48
|
+
@patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
|
49
|
+
def test_run(
|
50
|
+
_mock_new_emission: MagicMock,
|
51
|
+
subfolder: str,
|
52
|
+
):
|
53
|
+
folder = f"{fixtures_folder}/{subfolder}"
|
54
|
+
|
55
|
+
with open(f"{folder}/cycle.jsonld", encoding="utf-8") as f:
|
56
|
+
cycle = json.load(f)
|
57
|
+
|
58
|
+
with open(f"{folder}/result.jsonld", encoding="utf-8") as f:
|
59
|
+
expected = json.load(f)
|
60
|
+
|
61
|
+
result = run(cycle)
|
62
|
+
assert result == expected
|
@@ -59,15 +59,17 @@ RUN_SCENARIOS = [
|
|
59
59
|
("overlapping-cycles", 4),
|
60
60
|
("complex-overlapping-cycles", 5),
|
61
61
|
("missing-measurement-dates", 3),
|
62
|
-
("no-organic-carbon-measurements", 1), # Closes
|
63
|
-
("non-consecutive-organic-carbon-measurements", 1), # Closes
|
64
|
-
("multiple-method-classifications", 5), # Closes
|
65
|
-
("non-soil-based-gohac-system", 3), # Closes
|
66
|
-
("with-gapfilled-start-date-end-date", 1), # Closes
|
67
|
-
("forest-to-orchard-with-ground-cover", 3), # Closes
|
68
|
-
("orchard-data-complete", 3),
|
69
|
-
("orchard-data-partially-complete", 3),
|
70
|
-
("with-linalgerror", 1)
|
62
|
+
("no-organic-carbon-measurements", 1), # Closes #700
|
63
|
+
("non-consecutive-organic-carbon-measurements", 1), # Closes #827
|
64
|
+
("multiple-method-classifications", 5), # Closes #764
|
65
|
+
("non-soil-based-gohac-system", 3), # Closes #848
|
66
|
+
("with-gapfilled-start-date-end-date", 1), # Closes #972
|
67
|
+
("forest-to-orchard-with-ground-cover", 3), # Closes #989
|
68
|
+
("orchard-data-complete", 3), # Closes #1011
|
69
|
+
("orchard-data-partially-complete", 3), # Closes #1011
|
70
|
+
("with-linalgerror", 1),
|
71
|
+
("no-measurements-data-complete", 1), # Closes #1227
|
72
|
+
("no-measurements-data-incomplete", 1) # Closes #1227
|
71
73
|
]
|
72
74
|
"""List of (subfolder: str, num_cycles: int)."""
|
73
75
|
|