hestia-earth-models 0.61.5__py3-none-any.whl → 0.61.6__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.

@@ -91,7 +91,11 @@ def _should_run(cycle: dict):
91
91
  weightAtMaturity=lookup_value,
92
92
  liveweightPerHead=liveweightPerHead_value)
93
93
 
94
- should_run = all([country_id, value.get('value') is not None, lookup_value >= liveweightPerHead_value])
94
+ should_run = all([
95
+ country_id,
96
+ lookup_value is not None,
97
+ lookup_value is None or liveweightPerHead_value is None or lookup_value >= liveweightPerHead_value
98
+ ])
95
99
  logShouldRun(cycle, MODEL, term_id, should_run)
96
100
 
97
101
  return should_run
@@ -694,7 +694,7 @@ def _should_run(cycle: dict) -> tuple:
694
694
  """
695
695
  cycle_id = cycle.get("@id")
696
696
  site = get_site(cycle)
697
- cycles = related_cycles(site.get("@id"))
697
+ cycles = related_cycles(site)
698
698
 
699
699
  grouped_soc_stocks = _get_grouped_soc_stocks(site)
700
700
  grouped_soc_stock_changes = _calc_grouped_soc_stock_changes(grouped_soc_stocks)
@@ -1891,11 +1891,12 @@ def _get_carbon_sources_from_cycles(cycles: dict) -> list[CarbonSource]:
1891
1891
  inputs_and_products = non_empty_list(flatten(
1892
1892
  [cycle.get("inputs", []) + cycle.get("products", []) for cycle in cycles]
1893
1893
  ))
1894
+ crop_residue_terms = get_crop_residue_incorporated_or_left_on_field_terms()
1894
1895
 
1895
1896
  return non_empty_list([
1896
1897
  _iterate_carbon_source(node) for node in inputs_and_products
1897
1898
  if any([
1898
- node.get("term", {}).get("@id") in get_crop_residue_incorporated_or_left_on_field_terms(),
1899
+ node.get("term", {}).get("@id") in crop_residue_terms,
1899
1900
  node.get("term", {}).get("termType") in CARBON_SOURCE_TERM_TYPES
1900
1901
  ])
1901
1902
  ])
@@ -3236,9 +3237,10 @@ def _get_carbon_input_kwargs(
3236
3237
  cumulative_threshold=MIN_AREA_THRESHOLD
3237
3238
  )
3238
3239
 
3240
+ cover_crop_property_terms = get_cover_crop_property_terms()
3239
3241
  has_cover_crop = cumulative_nodes_match(
3240
3242
  lambda node: any(
3241
- get_node_property(node, term_id, False).get("value", False) for term_id in get_cover_crop_property_terms()
3243
+ get_node_property(node, term_id, False).get("value", False) for term_id in cover_crop_property_terms
3242
3244
  ),
3243
3245
  land_cover_nodes,
3244
3246
  cumulative_threshold=MIN_AREA_THRESHOLD
@@ -3515,7 +3517,7 @@ def _should_run(site: dict) -> tuple[bool, dict]:
3515
3517
  site_type = site.get("siteType", "")
3516
3518
  management_nodes = site.get("management", [])
3517
3519
  measurement_nodes = site.get("measurements", [])
3518
- cycles = related_cycles(site.get("@id"))
3520
+ cycles = related_cycles(site)
3519
3521
 
3520
3522
  has_management = len(management_nodes) > 0
3521
3523
  has_measurements = len(measurement_nodes) > 0
@@ -3768,14 +3770,16 @@ def _get_grouped_climate_measurements(grouped_measurements: dict) -> dict:
3768
3770
 
3769
3771
 
3770
3772
  def _get_grouped_irrigated_monthly(grouped_cycles: dict) -> dict:
3773
+ irrigated_terms = get_irrigated_terms()
3774
+
3771
3775
  return {
3772
3776
  year: {
3773
- _InventoryKey.IRRIGATED_MONTHLY: _get_irrigated_monthly(year, cycles)
3777
+ _InventoryKey.IRRIGATED_MONTHLY: _get_irrigated_monthly(year, cycles, irrigated_terms)
3774
3778
  } for year, cycles in grouped_cycles.items()
3775
3779
  }
3776
3780
 
3777
3781
 
3778
- def _get_irrigated_monthly(year: int, cycles: list[dict]) -> list[bool]:
3782
+ def _get_irrigated_monthly(year: int, cycles: list[dict], irrigated_terms: list[str]) -> list[bool]:
3779
3783
  # Get practice nodes and add "startDate" and "endDate" from cycle if missing.
3780
3784
  irrigation_nodes = non_empty_list(flatten([
3781
3785
  [
@@ -3793,7 +3797,7 @@ def _get_irrigated_monthly(year: int, cycles: list[dict]) -> list[bool]:
3793
3797
  return [
3794
3798
  cumulative_nodes_term_match(
3795
3799
  grouped_nodes.get(year, {}).get(month, []),
3796
- target_term_ids=get_irrigated_terms(),
3800
+ target_term_ids=irrigated_terms,
3797
3801
  cumulative_threshold=MIN_AREA_THRESHOLD
3798
3802
  ) for month in range(1, 13)
3799
3803
  ]
@@ -3862,12 +3866,13 @@ def _check_is_paddy_rice(cycles: list[dict]) -> bool:
3862
3866
  default_node_value=MIN_YIELD_THRESHOLD
3863
3867
  ) for cycle in cycles)
3864
3868
 
3869
+ reice_terms = get_upland_rice_crop_terms() + get_upland_rice_land_cover_terms()
3865
3870
  has_upland_rice_products = any(cumulative_nodes_term_match(
3866
3871
  filter_list_term_type(
3867
3872
  cycle.get("products", []) + cycle.get("practices", []),
3868
3873
  [TermTermType.CROP, TermTermType.FORAGE, TermTermType.LANDCOVER]
3869
3874
  ),
3870
- target_term_ids=get_upland_rice_crop_terms() + get_upland_rice_land_cover_terms(),
3875
+ target_term_ids=reice_terms,
3871
3876
  cumulative_threshold=MIN_YIELD_THRESHOLD,
3872
3877
  default_node_value=MIN_YIELD_THRESHOLD
3873
3878
  ) for cycle in cycles)
@@ -1,23 +1,20 @@
1
+ import os
1
2
  from hestia_earth.models.utils import measurement, site
2
3
 
3
4
  from .mock_search import mock as mock_search
4
5
 
6
+ CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
7
+ RESULTS_PATH = os.path.join(CURRENT_DIR, 'search-results.json')
5
8
 
6
- def enable_mock(node: dict = None):
7
- """
8
- Mock calls to Hestia API using pre-loaded search results.
9
9
 
