hestia-earth-models 0.65.7__py3-none-any.whl → 0.65.9__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/config/Cycle.json +381 -401
- hestia_earth/models/config/run-calculations.json +5 -5
- hestia_earth/models/config/trigger-calculations.json +1 -1
- hestia_earth/models/environmentalFootprintV3/soilQualityIndexLandTransformation.py +12 -4
- hestia_earth/models/hestia/landCover.py +2 -2
- hestia_earth/models/mocking/search-results.json +726 -726
- hestia_earth/models/site/management.py +6 -6
- hestia_earth/models/utils/lookup.py +3 -3
- hestia_earth/models/version.py +1 -1
- hestia_earth/orchestrator/models/__init__.py +2 -2
- {hestia_earth_models-0.65.7.dist-info → hestia_earth_models-0.65.9.dist-info}/METADATA +1 -1
- {hestia_earth_models-0.65.7.dist-info → hestia_earth_models-0.65.9.dist-info}/RECORD +18 -18
- tests/models/environmentalFootprintV3/test_soilQualityIndexLandTransformation.py +8 -15
- tests/models/hestia/test_landCover.py +2 -1
- tests/models/site/test_management.py +2 -1
- {hestia_earth_models-0.65.7.dist-info → hestia_earth_models-0.65.9.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.65.7.dist-info → hestia_earth_models-0.65.9.dist-info}/WHEEL +0 -0
- {hestia_earth_models-0.65.7.dist-info → hestia_earth_models-0.65.9.dist-info}/top_level.txt +0 -0
@@ -165,7 +165,7 @@ def _gap_filled_date_obj(date_str: str, mode: str = DatestrGapfillMode.END) -> d
|
|
165
165
|
)
|
166
166
|
|
167
167
|
|
168
|
-
def _gap_filled_start_date(land_cover_id: str, end_date: str, cycle: dict) ->
|
168
|
+
def _gap_filled_start_date(land_cover_id: str, end_date: str, cycle: dict) -> datetime:
|
169
169
|
"""If possible, gap-fill the startDate based on the endDate - maximumCycleDuration"""
|
170
170
|
maximum_cycle_duration = _get_maximum_cycle_duration(land_cover_id)
|
171
171
|
return max(
|
@@ -322,12 +322,12 @@ def _has_prop_grouped_with_landCover(product: dict):
|
|
322
322
|
)
|
323
323
|
|
324
324
|
|
325
|
-
def _run_from_crop_forage(cycle: dict):
|
325
|
+
def _run_from_crop_forage(cycle: dict, site: dict):
|
326
326
|
products = _get_relevant_items(
|
327
327
|
cycle=cycle,
|
328
328
|
item_name="products",
|
329
329
|
relevant_terms=[TermTermType.CROP, TermTermType.FORAGE]
|
330
|
-
)
|
330
|
+
) if site.get("siteType", "") == SiteSiteType.CROPLAND.value else []
|
331
331
|
# only take products with a matching landCover term
|
332
332
|
products = [p for p in products if get_landCover_term_id(p.get('term', {}))]
|
333
333
|
# remove any properties that should not get gap-filled
|
@@ -376,8 +376,8 @@ def _run_from_practices(cycle: dict):
|
|
376
376
|
|
377
377
|
def _run_cycle(site: dict, cycle: dict):
|
378
378
|
inputs = _run_from_inputs(site, cycle)
|
379
|
-
products = _run_from_crop_forage(cycle)
|
380
|
-
site_types = _run_from_siteType(site, cycle)
|
379
|
+
products = _run_from_crop_forage(site=site, cycle=cycle)
|
380
|
+
site_types = _run_from_siteType(site=site, cycle=cycle)
|
381
381
|
practices = _run_from_practices(cycle)
|
382
382
|
return [
|
383
383
|
node | {'cycle-id': cycle.get('@id')}
|
@@ -387,7 +387,7 @@ def _run_cycle(site: dict, cycle: dict):
|
|
387
387
|
|
388
388
|
def run(site: dict):
|
389
389
|
cycles = related_cycles(site)
|
390
|
-
nodes = flatten([_run_cycle(site, cycle) for cycle in cycles])
|
390
|
+
nodes = flatten([_run_cycle(site=site, cycle=cycle) for cycle in cycles])
|
391
391
|
|
392
392
|
# group nodes with same `id` to display as a single log per node
|
393
393
|
grouped_nodes = group_by(nodes, ['id'])
|
@@ -11,7 +11,7 @@ from ..log import debugValues, log_as_table, debugMissingLookup
|
|
11
11
|
|
12
12
|
def _node_value(node):
|
13
13
|
value = node.get('value')
|
14
|
-
return list_sum(value) if isinstance(value, list) else value
|
14
|
+
return list_sum(value, default=None) if isinstance(value, list) else value
|
15
15
|
|
16
16
|
|
17
17
|
def _factor_value(model: str, term_id: str, lookup_name: str, lookup_col: str, grouped_key: Optional[str] = None):
|
@@ -52,8 +52,8 @@ def all_factor_value(
|
|
52
52
|
missing_values = set([v.get('id') for v in values if v.get('value') is not None and v.get('coefficient') is None])
|
53
53
|
all_with_factors = all([v.get('coefficient') is not None for v in values if v.get('value') is not None])
|
54
54
|
|
55
|
-
for
|
56
|
-
debugMissingLookup(lookup_name, 'termid',
|
55
|
+
for missing_value in missing_values:
|
56
|
+
debugMissingLookup(lookup_name, 'termid', missing_value, lookup_col, None)
|
57
57
|
|
58
58
|
debugValues(node, model=model, term=term_id,
|
59
59
|
all_with_factors=all_with_factors,
|
hestia_earth/models/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VERSION = '0.65.
|
1
|
+
VERSION = '0.65.9'
|
@@ -39,14 +39,14 @@ def _import_model(name: str):
|
|
39
39
|
try:
|
40
40
|
return {
|
41
41
|
'run': importlib.import_module(f"hestia_earth.models.{name}").run,
|
42
|
-
'version':
|
42
|
+
'version': VERSION
|
43
43
|
}
|
44
44
|
except ModuleNotFoundError:
|
45
45
|
# try to load the model from the the models folder, fallback to fully specified name
|
46
46
|
try:
|
47
47
|
return {
|
48
48
|
'run': importlib.import_module(f"hestia_earth.orchestrator.models.{name}").run,
|
49
|
-
'version':
|
49
|
+
'version': VERSION
|
50
50
|
}
|
51
51
|
except ModuleNotFoundError:
|
52
52
|
return {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: hestia-earth-models
|
3
|
-
Version: 0.65.
|
3
|
+
Version: 0.65.9
|
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
|
@@ -4,7 +4,7 @@ hestia_earth/models/cache_sites.py,sha256=Llo2SH1Lp-R8x1JRxJ2Ta-vw5RbdUj2FHXUP-c
|
|
4
4
|
hestia_earth/models/log.py,sha256=_zAfyOkL_VknEnMFvcpvenSMghadlDfZhiSx28545Gk,3558
|
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=kCzRyuygd47dgg8pZkkwCs6b_7Lb4-nPncYEsjaT4jc,19
|
8
8
|
hestia_earth/models/agribalyse2016/__init__.py,sha256=WvK0qCQbnYtg9oZxrACd1wGormZyXibPtpCnIQeDqbw,415
|
9
9
|
hestia_earth/models/agribalyse2016/fuelElectricity.py,sha256=rm5ZaRAzJ08m2y4BxkGh-RjudkDWgozmg3XumoRm-fQ,4511
|
10
10
|
hestia_earth/models/agribalyse2016/machineryInfrastructureDepreciatedAmountPerCycle.py,sha256=BPjnWmg73i_OxM2ouCdMTWZtPIqyoUAXrvutntyteE0,3390
|
@@ -34,12 +34,12 @@ hestia_earth/models/cml2001Baseline/terrestrialAcidificationPotentialIncludingFa
|
|
34
34
|
hestia_earth/models/cml2001NonBaseline/__init__.py,sha256=vI8wp8Og_e8DiJqYYvp33YoI3t4ffAC31LWlnV20JTg,419
|
35
35
|
hestia_earth/models/cml2001NonBaseline/eutrophicationPotentialIncludingFateAverageEurope.py,sha256=lcgyRHY08KCBFPERJNqV4DYGEJCvyHBDnJXD0kEkVqM,1097
|
36
36
|
hestia_earth/models/cml2001NonBaseline/terrestrialAcidificationPotentialExcludingFate.py,sha256=xcrxfs9UoV_EWvV-XzMt35oPWCUsTzqg2SGA3j2MFIw,1091
|
37
|
-
hestia_earth/models/config/Cycle.json,sha256=
|
37
|
+
hestia_earth/models/config/Cycle.json,sha256=HcwStlwnBEjuZwoK6gCFdCfvX5RphSPhDGDj0LQ32Fg,56086
|
38
38
|
hestia_earth/models/config/ImpactAssessment.json,sha256=EB8O8_GZ182upCP-Rpko7I48Tdf30ScK-ZZ3rf4DQQI,57585
|
39
39
|
hestia_earth/models/config/Site.json,sha256=FfuME8DLLyoHYJ2uBgnueTIK9E7m9aV7iPT8TBoqlzk,12565
|
40
40
|
hestia_earth/models/config/__init__.py,sha256=UZZdwfnxTqnZLG4hNecu6sfKvMLvctjdWFraE_9H438,2130
|
41
|
-
hestia_earth/models/config/run-calculations.json,sha256=
|
42
|
-
hestia_earth/models/config/trigger-calculations.json,sha256=
|
41
|
+
hestia_earth/models/config/run-calculations.json,sha256=e3nJ4M6CP1iFzfv8ou_ZUFbFxYkDxJgwuNDXTm4PBDc,615
|
42
|
+
hestia_earth/models/config/trigger-calculations.json,sha256=3dmn2bRuj6QEtSTOLdIy31ho7thgUXyDsnqZzPV9rAQ,623
|
43
43
|
hestia_earth/models/cycle/__init__.py,sha256=VowO3kOHb0LpURsljNaJsYO7s6vgjhul6bF_85UjUEI,406
|
44
44
|
hestia_earth/models/cycle/aboveGroundCropResidueTotal.py,sha256=9swq4YEeJQ2YjVOmghgBYWkMZWdNU4MKCUBY5FsmBSU,3088
|
45
45
|
hestia_earth/models/cycle/coldCarcassWeightPerHead.py,sha256=fQ7huuxyS5PQkRmR_tRCOz9rV3LJwLfLQJjH_TcTz6k,2955
|
@@ -148,7 +148,7 @@ hestia_earth/models/emissionNotRelevant/__init__.py,sha256=NkP635TDNs7bQBv2n9tUT
|
|
148
148
|
hestia_earth/models/environmentalFootprintV3/__init__.py,sha256=lzg9qccwd9tbspw0lQ58YPprnvvSLTn3QV5T2-tPcC4,425
|
149
149
|
hestia_earth/models/environmentalFootprintV3/freshwaterEcotoxicityPotentialCtue.py,sha256=N_gw2aNoCMW5Z1XM-uAyCF1kfpZUI07giv_bo3Lmr5Q,918
|
150
150
|
hestia_earth/models/environmentalFootprintV3/soilQualityIndexLandOccupation.py,sha256=r3GV2pspKWAlKU46TMh_6D_rrXtY_onhk3RnukzJjD8,5095
|
151
|
-
hestia_earth/models/environmentalFootprintV3/soilQualityIndexLandTransformation.py,sha256=
|
151
|
+
hestia_earth/models/environmentalFootprintV3/soilQualityIndexLandTransformation.py,sha256=h4NVqDHYuf2-6WIZMzA6-8WrZ2yLyGAUCSanEJo_dzs,6709
|
152
152
|
hestia_earth/models/environmentalFootprintV3/soilQualityIndexTotalLandUseEffects.py,sha256=SIjFYPv4n3mziohW2nlycaMssHQ3ws79hqHa4i3sCVI,2997
|
153
153
|
hestia_earth/models/environmentalFootprintV3/utils.py,sha256=fZ99_G0Kh4OUW5wH-LglzCrKp8l2plKuCs4yvUH_3hs,699
|
154
154
|
hestia_earth/models/epa2014/__init__.py,sha256=ckGf_6X7CCzI_18OqchEkuJAXKXM1x7V53u480ckknM,408
|
@@ -206,7 +206,7 @@ hestia_earth/models/haversineFormula/__init__.py,sha256=o155nR-XI67iCSBVNYIu4sPR
|
|
206
206
|
hestia_earth/models/haversineFormula/transport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
207
207
|
hestia_earth/models/haversineFormula/transport/distance.py,sha256=163KrmKzlEQuKYT1ZvpPgmKlv_-mmvxp0A1_uKya99w,4203
|
208
208
|
hestia_earth/models/hestia/__init__.py,sha256=o5vAmPzSaK9XPgL8GCne3-lugfCOgZhHELYolNgqyyY,407
|
209
|
-
hestia_earth/models/hestia/landCover.py,sha256=
|
209
|
+
hestia_earth/models/hestia/landCover.py,sha256=zq9JIJn4qdsX3SvZxmS5qllOl0xinJfrHDR5dsYjDpg,29507
|
210
210
|
hestia_earth/models/hestia/landTransformation100YearAverageDuringCycle.py,sha256=-7ToRvCVPD6AAcjxorPS5jSWio7JAglHrdSS9PPyPqQ,1551
|
211
211
|
hestia_earth/models/hestia/landTransformation20YearAverageDuringCycle.py,sha256=TCskVLhYXBMxdeZM-gN4Tdixk5ua7eVn-o5dfIT_H7o,1543
|
212
212
|
hestia_earth/models/hestia/resourceUse_utils.py,sha256=1ySn4d-qkDeU8Ss_80l-uOypPoWsmDsqnS6IM8wkI34,7113
|
@@ -406,7 +406,7 @@ hestia_earth/models/linkedImpactAssessment/utils.py,sha256=S1zlux02gU2Lajrtoq-zQ
|
|
406
406
|
hestia_earth/models/mocking/__init__.py,sha256=9VX50c-grz-snfd-7MBS0KfF7AadtbKuj7kK6PqtsgE,687
|
407
407
|
hestia_earth/models/mocking/build_mock_search.py,sha256=p15ccEUmkmLp1RiGNznxMz3OFHbI8P1-29ExuohiQN8,1355
|
408
408
|
hestia_earth/models/mocking/mock_search.py,sha256=ccFe_WrI73JElFmxp4hPNLCX7eeU--lBC1JFR901KJY,1069
|
409
|
-
hestia_earth/models/mocking/search-results.json,sha256=
|
409
|
+
hestia_earth/models/mocking/search-results.json,sha256=K2swFvB_pADeINR3vBoKMdLcMf8aXTqfTvKaPy6tsFw,102055
|
410
410
|
hestia_earth/models/pooreNemecek2018/__init__.py,sha256=nPboL7ULJzL5nJD5q7q9VOZt_fxbKVm8fmn1Az5YkVY,417
|
411
411
|
hestia_earth/models/pooreNemecek2018/aboveGroundCropResidueTotal.py,sha256=Qt-mel4dkhK6N5uUOutNOinCTFjbjtGzITaaI0LvYc4,2396
|
412
412
|
hestia_earth/models/pooreNemecek2018/belowGroundCropResidue.py,sha256=JT0RybbvWVlo01FO8K0Yj41HrEaJT3Kj1xfayr2X-xw,2315
|
@@ -508,7 +508,7 @@ hestia_earth/models/site/brackishWater.py,sha256=vLEhIZv5PUKwzwvIuYrWi7K---fq7ZX
|
|
508
508
|
hestia_earth/models/site/cationExchangeCapacityPerKgSoil.py,sha256=0eH4A-tXJ0hvIkiYXWxlx8TfrdbIKUGYUDk97-yQJgg,3653
|
509
509
|
hestia_earth/models/site/flowingWater.py,sha256=v3g5722GIA4zQAUQI9yGFiZvFvI1QAVZqlQrY-6_B3A,1731
|
510
510
|
hestia_earth/models/site/freshWater.py,sha256=FXs3Vt8V4e-wn325_dwSTOKlZtn5ksNUpvYGDeLJShY,1255
|
511
|
-
hestia_earth/models/site/management.py,sha256=
|
511
|
+
hestia_earth/models/site/management.py,sha256=51gpDKNGghiKnt7cbDJGyW62e1Bh7IoXUmgCThaU7Ms,14626
|
512
512
|
hestia_earth/models/site/netPrimaryProduction.py,sha256=UIIQkYd911qVzrWjxBLrC37e-RARIVgDwLdARY9BuLw,1849
|
513
513
|
hestia_earth/models/site/organicCarbonPerHa.py,sha256=F2ShinHf0m9qKa1nCYBspsDkRY6jzOl0wM8mSDre22I,14916
|
514
514
|
hestia_earth/models/site/organicCarbonPerKgSoil.py,sha256=t--wAshiAKS-JvEKhLFRadGvgSBv5NFZ68jdyms_wh4,1945
|
@@ -593,7 +593,7 @@ hestia_earth/models/utils/inorganicFertiliser.py,sha256=_dLBY-otGkLr8PobR5dQ89bF
|
|
593
593
|
hestia_earth/models/utils/input.py,sha256=gsVFKTC9WF8dO6YAg_-H_GAOQTnvAr49Ox5-eTH8zf8,5145
|
594
594
|
hestia_earth/models/utils/landCover.py,sha256=8-nfynzCx9gf9YfhpuoH6Cn4kQwWFpYA5RmoGW-0ETE,300
|
595
595
|
hestia_earth/models/utils/liveAnimal.py,sha256=GnajBPZw5d94raf80KtLloaOqlfqGAPwUtP9bRlGWeE,1754
|
596
|
-
hestia_earth/models/utils/lookup.py,sha256
|
596
|
+
hestia_earth/models/utils/lookup.py,sha256=-IUSbwp1f0LicPFlD45DT0dh4tTmhu9weCLLCBEpc5c,8699
|
597
597
|
hestia_earth/models/utils/management.py,sha256=W5M9k0arraVUGh4ZccVqgb8rSSLxHM6rkmi4MSzV6Dw,413
|
598
598
|
hestia_earth/models/utils/measurement.py,sha256=izEiPszUcPA22zaIc0OuF7Yk82JWu5cxi0Sbz_9YgBo,11142
|
599
599
|
hestia_earth/models/utils/organicFertiliser.py,sha256=2HY-a0EBzUw4DkEAXClLMXVCEZTKYf0BwFHBo7lQ5Tg,363
|
@@ -614,7 +614,7 @@ hestia_earth/models/webbEtAl2012AndSintermannEtAl2012/nh3ToAirOrganicFertiliser.
|
|
614
614
|
hestia_earth/orchestrator/__init__.py,sha256=ntPWzdomHMdKejrnUlVPCUrLw0P2C9UIt3jRJD_Gwn4,1402
|
615
615
|
hestia_earth/orchestrator/log.py,sha256=rvuc221TZCXB1s_Qxme_lTPAI9cZWkmTvnZHGqSDtWY,2214
|
616
616
|
hestia_earth/orchestrator/utils.py,sha256=LAMUTyIQ-90TR6CUljWPbCNBsAMeukOhW4zoPy7LzuU,4111
|
617
|
-
hestia_earth/orchestrator/models/__init__.py,sha256=
|
617
|
+
hestia_earth/orchestrator/models/__init__.py,sha256=LdoDX-_wv6ZUCNomEuUMPZrr2jmfsiU_LIcUF8V1Px8,4010
|
618
618
|
hestia_earth/orchestrator/models/transformations.py,sha256=zJwfVXabudLXhdyz0Hsk4IV_2OjgMtaYEZbD9kuZtLk,4128
|
619
619
|
hestia_earth/orchestrator/models/emissions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
620
620
|
hestia_earth/orchestrator/models/emissions/deleted.py,sha256=KC6J1bdMJC1rBFlWW5SD1NhbN8kyBPFdncbtY9OfYBU,575
|
@@ -758,7 +758,7 @@ tests/models/emepEea2019/test_utils.py,sha256=G6z8tEfWM0OPnUBaFCQgQyEi5-kRF_Dqsq
|
|
758
758
|
tests/models/environmentalFootprintV3/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
759
759
|
tests/models/environmentalFootprintV3/test_freshwaterEcotoxicityPotentialCtue.py,sha256=ZPDKM23qlLMe_ZzeA-QIutSkFlod3BsmjloA9WA8nug,845
|
760
760
|
tests/models/environmentalFootprintV3/test_soilQualityIndexLandOccupation.py,sha256=pgauGmFl52lQJVPaDHryrUU3LSmjWC-Al_XBqQj33u4,6116
|
761
|
-
tests/models/environmentalFootprintV3/test_soilQualityIndexLandTransformation.py,sha256=
|
761
|
+
tests/models/environmentalFootprintV3/test_soilQualityIndexLandTransformation.py,sha256=yR2b7MNw1kDpcHHB_c2uPZ2QF-nDEAs-eBE7HqMxm5k,6231
|
762
762
|
tests/models/environmentalFootprintV3/test_soilQualityIndexTotalLandUseEffects.py,sha256=j6V2AE1I98hi-Cv_-L5Rc2zzL0au9SWW4XnMkSuV7yo,2314
|
763
763
|
tests/models/epa2014/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
764
764
|
tests/models/epa2014/test_no3ToGroundwaterExcreta.py,sha256=ESVz4UURvQfhjGBTxjuAV_bymMBcvGNfLAkYMvNup9U,1217
|
@@ -816,7 +816,7 @@ tests/models/haversineFormula/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
816
816
|
tests/models/haversineFormula/transport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
817
817
|
tests/models/haversineFormula/transport/test_distance.py,sha256=hqzIOA1nGao8uiBE16J0ou52McwV4w30ZLpEAqtfi9k,970
|
818
818
|
tests/models/hestia/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
819
|
-
tests/models/hestia/test_landCover.py,sha256=
|
819
|
+
tests/models/hestia/test_landCover.py,sha256=TCgZMAd11TjXs0RZHHJzjXSCY_UicFgYPoGjjryScm4,6105
|
820
820
|
tests/models/hestia/test_landTransformation100YearAverageDuringCycle.py,sha256=3qa4rWUFqP1VM5-vm_182rhiBYJDxPqJwWtBqJ5K028,956
|
821
821
|
tests/models/hestia/test_landTransformation20YearAverageDuringCycle.py,sha256=257nCGseM8IEc7i3c2lvx0AsJOpk5Cy633PlZZQYRGo,956
|
822
822
|
tests/models/hestia/test_seed_emissions.py,sha256=dCUuJBkhwNFBhhcypQN7eMqrWZ9iGCnypoidO5DfQYw,921
|
@@ -1107,7 +1107,7 @@ tests/models/site/test_brackishWater.py,sha256=YGCp4glaWudKklYBSp-50KbfvIRtp3F4Q
|
|
1107
1107
|
tests/models/site/test_cationExchangeCapacityPerKgSoil.py,sha256=tNMhN998vcjQ15I-5mNnFh2d7mHzEBIBO6o1VSfQNUE,1075
|
1108
1108
|
tests/models/site/test_flowingWater.py,sha256=t_rxvdlmUVDsFBoDF20_zDM-0iiLKkNCV7knO9l1T7o,1370
|
1109
1109
|
tests/models/site/test_freshWater.py,sha256=GOeAxHhPW_2E1wQdQRX4W-r7mnb_LgmiAVLImitoApw,982
|
1110
|
-
tests/models/site/test_management.py,sha256
|
1110
|
+
tests/models/site/test_management.py,sha256=-QgZc4jBkhHrvvssn3Xtd3kYGIuV2dDoMJxoejkEhmM,1762
|
1111
1111
|
tests/models/site/test_netPrimaryProduction.py,sha256=JCxG0MODbKVvl3hOqmKzh4FjHYn3Xs9KsVod6LvKQII,1108
|
1112
1112
|
tests/models/site/test_organicCarbonPerHa.py,sha256=XtGrE7ZqthTF0x8lDxJ1slNd_GvYHEyEydcRgA46jEc,3207
|
1113
1113
|
tests/models/site/test_organicCarbonPerKgSoil.py,sha256=0M-NMg_T3UXzGT_VlKOKhSxg4cZ0_zhd3FRgY5Hpj6o,1087
|
@@ -1204,8 +1204,8 @@ tests/orchestrator/strategies/run/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
|
|
1204
1204
|
tests/orchestrator/strategies/run/test_add_blank_node_if_missing.py,sha256=lGqeebvgAwGathB8NLZ14Js5JV_-KyHueaD6I8IH8mU,3615
|
1205
1205
|
tests/orchestrator/strategies/run/test_add_key_if_missing.py,sha256=hKwvk1ohcBVnQUCTiDhRW99J0xEa29BpwFi1KC0yWLE,329
|
1206
1206
|
tests/orchestrator/strategies/run/test_always.py,sha256=w5-Dhp6yLzgZGAeMRz3OrqZbbAed9gZ1O266a3z9k7w,134
|
1207
|
-
hestia_earth_models-0.65.
|
1208
|
-
hestia_earth_models-0.65.
|
1209
|
-
hestia_earth_models-0.65.
|
1210
|
-
hestia_earth_models-0.65.
|
1211
|
-
hestia_earth_models-0.65.
|
1207
|
+
hestia_earth_models-0.65.9.dist-info/LICENSE,sha256=TD25LoiRJsA5CPUNrcyt1PXlGcbUGFMAeZoBcfCrCNE,1154
|
1208
|
+
hestia_earth_models-0.65.9.dist-info/METADATA,sha256=yf4UsyfGEEeJHUC7KgsGyf6YODOANQkvdOPgErfvMeI,4046
|
1209
|
+
hestia_earth_models-0.65.9.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
1210
|
+
hestia_earth_models-0.65.9.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
|
1211
|
+
hestia_earth_models-0.65.9.dist-info/RECORD,,
|
@@ -18,7 +18,6 @@ def fake_rounded_indicator(value: float):
|
|
18
18
|
return indicator
|
19
19
|
|
20
20
|
|
21
|
-
land_cover_terms = ['cropland', 'seaOrOcean', 'forest']
|
22
21
|
crop_land = {"@id": "cropland", "termType": "landCover"}
|
23
22
|
sea_land_cover = {"@id": "seaOrOcean", "termType": "landCover"}
|
24
23
|
forest = {"@id": "forest", "termType": "landCover"}
|
@@ -27,26 +26,18 @@ indicator = {
|
|
27
26
|
"termType": "resourceUse",
|
28
27
|
"units": "m2 / year"
|
29
28
|
}
|
30
|
-
|
31
29
|
wrong_indicator = {"term": {"@id": "NOT_VALID_INDICATOR_ID", "termType": "resourceUse", "units": "m2 / year"},
|
32
|
-
"value": 0.5, "landCover": crop_land}
|
30
|
+
"value": 0.5, "landCover": crop_land, "previousLandCover": forest}
|
33
31
|
|
34
32
|
indicator_no_land_cover = {
|
35
33
|
"term": indicator,
|
36
34
|
"previousLandCover": forest,
|
37
35
|
"value": 0.5}
|
38
36
|
|
39
|
-
|
40
|
-
"term": indicator,
|
41
|
-
"previousLandCover": forest,
|
42
|
-
"value": 0.5,
|
43
|
-
"landCover": crop_land}
|
44
|
-
|
45
|
-
indicator_wrong_unit = {
|
37
|
+
indicator_no_previous_land_cover = {
|
46
38
|
"term": indicator,
|
47
|
-
"
|
48
|
-
"
|
49
|
-
"landCover": crop_land}
|
39
|
+
"landCover": crop_land,
|
40
|
+
"value": 0.5}
|
50
41
|
|
51
42
|
indicator_bad_area_value = {
|
52
43
|
"term": indicator,
|
@@ -73,13 +64,13 @@ good_inputs_production_indicator_from_forest_to_forest = {
|
|
73
64
|
"landCover": forest}
|
74
65
|
|
75
66
|
good_during_cycle_indicator_from_forest_to_cropland = {
|
76
|
-
"term": indicator,
|
67
|
+
"term": indicator | {'@id': 'landTransformation20YearAverageDuringCycle'},
|
77
68
|
"value": 0.5,
|
78
69
|
"previousLandCover": forest,
|
79
70
|
"landCover": crop_land}
|
80
71
|
|
81
72
|
good_during_cycle_indicator_from_forest_to_forest = {
|
82
|
-
"term": indicator,
|
73
|
+
"term": indicator | {'@id': 'landTransformation20YearAverageDuringCycle'},
|
83
74
|
"value": 0.5,
|
84
75
|
"previousLandCover": forest,
|
85
76
|
"landCover": forest}
|
@@ -91,6 +82,7 @@ good_during_cycle_indicator_from_forest_to_forest = {
|
|
91
82
|
([], True, 0),
|
92
83
|
([wrong_indicator], True, 0),
|
93
84
|
([indicator_no_land_cover], False, 0),
|
85
|
+
([indicator_no_previous_land_cover], False, 0),
|
94
86
|
([indicator_bad_area_value], False, 0),
|
95
87
|
([good_during_cycle_indicator_from_forest_to_cropland], True, 1),
|
96
88
|
([good_during_cycle_indicator_from_forest_to_forest], True, 1),
|
@@ -103,6 +95,7 @@ good_during_cycle_indicator_from_forest_to_forest = {
|
|
103
95
|
ids=["No emissionsResourceUse => run, 0 dict",
|
104
96
|
"Wrong indicator termid => run, 0 dict",
|
105
97
|
"Indicator no landcover terms => no run",
|
98
|
+
"Indicator no previousLandCover terms => no run",
|
106
99
|
"Bad m2 / year value => no run",
|
107
100
|
"One good during cycle transformation => run, 1 dict",
|
108
101
|
"One 0 during cycle transformation => run, 1 dict",
|
@@ -196,7 +196,8 @@ def test_get_sums_of_crop_expansion():
|
|
196
196
|
"brazil_empty_example",
|
197
197
|
"gbr_example",
|
198
198
|
"malaysia",
|
199
|
-
"prior_landCover"
|
199
|
+
"prior_landCover",
|
200
|
+
"nigeria_cassava"
|
200
201
|
]
|
201
202
|
)
|
202
203
|
@patch(f"{CLASS_PATH}._new_management", side_effect=fake_new_management)
|
@@ -12,7 +12,8 @@ fixtures_folder = os.path.join(fixtures_path, MODEL, MODEL_KEY)
|
|
12
12
|
|
13
13
|
_LAND_COVER_TERM_BY_SITE_TYPE = {
|
14
14
|
SiteSiteType.ANIMAL_HOUSING.value: "animalHousing",
|
15
|
-
SiteSiteType.CROPLAND.value: "cropland"
|
15
|
+
SiteSiteType.CROPLAND.value: "cropland",
|
16
|
+
SiteSiteType.AGRI_FOOD_PROCESSOR.value: "agriFoodProcessor"
|
16
17
|
}
|
17
18
|
_folders = [d for d in os.listdir(fixtures_folder) if os.path.isdir(os.path.join(fixtures_folder, d))]
|
18
19
|
|
File without changes
|
File without changes
|
File without changes
|