hestia-earth-models 0.73.6__py3-none-any.whl → 0.73.7__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/hestia/landCover.py +3 -3
- hestia_earth/models/hestia/pastureSystem.py +1 -1
- hestia_earth/models/mocking/search-results.json +911 -911
- hestia_earth/models/utils/lookup.py +9 -4
- hestia_earth/models/version.py +1 -1
- {hestia_earth_models-0.73.6.dist-info → hestia_earth_models-0.73.7.dist-info}/METADATA +1 -1
- {hestia_earth_models-0.73.6.dist-info → hestia_earth_models-0.73.7.dist-info}/RECORD +10 -10
- {hestia_earth_models-0.73.6.dist-info → hestia_earth_models-0.73.7.dist-info}/LICENSE +0 -0
- {hestia_earth_models-0.73.6.dist-info → hestia_earth_models-0.73.7.dist-info}/WHEEL +0 -0
- {hestia_earth_models-0.73.6.dist-info → hestia_earth_models-0.73.7.dist-info}/top_level.txt +0 -0
|
@@ -14,7 +14,7 @@ from hestia_earth.models.utils import _omit
|
|
|
14
14
|
from hestia_earth.models.utils.constant import DAYS_IN_YEAR
|
|
15
15
|
from hestia_earth.models.utils.management import _new_management
|
|
16
16
|
from hestia_earth.models.utils.term import get_lookup_value
|
|
17
|
-
from hestia_earth.models.utils.lookup import get_region_lookup_value
|
|
17
|
+
from hestia_earth.models.utils.lookup import get_region_lookup, get_region_lookup_value
|
|
18
18
|
from hestia_earth.models.utils.blank_node import DatestrFormat, _gapfill_datestr, DatestrGapfillMode
|
|
19
19
|
from .utils import (
|
|
20
20
|
IPCC_LAND_USE_CATEGORY_ANNUAL,
|
|
@@ -586,10 +586,10 @@ def _get_sums_of_crop_expansion(country_id: str, year: int, include_negatives: b
|
|
|
586
586
|
Sum net expansion for all annual and permanent crops, returned as two values.
|
|
587
587
|
Returns a tuple of (expansion of annual crops, expansion of permanent crops)
|
|
588
588
|
"""
|
|
589
|
-
lookup =
|
|
589
|
+
lookup = get_region_lookup(lookup_name=_LOOKUP_EXPANSION, term_id=country_id)
|
|
590
590
|
columns = lookup_columns(lookup)
|
|
591
591
|
values = {
|
|
592
|
-
name:
|
|
592
|
+
name: get_table_value(lookup, 'termid', country_id, column_name(name))
|
|
593
593
|
for name in columns if name != "termid"
|
|
594
594
|
}
|
|
595
595
|
|
|
@@ -41,7 +41,7 @@ def _practice(term_id: str):
|
|
|
41
41
|
def _run(cycle: dict):
|
|
42
42
|
end_date = cycle.get('endDate')
|
|
43
43
|
measurements = cycle.get('site', {}).get('measurements', [])
|
|
44
|
-
slope = measurement_value(most_relevant_blank_node_by_id(measurements, 'slope', end_date))
|
|
44
|
+
slope = measurement_value(most_relevant_blank_node_by_id(measurements, 'slope', end_date), default=0)
|
|
45
45
|
term_id = 'confinedPastureSystem' if slope <= 2.5 else 'hillyPastureSystem'
|
|
46
46
|
|
|
47
47
|
debugValues(cycle, model=MODEL, term=term_id,
|