10
- Parameters
11
- ----------
12
- node : dict
13
- Optional - The node used to run calculations. This is especially useful when running calculations on a Site.
14
- """
10
+ def enable_mock(filepath: str, node: dict = None):
15
11
  # apply mocks on search results
16
- mock_search()
17
- # skip fetch bibliography data
18
- measurement.include_source = lambda v, *args: v
12
+ mock_search(filepath)
19
13
 
20
14
  if node is not None:
15
+ # skip fetch bibliography data
16
+ measurement.include_source = lambda v, *args: v
17
+
21
18
  # mock related cycles to return the current node
22
19
  fake_node = {'@id': 'fake-cycle', **node}
23
20
  site.download_hestia = lambda *args: fake_node
@@ -1,13 +1,9 @@
1
- import os
2
1
  from inspect import getmembers, isfunction
3
2
  import json
4
3
  from hestia_earth.utils.tools import flatten
5
4
 
6
- from hestia_earth.models.log import logger
7
5
  from hestia_earth.models.utils import term
8
6
 
9
- CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
10
- RESULTS_PATH = os.path.join(CURRENT_DIR, 'search-results.json')
11
7
  IGNORE_FUNC = ['get_lookup_value', 'get_table_value']
12
8
 
13
9
 
@@ -49,24 +45,27 @@ def create_search_results():
49
45
  return list(map(_create_search_result, funcs))
50
46
 
51
47
 
52
- def _load_results():
53
- with open(RESULTS_PATH) as f:
48
+ def _load_results(filepath: str):
49
+ with open(filepath) as f:
54
50
  return json.load(f)
55
51
 
56
52
 
57
- def _find_search_result(query: dict):
58
- search_results = _load_results()
53
+ def _find_search_result(filepath: str, query: dict):
54
+ search_results = _load_results(filepath)
59
55
  res = next((n for n in search_results if n['query'] == query), {})
60
- logger.debug('mocking search result: %s', res)
61
56
  return res.get('results', [])
62
57
 
63
58
 
64
- def _fake_search(query: dict, *_a, **_b): return _find_search_result(query)
59
+ def _fake_search(filepath: str):
60
+ def mock(query: dict, *_a, **_b): return _find_search_result(filepath, query)
61
+ return mock
65
62
 
66
63
 
67
- def _fake_find_node(_n, query: dict, *_a, **_b): return _find_search_result(query)
64
+ def _fake_find_node(filepath: str):
65
+ def mock(_n, query: dict, *_a, **_b): return _find_search_result(filepath, query)
66
+ return mock
68
67
 
69
68
 
70
- def mock():
71
- term.search = _fake_search
72
- term.find_node = _fake_find_node
69
+ def mock(filepath: str):
70
+ term.search = _fake_search(filepath)
71
+ term.find_node = _fake_find_node(filepath)
@@ -1390,7 +1390,7 @@
1390
1390
  "@type": "Term",
1391
1391
  "name": "Generic crop, seed",
1392
1392
  "@id": "genericCropSeed",
1393
- "_score": 25.694489
1393
+ "_score": 25.694498
1394
1394
  }
1395
1395
  ]
1396
1396
  },
@@ -0,0 +1,32 @@
1
+ """
2
+ Preload all search requests to avoid making the same searches many times while running models.
3
+ """
4
+ import json
5
+
6
+ from .log import logger
7
+ from .mocking.mock_search import create_search_results
8
+ from .mocking import RESULTS_PATH, enable_mock as _mock
9
+
10
+
11
+ def enable_preload(filepath: str = RESULTS_PATH, node: dict = None):
12
+ """
13
+ Prefetch calls to Hestia API in a local file.
14
+
15
+ Parameters
16
+ ----------
17
+ filepath : str
18
+ The path of the file containing the search results. Defaults to current library folder.
19
+ node : dict
20
+ Optional - The node used to run calculations. This is especially useful when running calculations on a Site.
21
+ """
22
+ logger.debug('Preloading search results and storing in %s', filepath)
23
+
24
+ # build the search results
25
+ data = create_search_results()
26
+
27
+ # store in file
28
+ with open(filepath, 'w') as f:
29
+ f.write(json.dumps(data, indent=2, ensure_ascii=False))
30
+
31
+ # enable mock search results from file
32
+ _mock(filepath=filepath, node=node)
@@ -198,7 +198,7 @@ def _get_relevant_inputs(cycles: List[dict]) -> List:
198
198
 
199
199
  def _should_run(site: dict):
200
200
  # Only get related cycles once.
201
- cycles = related_cycles(site.get("@id"))
201
+ cycles = related_cycles(site)
202
202
 
203
203
  products_land_cover = [
204
204
  _extract_node_value(
@@ -44,7 +44,7 @@ def region_level_1_id(term_id: str):
44
44
  def is_site(site: dict): return site.get('@type', site.get('type')) == SchemaType.SITE.value
45
45
 
46
46
 
47
- def related_cycles(site_id: str):
47
+ def related_cycles(site: dict):
48
48
  """
