hestia-earth-models 0.54.2__py3-none-any.whl → 0.54.3__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/ipcc2019/organicCarbonPerHa.py +13 -14
- hestia_earth/models/mocking/search-results.json +66 -54
- hestia_earth/models/site/pre_checks/cache_geospatialDatabase.py +1 -1
- hestia_earth/models/utils/measurement.py +1 -1
- hestia_earth/models/version.py +1 -1
- {hestia_earth_models-0.54.2.dist-info → hestia_earth_models-0.54.3.dist-info}/METADATA +1 -1
- {hestia_earth_models-0.54.2.dist-info → hestia_earth_models-0.54.3.dist-info}/RECORD +11 -11
- tests/models/ipcc2019/test_organicCarbonPerHa.py +32 -4
- {hestia_earth_models-0.54.2.dist-info → hestia_earth_models-0.54.3.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.54.2.dist-info → hestia_earth_models-0.54.3.dist-info}/WHEEL +0 -0
- {hestia_earth_models-0.54.2.dist-info → hestia_earth_models-0.54.3.dist-info}/top_level.txt +0 -0
|
@@ -1541,7 +1541,7 @@ def _check_consecutive(ints: list[int]) -> bool:
|
|
|
1541
1541
|
bool
|
|
1542
1542
|
Whether or not the list of integers is consecutive.
|
|
1543
1543
|
"""
|
|
1544
|
-
range_list = list(range(min(ints), max(ints)+1))
|
|
1544
|
+
range_list = list(range(min(ints), max(ints)+1)) if ints else []
|
|
1545
1545
|
return all(a == b for a, b in zip(ints, range_list))
|
|
1546
1546
|
|
|
1547
1547
|
|
|
@@ -1941,38 +1941,37 @@ def _should_run_tier_2(
|
|
|
1941
1941
|
grouped_data.items()
|
|
1942
1942
|
))
|
|
1943
1943
|
|
|
1944
|
-
|
|
1945
|
-
|
|
1944
|
+
timestamps = list(complete_data)
|
|
1945
|
+
start_year = timestamps[0] if timestamps else 0
|
|
1946
|
+
end_year = timestamps[-1] if timestamps else 0
|
|
1946
1947
|
|
|
1947
1948
|
measurements = site.get('measurements', [])
|
|
1948
1949
|
|
|
1949
|
-
|
|
1950
|
+
sand_content_value, _ = most_relevant_measurement_value_by_depth_and_date(
|
|
1950
1951
|
measurements,
|
|
1951
1952
|
SAND_CONTENT_TERM_ID,
|
|
1952
1953
|
f"{start_year}-12-31",
|
|
1953
1954
|
DEPTH_UPPER,
|
|
1954
1955
|
DEPTH_LOWER,
|
|
1955
1956
|
depth_strict=False
|
|
1956
|
-
)
|
|
1957
|
-
sand_content =
|
|
1957
|
+
) if timestamps else (None, None)
|
|
1958
|
+
sand_content = sand_content_value/100 if sand_content_value else None
|
|
1958
1959
|
|
|
1959
|
-
|
|
1960
|
+
initial_soc_stock_value, initial_soc_stock_date = most_relevant_measurement_value_by_depth_and_date(
|
|
1960
1961
|
measurements,
|
|
1961
1962
|
TERM_ID,
|
|
1962
1963
|
f"{end_year}-12-31",
|
|
1963
1964
|
DEPTH_UPPER,
|
|
1964
1965
|
DEPTH_LOWER,
|
|
1965
1966
|
depth_strict=True
|
|
1966
|
-
)
|
|
1967
|
+
) if timestamps else (None, None)
|
|
1967
1968
|
|
|
1968
|
-
run_with_initial_soc_stock = bool(
|
|
1969
|
+
run_with_initial_soc_stock = bool(initial_soc_stock_value and initial_soc_stock_date)
|
|
1969
1970
|
|
|
1970
|
-
initial_soc_stock = initial_soc_stock_data[0] if run_with_initial_soc_stock else None
|
|
1971
|
-
initial_soc_stock_date = initial_soc_stock_data[1] if run_with_initial_soc_stock else None
|
|
1972
1971
|
run_in_period = (
|
|
1973
1972
|
int(abs(diff_in_years(f"{start_year}-12-31", initial_soc_stock_date)) + 1)
|
|
1974
1973
|
if run_with_initial_soc_stock else MIN_RUN_IN_PERIOD
|
|
1975
|
-
)
|
|
1974
|
+
) if timestamps else 0
|
|
1976
1975
|
|
|
1977
1976
|
timestamps = list(complete_data.keys())
|
|
1978
1977
|
temperatures = [complete_data[year][_InnerKey.TEMPERATURES] for year in timestamps]
|
|
@@ -1988,7 +1987,7 @@ def _should_run_tier_2(
|
|
|
1988
1987
|
should_run_t,
|
|
1989
1988
|
should_run_w,
|
|
1990
1989
|
should_run_c,
|
|
1991
|
-
0 < sand_content <= 1,
|
|
1990
|
+
sand_content is not None and 0 < sand_content <= 1,
|
|
1992
1991
|
run_in_period >= MIN_RUN_IN_PERIOD,
|
|
1993
1992
|
len(timestamps) >= run_in_period,
|
|
1994
1993
|
check_cycle_site_ids_identical(cycles),
|
|
@@ -2017,7 +2016,7 @@ def _should_run_tier_2(
|
|
|
2017
2016
|
sand_content,
|
|
2018
2017
|
is_irrigateds,
|
|
2019
2018
|
run_in_period,
|
|
2020
|
-
|
|
2019
|
+
initial_soc_stock_value
|
|
2021
2020
|
)
|
|
2022
2021
|
|
|
2023
2022
|
|
|
@@ -821,11 +821,11 @@
|
|
|
821
821
|
},
|
|
822
822
|
{
|
|
823
823
|
"@type": "Term",
|
|
824
|
-
"@id": "
|
|
824
|
+
"@id": "residueIncorporated"
|
|
825
825
|
},
|
|
826
826
|
{
|
|
827
827
|
"@type": "Term",
|
|
828
|
-
"@id": "
|
|
828
|
+
"@id": "residueIncorporatedLessThan30DaysBeforeCultivation"
|
|
829
829
|
},
|
|
830
830
|
{
|
|
831
831
|
"@type": "Term",
|
|
@@ -938,15 +938,15 @@
|
|
|
938
938
|
},
|
|
939
939
|
{
|
|
940
940
|
"@type": "Term",
|
|
941
|
-
"@id": "
|
|
941
|
+
"@id": "digestibleEnergyPigs"
|
|
942
942
|
},
|
|
943
943
|
{
|
|
944
944
|
"@type": "Term",
|
|
945
|
-
"@id": "
|
|
945
|
+
"@id": "digestibleEnergySalmonids"
|
|
946
946
|
},
|
|
947
947
|
{
|
|
948
948
|
"@type": "Term",
|
|
949
|
-
"@id": "
|
|
949
|
+
"@id": "digestibleEnergyPoultry"
|
|
950
950
|
},
|
|
951
951
|
{
|
|
952
952
|
"@type": "Term",
|
|
@@ -1024,7 +1024,11 @@
|
|
|
1024
1024
|
"results": [
|
|
1025
1025
|
{
|
|
1026
1026
|
"@type": "Term",
|
|
1027
|
-
"@id": "
|
|
1027
|
+
"@id": "excretaDeerKgN"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"@type": "Term",
|
|
1031
|
+
"@id": "excretaSolidFishCrustaceansKgN"
|
|
1028
1032
|
},
|
|
1029
1033
|
{
|
|
1030
1034
|
"@type": "Term",
|
|
@@ -1032,7 +1036,11 @@
|
|
|
1032
1036
|
},
|
|
1033
1037
|
{
|
|
1034
1038
|
"@type": "Term",
|
|
1035
|
-
"@id": "
|
|
1039
|
+
"@id": "excretaGoatsKgN"
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
"@type": "Term",
|
|
1043
|
+
"@id": "excretaBeefCattleExceptFeedlotFedKgN"
|
|
1036
1044
|
},
|
|
1037
1045
|
{
|
|
1038
1046
|
"@type": "Term",
|
|
@@ -1040,7 +1048,7 @@
|
|
|
1040
1048
|
},
|
|
1041
1049
|
{
|
|
1042
1050
|
"@type": "Term",
|
|
1043
|
-
"@id": "
|
|
1051
|
+
"@id": "excretaInsectsKgN"
|
|
1044
1052
|
},
|
|
1045
1053
|
{
|
|
1046
1054
|
"@type": "Term",
|
|
@@ -1056,23 +1064,19 @@
|
|
|
1056
1064
|
},
|
|
1057
1065
|
{
|
|
1058
1066
|
"@type": "Term",
|
|
1059
|
-
"@id": "
|
|
1067
|
+
"@id": "excretaSolidAndLiquidFishCrustaceansKgN"
|
|
1060
1068
|
},
|
|
1061
1069
|
{
|
|
1062
1070
|
"@type": "Term",
|
|
1063
1071
|
"@id": "excretaBuffaloKgN"
|
|
1064
1072
|
},
|
|
1065
|
-
{
|
|
1066
|
-
"@type": "Term",
|
|
1067
|
-
"@id": "excretaSolidAndLiquidFishCrustaceansKgN"
|
|
1068
|
-
},
|
|
1069
1073
|
{
|
|
1070
1074
|
"@type": "Term",
|
|
1071
1075
|
"@id": "excretaTurkeysKgN"
|
|
1072
1076
|
},
|
|
1073
1077
|
{
|
|
1074
1078
|
"@type": "Term",
|
|
1075
|
-
"@id": "
|
|
1079
|
+
"@id": "excretaMixturesKgN"
|
|
1076
1080
|
},
|
|
1077
1081
|
{
|
|
1078
1082
|
"@type": "Term",
|
|
@@ -1080,7 +1084,7 @@
|
|
|
1080
1084
|
},
|
|
1081
1085
|
{
|
|
1082
1086
|
"@type": "Term",
|
|
1083
|
-
"@id": "
|
|
1087
|
+
"@id": "processedExcretaKgN"
|
|
1084
1088
|
},
|
|
1085
1089
|
{
|
|
1086
1090
|
"@type": "Term",
|
|
@@ -1088,11 +1092,11 @@
|
|
|
1088
1092
|
},
|
|
1089
1093
|
{
|
|
1090
1094
|
"@type": "Term",
|
|
1091
|
-
"@id": "
|
|
1095
|
+
"@id": "excretaHorsesMulesAndAssesKgN"
|
|
1092
1096
|
},
|
|
1093
1097
|
{
|
|
1094
1098
|
"@type": "Term",
|
|
1095
|
-
"@id": "
|
|
1099
|
+
"@id": "excretaPigsKgN"
|
|
1096
1100
|
},
|
|
1097
1101
|
{
|
|
1098
1102
|
"@type": "Term",
|
|
@@ -1100,7 +1104,7 @@
|
|
|
1100
1104
|
},
|
|
1101
1105
|
{
|
|
1102
1106
|
"@type": "Term",
|
|
1103
|
-
"@id": "
|
|
1107
|
+
"@id": "excretaSheepKgN"
|
|
1104
1108
|
}
|
|
1105
1109
|
]
|
|
1106
1110
|
},
|
|
@@ -1111,21 +1115,25 @@
|
|
|
1111
1115
|
"units.keyword": "kg VS"
|
|
1112
1116
|
},
|
|
1113
1117
|
"results": [
|
|
1118
|
+
{
|
|
1119
|
+
"@type": "Term",
|
|
1120
|
+
"@id": "excretaSolidFishCrustaceansKgVs"
|
|
1121
|
+
},
|
|
1114
1122
|
{
|
|
1115
1123
|
"@type": "Term",
|
|
1116
1124
|
"@id": "excretaInsectsKgVs"
|
|
1117
1125
|
},
|
|
1118
1126
|
{
|
|
1119
1127
|
"@type": "Term",
|
|
1120
|
-
"@id": "
|
|
1128
|
+
"@id": "excretaPigsKgVs"
|
|
1121
1129
|
},
|
|
1122
1130
|
{
|
|
1123
1131
|
"@type": "Term",
|
|
1124
|
-
"@id": "
|
|
1132
|
+
"@id": "excretaCamelsKgVs"
|
|
1125
1133
|
},
|
|
1126
1134
|
{
|
|
1127
1135
|
"@type": "Term",
|
|
1128
|
-
"@id": "
|
|
1136
|
+
"@id": "excretaDucksKgVs"
|
|
1129
1137
|
},
|
|
1130
1138
|
{
|
|
1131
1139
|
"@type": "Term",
|
|
@@ -1133,35 +1141,35 @@
|
|
|
1133
1141
|
},
|
|
1134
1142
|
{
|
|
1135
1143
|
"@type": "Term",
|
|
1136
|
-
"@id": "
|
|
1144
|
+
"@id": "excretaHorsesMulesAndAssesKgVs"
|
|
1137
1145
|
},
|
|
1138
1146
|
{
|
|
1139
1147
|
"@type": "Term",
|
|
1140
|
-
"@id": "
|
|
1148
|
+
"@id": "excretaBuffaloKgVs"
|
|
1141
1149
|
},
|
|
1142
1150
|
{
|
|
1143
1151
|
"@type": "Term",
|
|
1144
|
-
"@id": "
|
|
1152
|
+
"@id": "excretaTurkeysKgVs"
|
|
1145
1153
|
},
|
|
1146
1154
|
{
|
|
1147
1155
|
"@type": "Term",
|
|
1148
|
-
"@id": "
|
|
1156
|
+
"@id": "excretaLiquidFishCrustaceansKgVs"
|
|
1149
1157
|
},
|
|
1150
1158
|
{
|
|
1151
1159
|
"@type": "Term",
|
|
1152
|
-
"@id": "
|
|
1160
|
+
"@id": "excretaSolidAndLiquidFishCrustaceansKgVs"
|
|
1153
1161
|
},
|
|
1154
1162
|
{
|
|
1155
1163
|
"@type": "Term",
|
|
1156
|
-
"@id": "
|
|
1164
|
+
"@id": "excretaDairyCattleKgVs"
|
|
1157
1165
|
},
|
|
1158
1166
|
{
|
|
1159
1167
|
"@type": "Term",
|
|
1160
|
-
"@id": "
|
|
1168
|
+
"@id": "excretaGeeseKgVs"
|
|
1161
1169
|
},
|
|
1162
1170
|
{
|
|
1163
1171
|
"@type": "Term",
|
|
1164
|
-
"@id": "
|
|
1172
|
+
"@id": "excretaPoultryKgVs"
|
|
1165
1173
|
},
|
|
1166
1174
|
{
|
|
1167
1175
|
"@type": "Term",
|
|
@@ -1169,27 +1177,27 @@
|
|
|
1169
1177
|
},
|
|
1170
1178
|
{
|
|
1171
1179
|
"@type": "Term",
|
|
1172
|
-
"@id": "
|
|
1180
|
+
"@id": "excretaDeerKgVs"
|
|
1173
1181
|
},
|
|
1174
1182
|
{
|
|
1175
1183
|
"@type": "Term",
|
|
1176
|
-
"@id": "
|
|
1184
|
+
"@id": "excretaKgVs"
|
|
1177
1185
|
},
|
|
1178
1186
|
{
|
|
1179
1187
|
"@type": "Term",
|
|
1180
|
-
"@id": "
|
|
1188
|
+
"@id": "excretaSheepKgVs"
|
|
1181
1189
|
},
|
|
1182
1190
|
{
|
|
1183
1191
|
"@type": "Term",
|
|
1184
|
-
"@id": "
|
|
1192
|
+
"@id": "excretaBeefCattleFeedlotFedKgVs"
|
|
1185
1193
|
},
|
|
1186
1194
|
{
|
|
1187
1195
|
"@type": "Term",
|
|
1188
|
-
"@id": "
|
|
1196
|
+
"@id": "excretaBeefCattleExceptFeedlotFedKgVs"
|
|
1189
1197
|
},
|
|
1190
1198
|
{
|
|
1191
1199
|
"@type": "Term",
|
|
1192
|
-
"@id": "
|
|
1200
|
+
"@id": "excretaMixturesKgVs"
|
|
1193
1201
|
}
|
|
1194
1202
|
]
|
|
1195
1203
|
},
|
|
@@ -1204,7 +1212,7 @@
|
|
|
1204
1212
|
"@type": "Term",
|
|
1205
1213
|
"name": "Generic crop, seed",
|
|
1206
1214
|
"@id": "genericCropSeed",
|
|
1207
|
-
"_score": 23.
|
|
1215
|
+
"_score": 23.058521
|
|
1208
1216
|
}
|
|
1209
1217
|
]
|
|
1210
1218
|
},
|
|
@@ -1297,6 +1305,10 @@
|
|
|
1297
1305
|
}
|
|
1298
1306
|
},
|
|
1299
1307
|
"results": [
|
|
1308
|
+
{
|
|
1309
|
+
"@type": "Term",
|
|
1310
|
+
"@id": "petrolBurntIn2StrokeEngine"
|
|
1311
|
+
},
|
|
1300
1312
|
{
|
|
1301
1313
|
"@type": "Term",
|
|
1302
1314
|
"@id": "diesel1D"
|
|
@@ -1307,23 +1319,23 @@
|
|
|
1307
1319
|
},
|
|
1308
1320
|
{
|
|
1309
1321
|
"@type": "Term",
|
|
1310
|
-
"@id": "
|
|
1322
|
+
"@id": "petrolBurntIn4StrokeEngine"
|
|
1311
1323
|
},
|
|
1312
1324
|
{
|
|
1313
1325
|
"@type": "Term",
|
|
1314
|
-
"@id": "
|
|
1326
|
+
"@id": "petrol"
|
|
1315
1327
|
},
|
|
1316
1328
|
{
|
|
1317
1329
|
"@type": "Term",
|
|
1318
|
-
"@id": "
|
|
1330
|
+
"@id": "diesel"
|
|
1319
1331
|
},
|
|
1320
1332
|
{
|
|
1321
1333
|
"@type": "Term",
|
|
1322
|
-
"@id": "
|
|
1334
|
+
"@id": "aviationGasoline"
|
|
1323
1335
|
},
|
|
1324
1336
|
{
|
|
1325
1337
|
"@type": "Term",
|
|
1326
|
-
"@id": "
|
|
1338
|
+
"@id": "gasolineTypeJetFuel"
|
|
1327
1339
|
},
|
|
1328
1340
|
{
|
|
1329
1341
|
"@type": "Term",
|
|
@@ -1332,6 +1344,10 @@
|
|
|
1332
1344
|
{
|
|
1333
1345
|
"@type": "Term",
|
|
1334
1346
|
"@id": "en590Diesel"
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"@type": "Term",
|
|
1350
|
+
"@id": "diesel2D"
|
|
1335
1351
|
}
|
|
1336
1352
|
]
|
|
1337
1353
|
},
|
|
@@ -1364,11 +1380,11 @@
|
|
|
1364
1380
|
"results": [
|
|
1365
1381
|
{
|
|
1366
1382
|
"@type": "Term",
|
|
1367
|
-
"@id": "
|
|
1383
|
+
"@id": "milkYieldPerGoatRaw"
|
|
1368
1384
|
},
|
|
1369
1385
|
{
|
|
1370
1386
|
"@type": "Term",
|
|
1371
|
-
"@id": "
|
|
1387
|
+
"@id": "milkYieldPerSheepRaw"
|
|
1372
1388
|
},
|
|
1373
1389
|
{
|
|
1374
1390
|
"@type": "Term",
|
|
@@ -1388,11 +1404,11 @@
|
|
|
1388
1404
|
},
|
|
1389
1405
|
{
|
|
1390
1406
|
"@type": "Term",
|
|
1391
|
-
"@id": "
|
|
1407
|
+
"@id": "milkYieldPerSheepFpcm"
|
|
1392
1408
|
},
|
|
1393
1409
|
{
|
|
1394
1410
|
"@type": "Term",
|
|
1395
|
-
"@id": "
|
|
1411
|
+
"@id": "milkYieldPerCowFpcm"
|
|
1396
1412
|
}
|
|
1397
1413
|
]
|
|
1398
1414
|
},
|
|
@@ -1425,10 +1441,6 @@
|
|
|
1425
1441
|
}
|
|
1426
1442
|
},
|
|
1427
1443
|
"results": [
|
|
1428
|
-
{
|
|
1429
|
-
"@type": "Term",
|
|
1430
|
-
"@id": "ricePlantFlooded"
|
|
1431
|
-
},
|
|
1432
1444
|
{
|
|
1433
1445
|
"@type": "Term",
|
|
1434
1446
|
"@id": "riceGrainInHuskFlooded"
|
|
@@ -1452,23 +1464,23 @@
|
|
|
1452
1464
|
},
|
|
1453
1465
|
{
|
|
1454
1466
|
"@type": "Term",
|
|
1455
|
-
"@id": "
|
|
1467
|
+
"@id": "minimumTillage"
|
|
1456
1468
|
},
|
|
1457
1469
|
{
|
|
1458
1470
|
"@type": "Term",
|
|
1459
|
-
"@id": "
|
|
1471
|
+
"@id": "fullTillage"
|
|
1460
1472
|
},
|
|
1461
1473
|
{
|
|
1462
1474
|
"@type": "Term",
|
|
1463
|
-
"@id": "
|
|
1475
|
+
"@id": "deepTillage"
|
|
1464
1476
|
},
|
|
1465
1477
|
{
|
|
1466
1478
|
"@type": "Term",
|
|
1467
|
-
"@id": "
|
|
1479
|
+
"@id": "stripTillage"
|
|
1468
1480
|
},
|
|
1469
1481
|
{
|
|
1470
1482
|
"@type": "Term",
|
|
1471
|
-
"@id": "
|
|
1483
|
+
"@id": "mulchTillage"
|
|
1472
1484
|
},
|
|
1473
1485
|
{
|
|
1474
1486
|
"@type": "Term",
|
|
@@ -107,7 +107,7 @@ def _should_run(site: dict, area_size: float = None):
|
|
|
107
107
|
|
|
108
108
|
should_run = all([
|
|
109
109
|
not has_cache,
|
|
110
|
-
contains_coordinates or area_size <= MAX_AREA_SIZE,
|
|
110
|
+
contains_coordinates or (area_size is not None and area_size <= MAX_AREA_SIZE),
|
|
111
111
|
contains_geospatial_data
|
|
112
112
|
])
|
|
113
113
|
return should_run, area_size
|
|
@@ -184,7 +184,7 @@ def most_relevant_measurement_value_by_depth_and_date(
|
|
|
184
184
|
filtered_measurements = [m for m in measurements if m.get('term', {}).get('@id') == term_id]
|
|
185
185
|
|
|
186
186
|
if len(filtered_measurements) == 0:
|
|
187
|
-
return default
|
|
187
|
+
return default, None
|
|
188
188
|
|
|
189
189
|
grouped_measurements = group_measurements_by_depth(filtered_measurements, False)
|
|
190
190
|
|
hestia_earth/models/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = '0.54.
|
|
1
|
+
VERSION = '0.54.3'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hestia-earth-models
|
|
3
|
-
Version: 0.54.
|
|
3
|
+
Version: 0.54.3
|
|
4
4
|
Summary: Hestia's set of modules for filling gaps in the activity data using external datasets (e.g. populating soil properties with a geospatial dataset using provided coordinates) and internal lookups (e.g. populating machinery use from fuel use). Includes rules for when gaps should be filled versus not (e.g. never gap fill yield, gap fill crop residue if yield provided etc.).
|
|
5
5
|
Home-page: https://gitlab.com/hestia-earth/hestia-engine-models
|
|
6
6
|
Author: Hestia Team
|
|
@@ -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=kPLBOABkSiiAaPejXYvDJ9g6RbaXQXgtOZP2x9v_FwA,3008
|
|
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=WTwGHpb151sqEsdMBQhjDvpVp3fMzxKEI_Umdwt2P4g,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
|
|
@@ -225,7 +225,7 @@ hestia_earth/models/ipcc2019/no3ToGroundwaterCropResidueDecomposition.py,sha256=
|
|
|
225
225
|
hestia_earth/models/ipcc2019/no3ToGroundwaterExcreta.py,sha256=WNfaopS9canZs5zePdijfD2HzTTYfqD1hiainuVfwmk,3004
|
|
226
226
|
hestia_earth/models/ipcc2019/no3ToGroundwaterInorganicFertiliser.py,sha256=X2WPGOiWi_1cQ5yiyjfrBU_rAm3EDsm4WnRJi8ea6g8,3007
|
|
227
227
|
hestia_earth/models/ipcc2019/no3ToGroundwaterOrganicFertiliser.py,sha256=Q6XLA-yUEJFQCrk1N4Tq2DiMSACI7XnsW_Mn595V1as,3102
|
|
228
|
-
hestia_earth/models/ipcc2019/organicCarbonPerHa.py,sha256=
|
|
228
|
+
hestia_earth/models/ipcc2019/organicCarbonPerHa.py,sha256=Um7iCtBJUNzXw1bgRliYY2skDhd3VO3qDgzdl9xkT50,75895
|
|
229
229
|
hestia_earth/models/ipcc2019/pastureGrass.py,sha256=oqr1z-4F0muU1m636Kbozfs5aaJB7_r28nahqjkGx5I,21894
|
|
230
230
|
hestia_earth/models/ipcc2019/utils.py,sha256=he8OFl72a2UZpqHFRsf7gyQFjrqUxiMYzqmBVSCvD9E,3158
|
|
231
231
|
hestia_earth/models/ipcc2021/__init__.py,sha256=VTgGFKhwMmk_nuI1RRq0in27fHYVPBonlXlPK00K8no,409
|
|
@@ -328,7 +328,7 @@ hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystems
|
|
|
328
328
|
hestia_earth/models/linkedImpactAssessment/__init__.py,sha256=4UZB1SC_7bzmi4f3qf3yVB7PfEXSCG2OfnAJfgst5bM,3428
|
|
329
329
|
hestia_earth/models/mocking/__init__.py,sha256=kmSeOTSvurMUxw7Ajhf3G-SVPQ1NgmirMTk4TSOEicY,765
|
|
330
330
|
hestia_earth/models/mocking/mock_search.py,sha256=V-ycVBTkJu7PP37Ivy_16hpKBV4aEtJb5S9DfChPNSU,2038
|
|
331
|
-
hestia_earth/models/mocking/search-results.json,sha256=
|
|
331
|
+
hestia_earth/models/mocking/search-results.json,sha256=1qZmlWhB4AMabrBWtm-ZTsmoIxFOh6gmn0GKW4RnTdw,33160
|
|
332
332
|
hestia_earth/models/pooreNemecek2018/__init__.py,sha256=nPboL7ULJzL5nJD5q7q9VOZt_fxbKVm8fmn1Az5YkVY,417
|
|
333
333
|
hestia_earth/models/pooreNemecek2018/aboveGroundCropResidueTotal.py,sha256=Qt-mel4dkhK6N5uUOutNOinCTFjbjtGzITaaI0LvYc4,2396
|
|
334
334
|
hestia_earth/models/pooreNemecek2018/belowGroundCropResidue.py,sha256=pAAMrlGgarI3mhi2L07kiEVhfKif_hq1FfzHurmRTag,2071
|
|
@@ -443,7 +443,7 @@ hestia_earth/models/site/measurement/value.py,sha256=7IhUbIj7n5vB7yXoNxXsWbliEJj
|
|
|
443
443
|
hestia_earth/models/site/post_checks/__init__.py,sha256=CkExxesk1GuG8NjrbKfix1iDuVUgU-9i1ccM_X7MZn4,284
|
|
444
444
|
hestia_earth/models/site/post_checks/cache.py,sha256=_MZsNsclecUdHDT2MsYx4cEsVUXydIasddgZNA6SU4k,284
|
|
445
445
|
hestia_earth/models/site/pre_checks/__init__.py,sha256=fjv6nU5fiL-CLyaa-cBpiLB-xujgPzeK7i7ZJuTOjCI,394
|
|
446
|
-
hestia_earth/models/site/pre_checks/cache_geospatialDatabase.py,sha256=
|
|
446
|
+
hestia_earth/models/site/pre_checks/cache_geospatialDatabase.py,sha256=9JwbsKl8Pgmh4HuHZcRUnObBViWom0wZFGTOHN_Iaao,4078
|
|
447
447
|
hestia_earth/models/site/pre_checks/cache_sources.py,sha256=RzvSgHJTpVkAB3mEvRju_irDQmdJRK7GUdU6PhS2Gaw,904
|
|
448
448
|
hestia_earth/models/site/pre_checks/cache_years.py,sha256=qGwTaHlWxnVT7iVxXVcpJ-oG6M-VH4ZpCDTdTixUHR4,883
|
|
449
449
|
hestia_earth/models/stehfestBouwman2006/__init__.py,sha256=EhvD4NK6oEPevusLb1WdYV3GT_fCtQx4gvdMhK_dEIQ,420
|
|
@@ -495,7 +495,7 @@ hestia_earth/models/utils/inorganicFertiliser.py,sha256=T48wQlPAAZNpmbAq-58y7wlR
|
|
|
495
495
|
hestia_earth/models/utils/input.py,sha256=4zeBsdVKredh4pjMxVJjJU9mKNoBah1LisKl_Tr3yj0,6879
|
|
496
496
|
hestia_earth/models/utils/liveAnimal.py,sha256=u_Lym0hVinncCZMYF_KscCA3vuelWmlyHn4I-jVRDs4,1505
|
|
497
497
|
hestia_earth/models/utils/lookup.py,sha256=3tXnOaTGF91NhL9NsM0hQ05Vm_bQQG6aNgC5dEq0KdQ,6255
|
|
498
|
-
hestia_earth/models/utils/measurement.py,sha256=
|
|
498
|
+
hestia_earth/models/utils/measurement.py,sha256=Qn83lo4rRr4iMPaloF1-NOq-1pT9dTleHeA8eADxvno,7939
|
|
499
499
|
hestia_earth/models/utils/pesticideAI.py,sha256=pmjiFJkMLodXSP16VnxT7YizH-LBFFvEsvShplyAPB8,1374
|
|
500
500
|
hestia_earth/models/utils/practice.py,sha256=tNadOzsrNlCEt801B815XaruJXzZ5yPASam7B3sWpXE,1091
|
|
501
501
|
hestia_earth/models/utils/product.py,sha256=RUuEkYdPJvbdCAdYX0O5DO9R_bBErvp2ql4dT8Yzx1o,9840
|
|
@@ -724,7 +724,7 @@ tests/models/ipcc2019/test_no3ToGroundwaterCropResidueDecomposition.py,sha256=l9
|
|
|
724
724
|
tests/models/ipcc2019/test_no3ToGroundwaterExcreta.py,sha256=Z-pCBQvlUf0ttmCERgezW-6e3KlX45YEVccOwthf5lU,1588
|
|
725
725
|
tests/models/ipcc2019/test_no3ToGroundwaterInorganicFertiliser.py,sha256=e7REnQ9r9a8xroq5aPp0NIzmkad_6MyTuceRTYoKdkE,1613
|
|
726
726
|
tests/models/ipcc2019/test_no3ToGroundwaterOrganicFertiliser.py,sha256=e1ZViD12qB3bLdH3TJw3GbBP8iqMen-UJbcFkytb3VQ,1609
|
|
727
|
-
tests/models/ipcc2019/test_organicCarbonPerHa.py,sha256=
|
|
727
|
+
tests/models/ipcc2019/test_organicCarbonPerHa.py,sha256=sHBtptnk_YZhpULGP-HEDIPznYv3pZpGjr5BvqGRBi8,5869
|
|
728
728
|
tests/models/ipcc2019/test_pastureGrass.py,sha256=nT2_TUxehiiUhR3KCKkBhFRnam__NbQOznLOENGkQTw,2229
|
|
729
729
|
tests/models/ipcc2021/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
730
730
|
tests/models/ipcc2021/test_gwp100.py,sha256=r3pDw_TUcOrNlNRWtFAN3CBWfG5FCkHExypVqg0sZVk,857
|
|
@@ -983,8 +983,8 @@ tests/models/utils/test_source.py,sha256=_Ol-OrJs2Tt9iZAZ_RY2qRuSbnE4yz5OuEGkDSb
|
|
|
983
983
|
tests/models/utils/test_term.py,sha256=-Wn2C1jyOLfkvhcKmKWT-Jms7yqLwx5ok91gYJNcGWc,2028
|
|
984
984
|
tests/models/webbEtAl2012AndSintermannEtAl2012/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
985
985
|
tests/models/webbEtAl2012AndSintermannEtAl2012/test_nh3ToAirOrganicFertiliser.py,sha256=qi2FNXS5Af2WDtm7nq_FsprH3BfCF0XxnE0XHmC4aIY,2244
|
|
986
|
-
hestia_earth_models-0.54.
|
|
987
|
-
hestia_earth_models-0.54.
|
|
988
|
-
hestia_earth_models-0.54.
|
|
989
|
-
hestia_earth_models-0.54.
|
|
990
|
-
hestia_earth_models-0.54.
|
|
986
|
+
hestia_earth_models-0.54.3.dist-info/LICENSE,sha256=EFSZhfUdZCTsCIYdHzTGewMKfRfp7X9t1s2aaKxm8O0,1154
|
|
987
|
+
hestia_earth_models-0.54.3.dist-info/METADATA,sha256=vB2ePqWN2NwT_CuWAf3cEuZWpMMo2XthEjVYplARRnQ,3201
|
|
988
|
+
hestia_earth_models-0.54.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
989
|
+
hestia_earth_models-0.54.3.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
|
|
990
|
+
hestia_earth_models-0.54.3.dist-info/RECORD,,
|
|
@@ -16,7 +16,12 @@ from hestia_earth.models.ipcc2019.organicCarbonPerHa import (
|
|
|
16
16
|
)
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
SUBFOLDERS = [
|
|
19
|
+
SUBFOLDERS = [
|
|
20
|
+
'Tier2/without-initial-soc',
|
|
21
|
+
'Tier2/with-initial-soc',
|
|
22
|
+
'Tier2/with-multi-year-cycles',
|
|
23
|
+
'Tier2/without-any-measurements'
|
|
24
|
+
]
|
|
20
25
|
|
|
21
26
|
class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
|
|
22
27
|
fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
|
|
@@ -109,7 +114,6 @@ def test_run_annual_organic_carbon_inputs(*args):
|
|
|
109
114
|
@patch(f"{class_path}.related_cycles", return_value=_load_cycles(f"{fixtures_folder}/{SUBFOLDERS[0]}/cycles.jsonld"))
|
|
110
115
|
@patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
|
|
111
116
|
def test_run_tier_2_without_initial_soc(*args):
|
|
112
|
-
|
|
113
117
|
with open(f"{fixtures_folder}/{SUBFOLDERS[0]}/site.jsonld", encoding='utf-8') as f:
|
|
114
118
|
site = json.load(f)
|
|
115
119
|
|
|
@@ -123,7 +127,6 @@ def test_run_tier_2_without_initial_soc(*args):
|
|
|
123
127
|
@patch(f"{class_path}.related_cycles", return_value=_load_cycles(f"{fixtures_folder}/{SUBFOLDERS[1]}/cycles.jsonld"))
|
|
124
128
|
@patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
|
|
125
129
|
def test_run_tier_2_with_initial_soc(*args):
|
|
126
|
-
|
|
127
130
|
with open(f"{fixtures_folder}/{SUBFOLDERS[1]}/site.jsonld", encoding='utf-8') as f:
|
|
128
131
|
site = json.load(f)
|
|
129
132
|
|
|
@@ -137,7 +140,6 @@ def test_run_tier_2_with_initial_soc(*args):
|
|
|
137
140
|
@patch(f"{class_path}.related_cycles", return_value=_load_cycles(f"{fixtures_folder}/{SUBFOLDERS[2]}/cycles.jsonld"))
|
|
138
141
|
@patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
|
|
139
142
|
def test_run_tier_2_with_multi_year_cycles(*args):
|
|
140
|
-
|
|
141
143
|
with open(f"{fixtures_folder}/{SUBFOLDERS[2]}/site.jsonld", encoding='utf-8') as f:
|
|
142
144
|
site = json.load(f)
|
|
143
145
|
|
|
@@ -146,3 +148,29 @@ def test_run_tier_2_with_multi_year_cycles(*args):
|
|
|
146
148
|
|
|
147
149
|
result = run(site)
|
|
148
150
|
assert result == expected
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
@patch(f"{class_path}.related_cycles", return_value=_load_cycles(f"{fixtures_folder}/{SUBFOLDERS[3]}/cycles.jsonld"))
|
|
154
|
+
@patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
|
|
155
|
+
def test_run_tier_2_without_any_measurements(*args):
|
|
156
|
+
"""
|
|
157
|
+
Issue 594: model should not run and, therefore, return an empty list.
|
|
158
|
+
Should not raise a value error in `_check_consecutive` function.
|
|
159
|
+
"""
|
|
160
|
+
with open(f"{fixtures_folder}/{SUBFOLDERS[3]}/site.jsonld", encoding='utf-8') as f:
|
|
161
|
+
site = json.load(f)
|
|
162
|
+
|
|
163
|
+
with open(f"{fixtures_folder}/{SUBFOLDERS[3]}/result.jsonld", encoding='utf-8') as f:
|
|
164
|
+
expected = json.load(f)
|
|
165
|
+
|
|
166
|
+
result = run(site)
|
|
167
|
+
assert result == expected
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
@patch(f"{class_path}.related_cycles", return_value=[])
|
|
171
|
+
@patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
|
|
172
|
+
def test_run_tier_2_empty_site_and_cycles(*args):
|
|
173
|
+
SITE = {}
|
|
174
|
+
EXPECTED = []
|
|
175
|
+
result = run(SITE)
|
|
176
|
+
assert result == EXPECTED
|
|
File without changes
|
|
File without changes
|
|
File without changes
|