hestia-earth-models 0.62.6__py3-none-any.whl → 0.63.0__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/longFallowRatio.py +9 -9
- hestia_earth/models/mocking/search-results.json +1 -1
- hestia_earth/models/pooreNemecek2018/{longFallowPeriod.py → longFallowDuration.py} +2 -2
- hestia_earth/models/pooreNemecek2018/rotationDuration.py +5 -5
- hestia_earth/models/utils/cycle.py +2 -2
- hestia_earth/models/version.py +1 -1
- {hestia_earth_models-0.62.6.dist-info → hestia_earth_models-0.63.0.dist-info}/METADATA +1 -1
- {hestia_earth_models-0.62.6.dist-info → hestia_earth_models-0.63.0.dist-info}/RECORD +13 -13
- tests/models/cycle/test_longFallowRatio.py +5 -5
- tests/models/pooreNemecek2018/{test_longFallowPeriod.py → test_longFallowDuration.py} +1 -1
- {hestia_earth_models-0.62.6.dist-info → hestia_earth_models-0.63.0.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.62.6.dist-info → hestia_earth_models-0.63.0.dist-info}/WHEEL +0 -0
- {hestia_earth_models-0.62.6.dist-info → hestia_earth_models-0.63.0.dist-info}/top_level.txt +0 -0
|
@@ -8,7 +8,7 @@ from . import MODEL
|
|
|
8
8
|
REQUIREMENTS = {
|
|
9
9
|
"Cycle": {
|
|
10
10
|
"practices": [
|
|
11
|
-
{"@type": "Practice", "value": "> 0", "term.@id": "
|
|
11
|
+
{"@type": "Practice", "value": "> 0", "term.@id": "longFallowDuration"},
|
|
12
12
|
{"@type": "Practice", "value": "> 0", "term.@id": "rotationDuration"}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -27,26 +27,26 @@ def _practice(value: float):
|
|
|
27
27
|
return practice
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
def _run(
|
|
31
|
-
value = rotationDuration / (rotationDuration -
|
|
30
|
+
def _run(longFallowDuration: float, rotationDuration: float):
|
|
31
|
+
value = rotationDuration / (rotationDuration - longFallowDuration)
|
|
32
32
|
return [_practice(value)]
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
def _should_run(cycle: dict):
|
|
36
36
|
practices = cycle.get('practices', [])
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
longFallowDuration = list_sum(find_term_match(practices, 'longFallowDuration', {}).get('value', 0), 0)
|
|
39
39
|
rotationDuration = list_sum(find_term_match(practices, 'rotationDuration', {}).get('value', 0), 0)
|
|
40
40
|
|
|
41
41
|
logRequirements(cycle, model=MODEL, term=TERM_ID,
|
|
42
|
-
|
|
42
|
+
longFallowDuration=longFallowDuration,
|
|
43
43
|
rotationDuration=rotationDuration)
|
|
44
44
|
|
|
45
|
-
should_run = all([
|
|
45
|
+
should_run = all([longFallowDuration > 0, rotationDuration > 0])
|
|
46
46
|
logShouldRun(cycle, MODEL, TERM_ID, should_run)
|
|
47
|
-
return should_run,
|
|
47
|
+
return should_run, longFallowDuration, rotationDuration
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
def run(cycle: dict):
|
|
51
|
-
should_run,
|
|
52
|
-
return _run(
|
|
51
|
+
should_run, longFallowDuration, rotationDuration = _should_run(cycle)
|
|
52
|
+
return _run(longFallowDuration, rotationDuration) if should_run else []
|
|
@@ -11,14 +11,14 @@ REQUIREMENTS = {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
LOOKUPS = {
|
|
14
|
-
"crop": "
|
|
14
|
+
"crop": "Plantation_longFallowDuration"
|
|
15
15
|
}
|
|
16
16
|
RETURNS = {
|
|
17
17
|
"Practice": [{
|
|
18
18
|
"value": ""
|
|
19
19
|
}]
|
|
20
20
|
}
|
|
21
|
-
TERM_ID = '
|
|
21
|
+
TERM_ID = 'longFallowDuration'
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
def _practice(value: float):
|
|
@@ -2,7 +2,7 @@ from hestia_earth.models.log import debugValues, log_as_table
|
|
|
2
2
|
from hestia_earth.models.utils.practice import _new_practice
|
|
3
3
|
from hestia_earth.models.utils import sum_values
|
|
4
4
|
from .plantationLifespan import _get_value as get_plantationLifespan
|
|
5
|
-
from .
|
|
5
|
+
from .longFallowDuration import _get_value as get_longFallowDuration
|
|
6
6
|
from .utils import run_products_average
|
|
7
7
|
from . import MODEL
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ REQUIREMENTS = {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
LOOKUPS = {
|
|
15
|
-
"crop": ["Plantation_lifespan", "
|
|
15
|
+
"crop": ["Plantation_lifespan", "Plantation_longFallowDuration"]
|
|
16
16
|
}
|
|
17
17
|
RETURNS = {
|
|
18
18
|
"Practice": [{
|
|
@@ -31,15 +31,15 @@ def _practice(value: float):
|
|
|
31
31
|
def _get_value(cycle: dict):
|
|
32
32
|
def get(product: dict):
|
|
33
33
|
plantationLifespan = get_plantationLifespan(product)
|
|
34
|
-
|
|
34
|
+
longFallowDuration = get_longFallowDuration(product)
|
|
35
35
|
product_id = product.get('term').get('@id')
|
|
36
36
|
product_id_logs = log_as_table({
|
|
37
37
|
'plantationLifespan': plantationLifespan,
|
|
38
|
-
'
|
|
38
|
+
'longFallowDuration': longFallowDuration
|
|
39
39
|
})
|
|
40
40
|
debugValues(cycle, model=MODEL, term=TERM_ID,
|
|
41
41
|
**{product_id: product_id_logs})
|
|
42
|
-
return sum_values([plantationLifespan,
|
|
42
|
+
return sum_values([plantationLifespan, longFallowDuration])
|
|
43
43
|
return get
|
|
44
44
|
|
|
45
45
|
|
|
@@ -469,6 +469,6 @@ def get_animals_by_period(cycle: dict, period: AnimalReferencePeriod = AnimalRef
|
|
|
469
469
|
def get_allowed_sites(model: str, term_id: str, termType: TermTermType, cycle: dict):
|
|
470
470
|
sites = non_empty_list([cycle.get('site', None)]) + cycle.get('otherSites', [])
|
|
471
471
|
allowed_sites = [s for s in sites if is_siteType_allowed(s, {'@id': term_id, 'termType': termType.value})]
|
|
472
|
-
|
|
473
|
-
|
|
472
|
+
allowed_site_ids = non_empty_list([s.get('@id', s.get('id')) for s in allowed_sites])
|
|
473
|
+
debugValues(cycle, model=model, term=term_id, site_ids=';'.join(allowed_site_ids))
|
|
474
474
|
return allowed_sites
|
hestia_earth/models/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = '0.
|
|
1
|
+
VERSION = '0.63.0'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hestia-earth-models
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.63.0
|
|
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=KQp9cUKE-aIcYJoMWEtKFYS8gBFfsx5LKQhqoW
|
|
|
4
4
|
hestia_earth/models/log.py,sha256=DbfNcGzaC5hzkuMDxQqW6XYoNBI4Uxw4SIoOYoZA6og,3474
|
|
5
5
|
hestia_earth/models/preload_requests.py,sha256=Ibx-YOhR_1yuyFBxsLUbvJHVK7PLyMLoPu5l9jDN_Qk,1342
|
|
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=gA5_Bj5-CBV6LXgvlenTaXCJJNDsCnX2WFR-jHXi9F8,19
|
|
8
8
|
hestia_earth/models/agribalyse2016/__init__.py,sha256=WvK0qCQbnYtg9oZxrACd1wGormZyXibPtpCnIQeDqbw,415
|
|
9
9
|
hestia_earth/models/agribalyse2016/fuelElectricity.py,sha256=tnGxBmJdPfPFfehLUQcefEqy1lHvzsSpx_s7O8nf3Zs,4412
|
|
10
10
|
hestia_earth/models/agribalyse2016/machineryInfrastructureDepreciatedAmountPerCycle.py,sha256=_Rbngu0DzHKa62JwBl58ZC_ui1zLF2que_nB7ukhOQc,3392
|
|
@@ -48,7 +48,7 @@ hestia_earth/models/cycle/excretaKgVs.py,sha256=ed-DcQoQXZgWF8UZDs2N-G6EBIOPmpXu
|
|
|
48
48
|
hestia_earth/models/cycle/inorganicFertiliser.py,sha256=Yt5NcP9FQEzWwlritrPGbhh2W9wR378OM3lDPBzDiL4,6967
|
|
49
49
|
hestia_earth/models/cycle/irrigatedTypeUnspecified.py,sha256=KlIa5eDvT47Twz6Q1kpw0rMlRjCK25CExaW58DEvc9w,2125
|
|
50
50
|
hestia_earth/models/cycle/liveAnimal.py,sha256=LWAMnNKRoLDdChrGApVIN-Ns7em0Lspz5UtLbf7PPLY,3988
|
|
51
|
-
hestia_earth/models/cycle/longFallowRatio.py,sha256=
|
|
51
|
+
hestia_earth/models/cycle/longFallowRatio.py,sha256=_h0kub99sACO87IfjMeiu8IgdK2jaeBlgGA9A9-ViZA,1683
|
|
52
52
|
hestia_earth/models/cycle/milkYield.py,sha256=RhzePjkvEAGicTzRA4eatc0K_4NSGHhyEhYF0EbbGXw,5820
|
|
53
53
|
hestia_earth/models/cycle/pastureGrass.py,sha256=7PrmDMJPtsbKGa8WIOh_4NXNtbH3Pxb23pmjawQuY9o,1226
|
|
54
54
|
hestia_earth/models/cycle/pastureSystem.py,sha256=uksVgl_3bp_t2niwZ5BvS3VT-Kndx26Se6GpzqG0bX8,2709
|
|
@@ -373,7 +373,7 @@ hestia_earth/models/linkedImpactAssessment/landTransformationFromPermanentPastur
|
|
|
373
373
|
hestia_earth/models/linkedImpactAssessment/utils.py,sha256=dGwGc2d-8_WQElTpfyPmz5vQtL-LHQRmiZnCTuPXMDs,1876
|
|
374
374
|
hestia_earth/models/mocking/__init__.py,sha256=n3Fkkrvh8zHNWiJZmnfQ7WZ91JRzAO9P6pSG1JpwtXo,687
|
|
375
375
|
hestia_earth/models/mocking/mock_search.py,sha256=qgABw-sZK37XtsALKt8AHF2VJPUrZSnHv5Qj1Dn93oA,2405
|
|
376
|
-
hestia_earth/models/mocking/search-results.json,sha256
|
|
376
|
+
hestia_earth/models/mocking/search-results.json,sha256=-BZt5OSwu_1B2DMyPuhUdQTWmv1iymSRUQsCKCh6-oQ,46412
|
|
377
377
|
hestia_earth/models/pooreNemecek2018/__init__.py,sha256=nPboL7ULJzL5nJD5q7q9VOZt_fxbKVm8fmn1Az5YkVY,417
|
|
378
378
|
hestia_earth/models/pooreNemecek2018/aboveGroundCropResidueTotal.py,sha256=Qt-mel4dkhK6N5uUOutNOinCTFjbjtGzITaaI0LvYc4,2396
|
|
379
379
|
hestia_earth/models/pooreNemecek2018/belowGroundCropResidue.py,sha256=JT0RybbvWVlo01FO8K0Yj41HrEaJT3Kj1xfayr2X-xw,2315
|
|
@@ -382,7 +382,7 @@ hestia_earth/models/pooreNemecek2018/excretaKgN.py,sha256=kLWtv49c1sD3YrporqRcmw
|
|
|
382
382
|
hestia_earth/models/pooreNemecek2018/excretaKgVs.py,sha256=nlnZSDx-bIvtukL79Syhon0cSQ8o4OC1YKtAG6haGhI,8500
|
|
383
383
|
hestia_earth/models/pooreNemecek2018/freshwaterWithdrawalsDuringCycle.py,sha256=HB_9q5eE6al2Te3v29hC5wqxsYe4P46ZAPwdWNzx3v0,3939
|
|
384
384
|
hestia_earth/models/pooreNemecek2018/landOccupationDuringCycle.py,sha256=jE110XgPMgfnBMUXyKIL5SL9yZWYhdGr5NrfHcqn2h0,2785
|
|
385
|
-
hestia_earth/models/pooreNemecek2018/
|
|
385
|
+
hestia_earth/models/pooreNemecek2018/longFallowDuration.py,sha256=Wdm6QyOttCFP9Y3OjbaYrvdMmivOmMIT-m5Eg9SM9rY,1511
|
|
386
386
|
hestia_earth/models/pooreNemecek2018/n2OToAirAquacultureSystemsDirect.py,sha256=HJ7IstImGyasIKosK2lQZ-v6Lqt3_aEfZhoiC4CY0rM,2586
|
|
387
387
|
hestia_earth/models/pooreNemecek2018/n2ToAirAquacultureSystems.py,sha256=SoZlogDd7_4kq5S9gc8KmVeIXacWWhaUkWlKTuho_OA,2431
|
|
388
388
|
hestia_earth/models/pooreNemecek2018/nh3ToAirAquacultureSystems.py,sha256=4TDILoagYMVBSBbVXEecIOv-pzQ-W2Hg6rpL58t1-J4,4001
|
|
@@ -397,7 +397,7 @@ hestia_earth/models/pooreNemecek2018/nurseryDuration.py,sha256=_k8OCZxCiT5hrWGLx
|
|
|
397
397
|
hestia_earth/models/pooreNemecek2018/plantationDensity.py,sha256=-y-zXHFPet0LdIgSG-o2hV_sdIOLeuWoRikW2DPi3kk,957
|
|
398
398
|
hestia_earth/models/pooreNemecek2018/plantationLifespan.py,sha256=FudC-csC1IkiFOJ_uD0s6_rwsgqVrUN6Ej7A03JXDsM,959
|
|
399
399
|
hestia_earth/models/pooreNemecek2018/plantationProductiveLifespan.py,sha256=Q54woX67eUab0qEEAuW2naFGhnVPJHrMas3bG92KNeg,1740
|
|
400
|
-
hestia_earth/models/pooreNemecek2018/rotationDuration.py,sha256=
|
|
400
|
+
hestia_earth/models/pooreNemecek2018/rotationDuration.py,sha256=j5hW_NEKYQbeMcdsqp2nQIDXCnUdZIKURzAmPCiegQk,1525
|
|
401
401
|
hestia_earth/models/pooreNemecek2018/saplings.py,sha256=LS0zepV51-LlVmPBAjj5nlfgaJFnQF6wo40sgoFCr3Y,2258
|
|
402
402
|
hestia_earth/models/pooreNemecek2018/utils.py,sha256=to2vtONKCbuG1gVSDvsUcG7EnlahELfG_57gzIAHlv0,1710
|
|
403
403
|
hestia_earth/models/recipe2016Egalitarian/__init__.py,sha256=OvZoSgfaMe6DWIdqr-Sx3ouzXlp994oro7Mi0Xid18Q,422
|
|
@@ -542,7 +542,7 @@ hestia_earth/models/utils/crop.py,sha256=kG054fryqPSBpmzvJFBy_CLiOdjrt7RMk5uTItO
|
|
|
542
542
|
hestia_earth/models/utils/cropResidue.py,sha256=_0Q35CrliJeo31xGHsPWe8A2oHxijdIsOrf3gBEqhlA,612
|
|
543
543
|
hestia_earth/models/utils/cropResidueManagement.py,sha256=nIDFjf39rDD10UHSVudfDyu-EiL261g8jyrgS-2aDKw,347
|
|
544
544
|
hestia_earth/models/utils/currency.py,sha256=f_ArJANb--pZq4LL49SXQ1AMX_oKroqwBXKRRQqZwsM,578
|
|
545
|
-
hestia_earth/models/utils/cycle.py,sha256=
|
|
545
|
+
hestia_earth/models/utils/cycle.py,sha256=W-VIReb1OVooV6EIj-P6gUlr-W17_6USdnnj4ihMTTc,16741
|
|
546
546
|
hestia_earth/models/utils/descriptive_stats.py,sha256=qOyG8_TpWYmaxZ0h99n9L71gDLLiVMrMf0ChtxnZLjw,8559
|
|
547
547
|
hestia_earth/models/utils/ecoClimateZone.py,sha256=NHFt-A9EiWXC6tUNIxkgOWUZOjj4I4uwJIP9ddDZegw,1112
|
|
548
548
|
hestia_earth/models/utils/emission.py,sha256=5Dz8Z4P6QXbYSvOzVcqJy3R_oZMrp77_Iwj5xZsxsKc,3769
|
|
@@ -619,7 +619,7 @@ tests/models/cycle/test_feedConversionRatio.py,sha256=V6zpZvUmBN0LciJW5YbHHaRQX6
|
|
|
619
619
|
tests/models/cycle/test_inorganicFertiliser.py,sha256=c-JDYC0qDK4JWlYDaGX53AcKfetz_YifSfdhy-v-WMo,642
|
|
620
620
|
tests/models/cycle/test_irrigatedTypeUnspecified.py,sha256=9YGwpDO_RHMaldvjJZ0xdrdfUzYDnLPt6nMJ2eRXSTI,2151
|
|
621
621
|
tests/models/cycle/test_liveAnimal.py,sha256=7fRPgEnIwcir-tYwUNnr6gc2e5_vnZi-t8EuuiPioeM,2139
|
|
622
|
-
tests/models/cycle/test_longFallowRatio.py,sha256=
|
|
622
|
+
tests/models/cycle/test_longFallowRatio.py,sha256=sztr1pysldwedTC78JWUHAVWl2oL0jTIQ13c6Nxzlso,1512
|
|
623
623
|
tests/models/cycle/test_milkYield.py,sha256=7e5JJzLkc47OnQf3xni1Nkyq7N4xi1RglnE8caE9TfY,1778
|
|
624
624
|
tests/models/cycle/test_pastureGrass.py,sha256=hNRjBLYXGybzHPMfBOCgcRjGkDBmW0k_G6tn9TLrycY,1025
|
|
625
625
|
tests/models/cycle/test_pastureSystem.py,sha256=VlPn4mlaNimiu3liV5EMELJueUCqSSJ1l82yMV0UK90,1590
|
|
@@ -933,7 +933,7 @@ tests/models/pooreNemecek2018/test_excretaKgN.py,sha256=lKM-Q7TjQoxjvjY9tCcmJxoW
|
|
|
933
933
|
tests/models/pooreNemecek2018/test_excretaKgVs.py,sha256=LIoLevR0tHrZwazuGprt6SCFtmDrj4NBq1s1SJEhQCA,3252
|
|
934
934
|
tests/models/pooreNemecek2018/test_freshwaterWithdrawalsDuringCycle.py,sha256=5QxDU6VzcwWup3Nuhn32kJoIlAkqcSggGr4CmoRqrFA,1623
|
|
935
935
|
tests/models/pooreNemecek2018/test_landOccupationDuringCycle.py,sha256=XbsApbRIuzq4GeaN7PrzlMA7grU7y6j_HPesgQIf_Uw,1650
|
|
936
|
-
tests/models/pooreNemecek2018/
|
|
936
|
+
tests/models/pooreNemecek2018/test_longFallowDuration.py,sha256=kelZajIbKyvVm1vX_grRZy0IUrtejGI5GPn03qbElnw,925
|
|
937
937
|
tests/models/pooreNemecek2018/test_n2OToAirAquacultureSystemsDirect.py,sha256=4YAoUhIwfEmRe2B5BvNg247VeB7UXHNeZqr2mRtJA7Y,2207
|
|
938
938
|
tests/models/pooreNemecek2018/test_n2ToAirAquacultureSystems.py,sha256=YqwAvbYfLVamfkUJUwGTEWEnz8ts66jVF8831QcWNkg,2200
|
|
939
939
|
tests/models/pooreNemecek2018/test_nh3ToAirAquacultureSystems.py,sha256=aTXdtjp3j3vZkRF3C8aHcFwnWZH-FkfTWVdIIZYBaK8,2945
|
|
@@ -1100,8 +1100,8 @@ tests/models/utils/test_source.py,sha256=mv3vHZV5cjpoLA2I1109-YUkuzAiuhbRSnv_76_
|
|
|
1100
1100
|
tests/models/utils/test_term.py,sha256=M5Sa26v2gzQYbZ4H_fo7DspnaCx__-WtL-MULGapCWk,3509
|
|
1101
1101
|
tests/models/webbEtAl2012AndSintermannEtAl2012/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1102
1102
|
tests/models/webbEtAl2012AndSintermannEtAl2012/test_nh3ToAirOrganicFertiliser.py,sha256=qi2FNXS5Af2WDtm7nq_FsprH3BfCF0XxnE0XHmC4aIY,2244
|
|
1103
|
-
hestia_earth_models-0.
|
|
1104
|
-
hestia_earth_models-0.
|
|
1105
|
-
hestia_earth_models-0.
|
|
1106
|
-
hestia_earth_models-0.
|
|
1107
|
-
hestia_earth_models-0.
|
|
1103
|
+
hestia_earth_models-0.63.0.dist-info/LICENSE,sha256=AC7h7GAgCZGJK_Tzh6LUCrML9gQEfowWwecEw2w54QM,1154
|
|
1104
|
+
hestia_earth_models-0.63.0.dist-info/METADATA,sha256=MK-JrrKU5oV4srRZkm6T31CFsmoyaAr1NpMWMJ6zb3M,3343
|
|
1105
|
+
hestia_earth_models-0.63.0.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
|
1106
|
+
hestia_earth_models-0.63.0.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
|
|
1107
|
+
hestia_earth_models-0.63.0.dist-info/RECORD,,
|
|
@@ -13,19 +13,19 @@ fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
|
|
|
13
13
|
'test_name,cycle,expected_should_run',
|
|
14
14
|
[
|
|
15
15
|
(
|
|
16
|
-
'no
|
|
16
|
+
'no longFallowDuration => no run',
|
|
17
17
|
{'practices': []},
|
|
18
18
|
False
|
|
19
19
|
),
|
|
20
20
|
(
|
|
21
|
-
'with
|
|
22
|
-
{'practices': [{'term': {'@id': '
|
|
21
|
+
'with longFallowDuration no rotationDuration => no run',
|
|
22
|
+
{'practices': [{'term': {'@id': 'longFallowDuration'}, 'value': [10]}]},
|
|
23
23
|
False
|
|
24
24
|
),
|
|
25
25
|
(
|
|
26
|
-
'with
|
|
26
|
+
'with longFallowDuration and rotationDuration => run',
|
|
27
27
|
{'practices': [
|
|
28
|
-
{'term': {'@id': '
|
|
28
|
+
{'term': {'@id': 'longFallowDuration'}, 'value': [10]},
|
|
29
29
|
{'term': {'@id': 'rotationDuration'}, 'value': [10]}
|
|
30
30
|
]},
|
|
31
31
|
True
|
|
@@ -2,7 +2,7 @@ from unittest.mock import patch
|
|
|
2
2
|
import json
|
|
3
3
|
from tests.utils import fixtures_path, fake_new_practice
|
|
4
4
|
|
|
5
|
-
from hestia_earth.models.pooreNemecek2018.
|
|
5
|
+
from hestia_earth.models.pooreNemecek2018.longFallowDuration import MODEL, TERM_ID, run
|
|
6
6
|
|
|
7
7
|
class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
|
|
8
8
|
fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|