49
49
  Get the list of `Cycle` related to the `Site`.
50
50
  Gets the `recalculated` data if available, else `original`.
@@ -59,8 +59,9 @@ def related_cycles(site_id: str):
59
59
  list[dict]
60
60
  The related `Cycle`s as `dict`.
61
61
  """
62
- nodes = find_related(SchemaType.SITE, site_id, SchemaType.CYCLE)
63
- return non_empty_list(map(lambda node: _load_calculated_node(node, SchemaType.CYCLE), nodes or []))
62
+ cached_nodes = [n for n in cached_value(site, 'related', []) if n.get('@type') == SchemaType.CYCLE.value]
63
+ related_nodes = cached_nodes or find_related(SchemaType.SITE, site.get('@id'), SchemaType.CYCLE) or []
64
+ return non_empty_list(map(lambda node: _load_calculated_node(node, SchemaType.CYCLE), related_nodes))
64
65
 
65
66
 
66
67
  def _cycle_year(cycle: dict, key: str):
@@ -73,7 +74,7 @@ def related_years(site: dict):
73
74
  sorted(non_empty_list(set(flatten([
74
75
  _cycle_year(cycle, 'startDate'),
75
76
  _cycle_year(cycle, 'endDate')
76
- ] for cycle in related_cycles(site.get('@id'))))))
77
+ ] for cycle in related_cycles(site)))))
77
78
  )
78
79
 
79
80
 
@@ -1 +1 @@
1
- VERSION = '0.61.5'
1
+ VERSION = '0.61.6'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hestia-earth-models
3
- Version: 0.61.5
3
+ Version: 0.61.6
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
@@ -53,6 +53,13 @@ from hestia_earth.models.pooreNemecek2018 import run
53
53
  run('no3ToGroundwaterSoilFlux', cycle_data)
54
54
  ```
55
55
 
56
+ Additionally, to reduce the number of queries to the HESTIA API and run the models faster, prefetching can be enabled:
57
+ ```python
58
+ from hestia_earth.models.preload_requests import enable_preload
59
+
60
+ enable_preload()
61
+ ```
62
+
56
63
  ### Using Spatial Models
57
64
 
58
65
  We have models that can gap-fill geographical information on a `Site`. If you want to use these models:
@@ -2,8 +2,9 @@ hestia_earth/__init__.py,sha256=G-d438vPx7m_ks5e9XTtM3u7LDRO5dSSukibukWmyPM,56
2
2
  hestia_earth/models/__init__.py,sha256=qEFeq3yuf3lQKVseALmL8aPM8fpCS54B_5pry00M3hk,76
3
3
  hestia_earth/models/cache_sites.py,sha256=KQp9cUKE-aIcYJoMWEtKFYS8gBFfsx5LKQhqoWpUSoM,6065
4
4
  hestia_earth/models/log.py,sha256=b63I3qyTtQs17xxbq8RI0Fv2lvZ1oDZ9k0njhxqiFFk,3459
5
+ hestia_earth/models/preload_requests.py,sha256=elhYQTxBVuFlZROWvZ3yErDzzMLdMUIjBhmpdaTUSi8,1012
5
6
  hestia_earth/models/requirements.py,sha256=znNZJAhwX2iYiKcAQXPftY7z_1MsNa0QxCXkXyHm_U0,17363
6
- hestia_earth/models/version.py,sha256=B-nNMbNCza5Xs1ctuDa5VlUAhx8D4prlU9I-wHx7Hcg,19
7
+ hestia_earth/models/version.py,sha256=dBBOYPfbTEoLiqkPnN90IsOKd58x-WvuZYLLtlCWK5k,19
7
8
  hestia_earth/models/agribalyse2016/__init__.py,sha256=WvK0qCQbnYtg9oZxrACd1wGormZyXibPtpCnIQeDqbw,415
8
9
  hestia_earth/models/agribalyse2016/fuelElectricity.py,sha256=mrh8seYSYdTgcMDCETLiknuPeJehg071YoG4UiyW0yU,4404
9
10
  hestia_earth/models/agribalyse2016/machineryInfrastructureDepreciatedAmountPerCycle.py,sha256=_Rbngu0DzHKa62JwBl58ZC_ui1zLF2que_nB7ukhOQc,3392
@@ -219,7 +220,7 @@ hestia_earth/models/ipcc2019/ch4ToAirEntericFermentation.py,sha256=khX90Njkmlvos
219
220
  hestia_earth/models/ipcc2019/ch4ToAirExcreta.py,sha256=IzYHdnzT8Z-WQGoZIt9-O98VqriA5rKr38He_TbYadk,6723
220
221
  hestia_earth/models/ipcc2019/ch4ToAirFloodedRice.py,sha256=TJ4J7VA5n4RPrJYZQeR3lc3ZoCw7T1E5Cb1XJewr834,7331
221
222
  hestia_earth/models/ipcc2019/co2ToAirLimeHydrolysis.py,sha256=7z0zdqiiWQwkyJCgSNMoK2mft3cJkTRlqwKrMuSKdWI,2454
222
- hestia_earth/models/ipcc2019/co2ToAirSoilOrganicCarbonStockChangeManagementChange.py,sha256=kWrWxhr-48jmbyt57EIjth8IWsl5-Yt1I-uTBSUqFuA,25381
223
+ hestia_earth/models/ipcc2019/co2ToAirSoilOrganicCarbonStockChangeManagementChange.py,sha256=X-pUmOa7oy6uvgr0cMDeKRLVIQvh-4bjjrronvd0F3k,25370
223
224
  hestia_earth/models/ipcc2019/co2ToAirUreaHydrolysis.py,sha256=071H3ykjzJFW2K5PKvbAaeIj0aL8LTzMiG_pIeYEpEc,3520
224
225
  hestia_earth/models/ipcc2019/croppingDuration.py,sha256=_jlFrTNDOARH2_g8s4dzuaCoLHSX2BHzSQd3uuQN32Y,3173
225
226
  hestia_earth/models/ipcc2019/ligninContent.py,sha256=wp5EbCthCDAKyvPBfZULS9-uKEY58TQQ8ey1pf-juv8,7267
@@ -240,13 +241,13 @@ hestia_earth/models/ipcc2019/no3ToGroundwaterInorganicFertiliser.py,sha256=eyPfy
240
241
  hestia_earth/models/ipcc2019/no3ToGroundwaterOrganicFertiliser.py,sha256=px2SN-uaus2cftXzlsYCUAxLuon6BnDXmaFI9xhQrgU,3347
241
242
  hestia_earth/models/ipcc2019/noxToAirInorganicFertiliser.py,sha256=fmmFgjtvOD2TrrLY03jYly_KvDnCsAXqhL_tmZQQt-A,4480
242
243
  hestia_earth/models/ipcc2019/noxToAirOrganicFertiliser.py,sha256=9dx_MRTwJGxJRq6mj2EJQMdQ2w6j7lw0fQk0If_cIGc,4152
243
- hestia_earth/models/ipcc2019/organicCarbonPerHa.py,sha256=omxrtnAZ58qHQYIhi38R7VFn7SRzf8Kk89KgP0VELFQ,141507
244
+ hestia_earth/models/ipcc2019/organicCarbonPerHa.py,sha256=x2U3FwZuM-lVDCzXmj5eCFOt8b3DIszeebnYIFWCeBc,141712
244
245
  hestia_earth/models/ipcc2019/pastureGrass.py,sha256=Q3uX7IcTk0PmzxqEhU3JAcHb5LnUymZbmdRFP9xXsfo,8713
245
246
  hestia_earth/models/ipcc2019/pastureGrass_utils.py,sha256=nUJYYkovzF7QD4LeUqhV5mBYFKdrhxeG4gyPRv0Xpuk,16002
246
247
  hestia_earth/models/ipcc2019/utils.py,sha256=MSDMu15D9DnilFUgi4_6jYXC0FaKso3OODauGTMB6hs,6229
247
248
  hestia_earth/models/ipcc2019/animal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
248
249
  hestia_earth/models/ipcc2019/animal/pastureGrass.py,sha256=xPtuTiKeAvBhv9d7B6Upw_cbP6YxKykVJ3_p0S_EtZg,10689
249
- hestia_earth/models/ipcc2019/animal/weightAtMaturity.py,sha256=PlT11hX2nBIwDMsQs3E0XeJZ5BCA023_ibpXPreTncI,3558
250
+ hestia_earth/models/ipcc2019/animal/weightAtMaturity.py,sha256=5smSAmKVCIlELCD6S_3I16YuSWNFhcClGDOdvrIuYsE,3657
250
251
  hestia_earth/models/ipcc2021/__init__.py,sha256=VTgGFKhwMmk_nuI1RRq0in27fHYVPBonlXlPK00K8no,409
251
252
  hestia_earth/models/ipcc2021/gwp100.py,sha256=v-DYU-11XnWI1Ns1GEiKrJqL3JafxvhTsLmuBuFcxJU,1021
252
253
  hestia_earth/models/jarvisAndPain1994/__init__.py,sha256=ercUwy29sV7oPIESj8UjsGB5lqiBCss9OZcbjxeeG8E,418
@@ -357,9 +358,9 @@ hestia_earth/models/linkedImpactAssessment/landTransformationFromOtherNaturalVeg
357
358
  hestia_earth/models/linkedImpactAssessment/landTransformationFromPermanentPasture100YearAverageInputsProduction.py,sha256=7btlXl5PL47qIjfs-w_xLZY_nsRnJAwTREtt8LpY6UI,1052
358
359
  hestia_earth/models/linkedImpactAssessment/landTransformationFromPermanentPasture20YearAverageInputsProduction.py,sha256=pdluhfRQuJK0EHq-L0s0TOf37tvOQYB-M-wZiuSbarw,1050
359
360
  hestia_earth/models/linkedImpactAssessment/utils.py,sha256=dGwGc2d-8_WQElTpfyPmz5vQtL-LHQRmiZnCTuPXMDs,1876
360
- hestia_earth/models/mocking/__init__.py,sha256=kmSeOTSvurMUxw7Ajhf3G-SVPQ1NgmirMTk4TSOEicY,765
361
- hestia_earth/models/mocking/mock_search.py,sha256=B_ATXOyeP_zVhQRktqJP5BZfLFCzE09o9XqDitkggG8,2086
362
- hestia_earth/models/mocking/search-results.json,sha256=kD4tqX17b_Nijn8P4aPLe6E8Otipufy2XV-zLqEyhd0,41184
361
+ hestia_earth/models/mocking/__init__.py,sha256=n3Fkkrvh8zHNWiJZmnfQ7WZ91JRzAO9P6pSG1JpwtXo,687
362
+ hestia_earth/models/mocking/mock_search.py,sha256=dBCDRfbZmbMLKP21u_VYkxyimomqs-zztjX-_ZNKuuM,2036
363
+ hestia_earth/models/mocking/search-results.json,sha256=Em88H12lmHhXF5ocZ0Qtm1ALNqW5GZXl2gRhtATc3Wk,41184
363
364
  hestia_earth/models/pooreNemecek2018/__init__.py,sha256=nPboL7ULJzL5nJD5q7q9VOZt_fxbKVm8fmn1Az5YkVY,417
364
365
  hestia_earth/models/pooreNemecek2018/aboveGroundCropResidueTotal.py,sha256=Qt-mel4dkhK6N5uUOutNOinCTFjbjtGzITaaI0LvYc4,2396
365
366
  hestia_earth/models/pooreNemecek2018/belowGroundCropResidue.py,sha256=JT0RybbvWVlo01FO8K0Yj41HrEaJT3Kj1xfayr2X-xw,2315
@@ -458,7 +459,7 @@ hestia_earth/models/site/brackishWater.py,sha256=dl-R_vwFlXwAkir3grhCYZTLf05FYrf
458
459
  hestia_earth/models/site/cationExchangeCapacityPerKgSoil.py,sha256=0eH4A-tXJ0hvIkiYXWxlx8TfrdbIKUGYUDk97-yQJgg,3653
459
460
  hestia_earth/models/site/flowingWater.py,sha256=0ZuSXMr3EUTY3wsy8hdfuXeZcNX-n3D45MfX3dwyaeA,1728
460
461
  hestia_earth/models/site/freshWater.py,sha256=z-C_Il0U6UhZUQUPwh72Z0vixmSrUNEmBN5Lz-nl9_w,1254
461
- hestia_earth/models/site/management.py,sha256=F_zcXlW100pwdSfRyT8GxB_l1LMnAWzyVMe40qjV9ws,8843
462
+ hestia_earth/models/site/management.py,sha256=o9WIvbxip6B-jbQdgko6H2l1neQ0Z5ZpcPJmM5gcYlw,8832
462
463
  hestia_earth/models/site/netPrimaryProduction.py,sha256=UIIQkYd911qVzrWjxBLrC37e-RARIVgDwLdARY9BuLw,1849
463
464
  hestia_earth/models/site/organicCarbonPerHa.py,sha256=-qQWy1BI4vZJJNMS1RCluZ34dOTqR0lblXSOZLjkhOo,14362
464
465
  hestia_earth/models/site/organicCarbonPerKgSoil.py,sha256=t--wAshiAKS-JvEKhLFRadGvgSBv5NFZ68jdyms_wh4,1945
@@ -547,7 +548,7 @@ hestia_earth/models/utils/practice.py,sha256=tNadOzsrNlCEt801B815XaruJXzZ5yPASam
547
548
  hestia_earth/models/utils/product.py,sha256=H9UqJNzTqtMWXDQnbRkZlTpv_hg4s-Tya469fBk8InA,10143
548
549
  hestia_earth/models/utils/productivity.py,sha256=bUBVCZInGqHuHZvHDSYPQkjWXQxOtTjEk-1-f_BsFOo,594
549
550
  hestia_earth/models/utils/property.py,sha256=gHPEmy3Sw599ox64Gv-LCvjhP1THlBXBaBlTOK5lvog,5060
550
- hestia_earth/models/utils/site.py,sha256=oLuai82WdN_qAAG09XmLEbhf7-jr7AT7BGxRBUs1Bno,3292
551
+ hestia_earth/models/utils/site.py,sha256=XIpPGqByjpfrPxxcqt9iMAcIpsPUBfAENFnf8fz0iEE,3429
551
552
  hestia_earth/models/utils/source.py,sha256=HhZkvQoFdy6j6FC2cwP5EbHXHFM4pif9gpnuzeDwEh4,1746
552
553
  hestia_earth/models/utils/temperature.py,sha256=ljlG4-yCgFFb6LRZweb18cZKLrr7K2mqd4E4Hz_D1f8,476
553
554
  hestia_earth/models/utils/term.py,sha256=n_T1Qp_0z9ZUgrbVACNKue-5yDePOCkDw8g8dlMKSTM,17763
@@ -1064,13 +1065,13 @@ tests/models/utils/test_measurement.py,sha256=UGCUzuc3gHltehpuOA7dj0DJJY4xcVrQOJ
1064
1065
  tests/models/utils/test_practice.py,sha256=ILaxkb3qICor9AquAGYiOtA-YKnq0hppmJQzNC_VNyA,612
1065
1066
  tests/models/utils/test_product.py,sha256=kwvgAeeEoRgkeStX0zQcFd-4DJhoUhX6Apaks0MU2L0,2305
1066
1067
  tests/models/utils/test_property.py,sha256=t2npw86IK7C6G4ypiPtanFi0db4PB7G5VBR1GjRGl34,618
1067
- tests/models/utils/test_site.py,sha256=5nCW3onTk6GF_N-h4NYDrlSoxHhXY2GVMbjaDsicbSE,1187
1068
+ tests/models/utils/test_site.py,sha256=9MXbP5JXl0mYaH-yVHJINnZu_MYwj-ogsJWZ3XTHxas,1196
1068
1069
  tests/models/utils/test_source.py,sha256=mv3vHZV5cjpoLA2I1109-YUkuzAiuhbRSnv_76_f0CA,631
1069
1070
  tests/models/utils/test_term.py,sha256=M5Sa26v2gzQYbZ4H_fo7DspnaCx__-WtL-MULGapCWk,3509
1070
1071
  tests/models/webbEtAl2012AndSintermannEtAl2012/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1071
1072
  tests/models/webbEtAl2012AndSintermannEtAl2012/test_nh3ToAirOrganicFertiliser.py,sha256=qi2FNXS5Af2WDtm7nq_FsprH3BfCF0XxnE0XHmC4aIY,2244
1072
- hestia_earth_models-0.61.5.dist-info/LICENSE,sha256=AC7h7GAgCZGJK_Tzh6LUCrML9gQEfowWwecEw2w54QM,1154
1073
- hestia_earth_models-0.61.5.dist-info/METADATA,sha256=ysVUlLWO6-b7GOw12O3oUg5q9uC43Fy3GeMDawIAHEQ,3134
1074
- hestia_earth_models-0.61.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1075
- hestia_earth_models-0.61.5.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
1076
- hestia_earth_models-0.61.5.dist-info/RECORD,,
1073
+ hestia_earth_models-0.61.6.dist-info/LICENSE,sha256=AC7h7GAgCZGJK_Tzh6LUCrML9gQEfowWwecEw2w54QM,1154
1074
+ hestia_earth_models-0.61.6.dist-info/METADATA,sha256=1nFjqi4tnhv8KZF_xP_-yxVdOx2dZZjeadqlh3M_QW4,3350
1075
+ hestia_earth_models-0.61.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1076
+ hestia_earth_models-0.61.6.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
1077
+ hestia_earth_models-0.61.6.dist-info/RECORD,,
@@ -21,7 +21,7 @@ def test_region_level_1_id():
21
21
  @patch(f"{class_path}.find_related", return_value=[CYCLE])
22
22
  @patch(f"{class_path}._load_calculated_node", return_value=CYCLE)
23
23
  def test_related_cycles(*args):
24
- assert related_cycles('id') == [CYCLE]
24
+ assert related_cycles({'@id': 'id'}) == [CYCLE]
25
25
 
26
26
 
27
27
  def test_valid_site_type():