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

@@ -53,7 +53,7 @@ def _emission(value: float):
53
53
 
54
54
  def _run(cycle: dict, drainageClass: list):
55
55
  P_total, _ = get_liquid_slurry_sludge_P_total(cycle)
56
- value = 0.07 * (1 + P_total * 0.2/80) * (6 if drainageClass > 3 else 0)
56
+ value = 0.07 * (1 + P_total * 0.2/80) * (6 if drainageClass > 4 else 0)
57
57
  return [_emission(value)]
58
58
 
59
59
 
@@ -41,7 +41,7 @@ def _emission(value: float):
41
41
 
42
42
  def _run(cycle: dict, drainageClass: list):
43
43
  P_total, _ = get_liquid_slurry_sludge_P_total(cycle)
44
- value = 0.07 * (1 + P_total * 0.2/80) * (0 if drainageClass > 3 else 1)
44
+ value = 0.07 * (1 + P_total * 0.2/80) * (0 if drainageClass > 4 else 1)
45
45
  return [_emission(value)]
46
46
 
47
47
 
@@ -114,13 +114,14 @@ def _group_measurements_by_date_method_term(measurements):
114
114
  return group_by_result
115
115
 
116
116
 
117
- def _run_harmonisation(measurements: list, needed_depths: list):
117
+ def _run_harmonisation(measurements: list) -> list:
118
118
  results = []
119
119
  grouped_measurements = _group_measurements_by_date_method_term(
120
120
  _expand_multiple_measurements(measurements)
121
121
  )
122
122
 
123
123
  for (date, method, term_id), measurements_list in grouped_measurements.items():
124
+ needed_depths = _get_depths_from_measurements(measurements_list)
124
125
  # For a target depth
125
126
  for depth_upper, depth_lower in needed_depths:
126
127
  modelled_value = _harmonise_measurements(
@@ -144,13 +145,9 @@ def _run_harmonisation(measurements: list, needed_depths: list):
144
145
  return results
145
146
 
146
147
 
147
- def _run_gap_fill_depths(measurements_missing_depths: list) -> list:
148
- return [dict(m, **{"depthUpper": 0, "depthLower": 30}) for m in measurements_missing_depths]
149
-
150
-
151
- def _get_needed_depths(site: dict) -> list:
148
+ def _get_depths_from_measurements(measurements: list) -> list:
152
149
  needed_depths = list(STANDARD_DEPTHS)
153
- for measurement in site.get("measurements", []):
150
+ for measurement in measurements:
154
151
  if (measurement.get("depthUpper"), measurement.get("depthLower")) in needed_depths:
155
152
  needed_depths.remove((int(measurement["depthUpper"]), int(measurement["depthLower"])))
156
153
 
@@ -164,34 +161,19 @@ def _should_run(site: dict, model_key: str):
164
161
  m.get('value', [])
165
162
  ])]
166
163
 
167
- measurements_with_depths = [m for m in measurements if all([
168
- "depthUpper" in m,
169
- "depthLower" in m,
170
- (int(m.get("depthUpper", 0)), int(m.get("depthLower", 0))) not in STANDARD_DEPTHS
171
- ])]
164
+ measurements_with_depths = [m for m in measurements if "depthUpper" in m and "depthLower" in m]
172
165
  has_measurements_with_depths = len(measurements_with_depths) > 0
173
166
 
174
- measurements_missing_depth_recommended = [m for m in measurements if all([
175
- "depthUpper" not in m,
176
- "depthLower" not in m,
177
- not get_lookup_value(m.get("term", {}), LOOKUPS["measurement"][1], model=MODEL, model_key=model_key)
178
- ])]
179
-
180
167
  logRequirements(site, model=MODEL, model_key=model_key,
181
- has_measurements_with_depths=has_measurements_with_depths,
182
- has_missing_depths=bool(measurements_missing_depth_recommended))
168
+ has_measurements_with_depths=has_measurements_with_depths)
183
169
 
184
- should_run = has_measurements_with_depths or bool(measurements_missing_depth_recommended)
185
- for measurement in measurements_with_depths + measurements_missing_depth_recommended:
170
+ should_run = has_measurements_with_depths
171
+ for measurement in measurements_with_depths:
186
172
  term_id = measurement.get("term", {}).get("@id", {})
187
173
  logShouldRun(site, MODEL, term_id, should_run)
188
- return should_run, measurements_with_depths, measurements_missing_depth_recommended
174
+ return should_run, measurements_with_depths
189
175
 
190
176
 
191
177
  def run(site: dict):
192
- should_run, measurements_with_depths, measurements_missing_depth = _should_run(site=site, model_key=MODEL_KEY)
193
- needed_depths = _get_needed_depths(site)
194
- return non_empty_list(flatten(
195
- _run_harmonisation(measurements=measurements_with_depths, needed_depths=needed_depths)
196
- + _run_gap_fill_depths(measurements_missing_depths=measurements_missing_depth)
197
- )) if should_run else []
178
+ should_run, measurements_with_depths = _should_run(site=site, model_key=MODEL_KEY)
179
+ return non_empty_list(flatten(_run_harmonisation(measurements=measurements_with_depths))) if should_run else []
@@ -1,4 +1,4 @@
1
- from .site import WATER_TYPES
1
+ from .site import WATER_TYPES, valid_site_type as site_valid_site_type
2
2
 
3
3
 
4
- def valid_site_type(cycle: dict): return cycle.get('site', {}).get('siteType') in WATER_TYPES
4
+ def valid_site_type(cycle: dict): return site_valid_site_type(cycle.get('site', {}), WATER_TYPES)
@@ -1,8 +1,9 @@
1
- from hestia_earth.schema import TermTermType
1
+ from hestia_earth.schema import TermTermType, SiteSiteType
2
2
  from hestia_earth.utils.model import find_primary_product
3
3
  from hestia_earth.utils.tools import safe_parse_float
4
4
 
5
5
  from .term import get_lookup_value
6
+ from .site import valid_site_type as site_valid_site_type
6
7
 
7
8
  FAO_LOOKUP_COLUMN = 'cropGroupingFAO'
8
9
  FAOSTAT_AREA_LOOKUP_COLUMN = 'cropGroupingFaostatArea'
@@ -34,3 +35,25 @@ def get_N2ON_fertiliser_coeff_from_primary_product(model: str, log_id: str, cycl
34
35
 
35
36
  def is_plantation(model: str, log_id: str, term_id: str):
36
37
  return get_crop_lookup_value(model, log_id, term_id, 'isPlantation')
38
+
39
+
40
+ def valid_site_type(cycle: dict, include_permanent_pasture=False):
41
+ """
42
+ Check if the `site.siteType` of the cycle is `cropland`.
43
+
44
+ Parameters
45
+ ----------
46
+ cycle : dict
47
+ The `Cycle`.
48
+ include_permanent_pasture : bool
49
+ If set to `True`, `permanent pasture` is also allowed. Defaults to `False`.
50
+
51
+ Returns
52
+ -------
53
+ bool
54
+ `True` if `siteType` matches the allowed values, `False` otherwise.
55
+ """
56
+ site_types = [SiteSiteType.CROPLAND.value] + (
57
+ [SiteSiteType.PERMANENT_PASTURE.value] if include_permanent_pasture else []
58
+ )
59
+ return site_valid_site_type(cycle.get('site', {}), site_types)
@@ -9,7 +9,6 @@ from .property import get_node_property
9
9
  from .completeness import _is_term_type_complete
10
10
  from .blank_node import get_N_total, get_P2O5_total
11
11
  from .measurement import most_relevant_measurement_value
12
- from .site import valid_site_type as site_valid_site_type
13
12
  from .crop import is_plantation
14
13
  from .currency import DEFAULT_CURRENCY
15
14
  from .inorganicFertiliser import get_cycle_inputs as get_inorganicFertiliser_inputs
@@ -330,28 +329,6 @@ def land_occupation_per_kg(model: str, term_id: str, cycle: dict, site: dict, pr
330
329
  )
331
330
 
332
331
 
333
- def valid_site_type(cycle: dict, include_permanent_pasture=False):
334
- """
335
- Check if the `site.siteType` of the cycle is `cropland`.
336
-
337
- Parameters
338
- ----------
339
- cycle : dict
340
- The `Cycle`.
341
- include_permanent_pasture : bool
342
- If set to `True`, `permanent pasture` is also allowed. Defaults to `False`.
343
-
344
- Returns
345
- -------
346
- bool
347
- `True` if `siteType` matches the allowed values, `False` otherwise.
348
- """
349
- site_types = [SiteSiteType.CROPLAND.value] + (
350
- [SiteSiteType.PERMANENT_PASTURE.value] if include_permanent_pasture else []
351
- )
352
- return site_valid_site_type(cycle.get('site', {}), site_types)
353
-
354
-
355
332
  def is_organic(cycle: dict):
356
333
  """
357
334
  Check if the `Cycle` is organic, i.e. if it contains an organic standard label `Practice`.
@@ -1,10 +1,10 @@
1
+ from hestia_earth.schema import SchemaType
1
2
  from hestia_earth.utils.lookup import (
2
3
  download_lookup, get_table_value, column_name, extract_grouped_data, _get_single_table_value
3
4
  )
4
5
  from hestia_earth.utils.tools import list_sum, safe_parse_float, non_empty_list
5
6
 
6
7
  from ..log import debugValues
7
- from .site import is_site
8
8
 
9
9
 
10
10
  def _node_value(node):
@@ -73,6 +73,9 @@ def _aware_factor_value(model: str, term_id: str, lookup_name: str, aware_id: st
73
73
  _ALLOW_ALL = 'all'
74
74
 
75
75
 
76
+ def _is_site(site: dict): return site.get('@type', site.get('type')) == SchemaType.SITE.value
77
+
78
+
76
79
  def _model_lookup_values(model: str, term: dict, restriction: str):
77
80
  lookup = download_lookup(f"{term.get('termType')}-model-{restriction}.csv")
78
81
  values = get_table_value(lookup, 'termid', term.get('@id'), column_name(model))
@@ -80,7 +83,7 @@ def _model_lookup_values(model: str, term: dict, restriction: str):
80
83
 
81
84
 
82
85
  def is_model_siteType_allowed(model: str, term: dict, data: dict):
83
- site = data if is_site(data) else data.get('site', data.get('cycle', {}).get('site')) or {}
86
+ site = data if _is_site(data) else data.get('site', data.get('cycle', {}).get('site')) or {}
84
87
  site_type = site.get('siteType')
85
88
  allowed_values = _model_lookup_values(model, term, 'siteTypesAllowed')
86
89
  return True if _ALLOW_ALL in allowed_values or not site_type else site_type in allowed_values
@@ -93,7 +96,7 @@ def _lookup_values(term: dict, column: str):
93
96
 
94
97
 
95
98
  def is_siteType_allowed(data: dict, term: dict):
96
- site = data if is_site(data) else data.get('site', data.get('cycle', {}).get('site')) or {}
99
+ site = data if _is_site(data) else data.get('site', data.get('cycle', {}).get('site')) or {}
97
100
  site_type = site.get('siteType')
98
101
  allowed_values = _lookup_values(term, 'siteTypesAllowed')
99
102
  return True if _ALLOW_ALL in allowed_values or not site_type else site_type in allowed_values
@@ -1,7 +1,7 @@
1
1
  from hestia_earth.schema import SchemaType, SiteSiteType, TermTermType
2
2
  from hestia_earth.utils.api import find_related
3
3
  from hestia_earth.utils.lookup import download_lookup, get_table_value, column_name
4
- from hestia_earth.utils.tools import non_empty_list, safe_parse_date, flatten
4
+ from hestia_earth.utils.tools import non_empty_list, flatten, safe_parse_date
5
5
 
6
6
  from hestia_earth.models.log import debugMissingLookup
7
7
  from . import cached_value, _load_calculated_node
@@ -41,7 +41,29 @@ def region_level_1_id(term_id: str):
41
41
  )
42
42
 
43
43
 
44
- def is_site(site: dict): return site.get('@type', site.get('type')) == SchemaType.SITE.value
44
+ def _cycle_year(cycle: dict, key: str):
45
+ date = safe_parse_date(cycle.get(key))
46
+ return date.year if date else None
47
+
48
+
49
+ def years_from_cycles(cycles: list):
50
+ """
51
+ Get the list of years available for all cycles.
52
+
53
+ Parameters
54
+ ----------
55
+ cycles : list
56
+ List of Cycle as dict.
57
+
58
+ Returns
59
+ -------
60
+ list[int]
61
+ List of years available.
62
+ """
63
+ return sorted(non_empty_list(set(flatten([
64
+ _cycle_year(cycle, 'startDate'),
65
+ _cycle_year(cycle, 'endDate')
66
+ ] for cycle in cycles))))
45
67
 
46
68
 
47
69
  def related_cycles(site: dict):
@@ -64,18 +86,8 @@ def related_cycles(site: dict):
64
86
  return non_empty_list(map(lambda node: _load_calculated_node(node, SchemaType.CYCLE), related_nodes))
65
87
 
66
88
 
67
- def _cycle_year(cycle: dict, key: str):
68
- date = safe_parse_date(cycle.get(key))
69
- return date.year if date else None
70
-
71
-
72
89
  def related_years(site: dict):
73
- return cached_value(site, CACHE_YEARS_KEY) or (
74
- sorted(non_empty_list(set(flatten([
75
- _cycle_year(cycle, 'startDate'),
76
- _cycle_year(cycle, 'endDate')
77
- ] for cycle in related_cycles(site)))))
78
- )
90
+ return cached_value(site, CACHE_YEARS_KEY) or years_from_cycles(related_cycles(site))
79
91
 
80
92
 
81
93
  def related_months(site: dict):
@@ -1 +1 @@
1
- VERSION = '0.61.6'
1
+ VERSION = '0.61.7'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hestia-earth-models
3
- Version: 0.61.6
3
+ Version: 0.61.7
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=b63I3qyTtQs17xxbq8RI0Fv2lvZ1oDZ9k0njhxqiFFk,3459
5
5
  hestia_earth/models/preload_requests.py,sha256=elhYQTxBVuFlZROWvZ3yErDzzMLdMUIjBhmpdaTUSi8,1012
6
6
  hestia_earth/models/requirements.py,sha256=znNZJAhwX2iYiKcAQXPftY7z_1MsNa0QxCXkXyHm_U0,17363
7
- hestia_earth/models/version.py,sha256=dBBOYPfbTEoLiqkPnN90IsOKd58x-WvuZYLLtlCWK5k,19
7
+ hestia_earth/models/version.py,sha256=6Nws4L3uBOwihJSLvy9rIuRjo77dHISAduPpMkcqB_Y,19
8
8
  hestia_earth/models/agribalyse2016/__init__.py,sha256=WvK0qCQbnYtg9oZxrACd1wGormZyXibPtpCnIQeDqbw,415
9
9
  hestia_earth/models/agribalyse2016/fuelElectricity.py,sha256=mrh8seYSYdTgcMDCETLiknuPeJehg071YoG4UiyW0yU,4404
10
10
  hestia_earth/models/agribalyse2016/machineryInfrastructureDepreciatedAmountPerCycle.py,sha256=_Rbngu0DzHKa62JwBl58ZC_ui1zLF2que_nB7ukhOQc,3392
@@ -80,7 +80,7 @@ hestia_earth/models/cycle/feedConversionRatio/feedConversionRatioEnergy.py,sha25
80
80
  hestia_earth/models/cycle/feedConversionRatio/feedConversionRatioFedWeight.py,sha256=7Dss1AIbG7GimQ3-Ecv2wsx1PrblZhHFYhMHWoyvPc4,2140
81
81
  hestia_earth/models/cycle/feedConversionRatio/feedConversionRatioNitrogen.py,sha256=Mgur-o_ki1deMukBS5-ngeqdCIYVBE36kOiY-jB42EY,2581
82
82
  hestia_earth/models/cycle/input/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
- hestia_earth/models/cycle/input/hestiaAggregatedData.py,sha256=X3Tnr6eKXrjFOgBEIyvLjBReHoLAzxeU50j31EXYJXc,5036
83
+ hestia_earth/models/cycle/input/hestiaAggregatedData.py,sha256=7WhSOTUKq9A6mrDwOu5gMOHtkhK0oby8n-DAO4LaWLs,5035
84
84
  hestia_earth/models/cycle/input/properties.py,sha256=r5EF18b_KW8evmdlev0mLQyqwBVgSicKEyilGaBRF6I,3017
85
85
  hestia_earth/models/cycle/input/value.py,sha256=kolH9Fc5GIn9OVH2DgHEaW8ksS4xisy0LerS3WkKK9E,1550
86
86
  hestia_earth/models/cycle/post_checks/__init__.py,sha256=j1d2dVgWbngIemn9ePf7jS-FMdg_MHomFCmaBtm9we4,304
@@ -360,7 +360,7 @@ hestia_earth/models/linkedImpactAssessment/landTransformationFromPermanentPastur
360
360
  hestia_earth/models/linkedImpactAssessment/utils.py,sha256=dGwGc2d-8_WQElTpfyPmz5vQtL-LHQRmiZnCTuPXMDs,1876
361
361
  hestia_earth/models/mocking/__init__.py,sha256=n3Fkkrvh8zHNWiJZmnfQ7WZ91JRzAO9P6pSG1JpwtXo,687
362
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
+ hestia_earth/models/mocking/search-results.json,sha256=-avKhbyd4WJc1by-WLUYhAjV_adov3NNKLkDYKHa9oY,43544
364
364
  hestia_earth/models/pooreNemecek2018/__init__.py,sha256=nPboL7ULJzL5nJD5q7q9VOZt_fxbKVm8fmn1Az5YkVY,417
365
365
  hestia_earth/models/pooreNemecek2018/aboveGroundCropResidueTotal.py,sha256=Qt-mel4dkhK6N5uUOutNOinCTFjbjtGzITaaI0LvYc4,2396
366
366
  hestia_earth/models/pooreNemecek2018/belowGroundCropResidue.py,sha256=JT0RybbvWVlo01FO8K0Yj41HrEaJT3Kj1xfayr2X-xw,2315
@@ -444,8 +444,8 @@ hestia_earth/models/recipe2016Individualist/terrestrialEcotoxicityPotential14Dcb
444
444
  hestia_earth/models/schererPfister2015/__init__.py,sha256=_6FJKfWeAbbS3jFzQ8gEVzoX1LZdPWUTLrow6Hz90U0,419
445
445
  hestia_earth/models/schererPfister2015/nErosionSoilFlux.py,sha256=0l2AByDtq8Ci-36duTnwFvjeelnQ-_TOaeah5A2Yv8U,4924
446
446
  hestia_earth/models/schererPfister2015/pErosionSoilFlux.py,sha256=aWvcphQU4JMGiISXjPLqnakTObFn0VOn1T9z8e4xds0,5029
447
- hestia_earth/models/schererPfister2015/pToDrainageWaterSoilFlux.py,sha256=P-rlpEyfm7JVhStYLDZEe4m7Rn3b-5qRhQCiZqJkoSg,2310
448
- hestia_earth/models/schererPfister2015/pToGroundwaterSoilFlux.py,sha256=8krSt0i8gZBqv4pd82rKcJpVSJM-BPT4KQ-s60GnvaM,1972
447
+ hestia_earth/models/schererPfister2015/pToDrainageWaterSoilFlux.py,sha256=iQs5lLLgGr1thOQ0ZnTLJDJjX7RBwPdu--8p81BZ988,2310
448
+ hestia_earth/models/schererPfister2015/pToGroundwaterSoilFlux.py,sha256=tH-jyd8PFGvEVCO9u4coyVhghYcZyPgbPWQXQsTmDMg,1972
449
449
  hestia_earth/models/schererPfister2015/pToSurfaceWaterSoilFlux.py,sha256=evd2jmFZ9lq-uwXiBTgP5wJ-KTjNBVztjSp8eW9-8qg,2947
450
450
  hestia_earth/models/schererPfister2015/utils.py,sha256=lb2s_RL8Y3i6DRitpsd8Ri3HSyT442MmUHsBPqXb13U,3150
451
451
  hestia_earth/models/schmidt2007/__init__.py,sha256=xheSN6LOGXpWx7Hnv83onhe60Xk1_jk1PJg1nH_aZOQ,412
@@ -473,7 +473,7 @@ hestia_earth/models/site/precipitationMonthly.py,sha256=yGUbiUCu1Prp3qVHuZodGrcf
473
473
  hestia_earth/models/site/rainfallAnnual.py,sha256=Ix_B8Ny7IIRkJ_3lUvoHOjPgqCyR9I0U3_ADUUtMqsY,2003
474
474
  hestia_earth/models/site/rainfallMonthly.py,sha256=2Uo8F-YxnTK0_txlHmiAyVp1bGfWD4bneRKyg4tdQkI,1881
475
475
  hestia_earth/models/site/salineWater.py,sha256=HO31JcUBw5WQYGu9zHNqbARasBubNFgJ7OxSVrK3D2o,1255
476
- hestia_earth/models/site/soilMeasurement.py,sha256=q5CJ4caCqH8pSbQxen0IqTjrFyMRLrrCU2M2BMUgzTE,7851
476
+ hestia_earth/models/site/soilMeasurement.py,sha256=-yWmvl4vZYguVDd2bKdnGB_P4s1XZO_n9u4_aQ6xPLQ,6953
477
477
  hestia_earth/models/site/temperatureAnnual.py,sha256=Q3b1RH2_hpA0JWwOYA5nKgMGcXHjV8-akXT9vB0cbwc,2012
478
478
  hestia_earth/models/site/temperatureMonthly.py,sha256=yXwpFCGT2tUqvVBNedaPyBmN_KlzZqo5yv2TWem1pBk,1890
479
479
  hestia_earth/models/site/totalNitrogenPerKgSoil.py,sha256=8ERrTZpN_yCRUyFg_EYaX4abE9jLcyX3lx3MO4Bi6CE,1938
@@ -520,15 +520,15 @@ hestia_earth/models/usetoxV2/freshwaterEcotoxicityPotentialCtue.py,sha256=oYNwTh
520
520
  hestia_earth/models/utils/__init__.py,sha256=5FY8tpFa7QjwAIsMTt2-QLB5_0Gy5AkAKk_BsKjE1CY,4400
521
521
  hestia_earth/models/utils/aggregated.py,sha256=sz6usleZmo_tC_hIvmGgYsX8-H0dulXmmhHK4EkA5Kg,4946
522
522
  hestia_earth/models/utils/animalProduct.py,sha256=M5IunAKGY6oZv3j1Ascl34ywyeLWApqOIlBzbtlA2FE,721
523
- hestia_earth/models/utils/aquacultureManagement.py,sha256=3uSTSMDNNPa26NTJGZCYwByv3QZVyxj6bh2aFCoBzHk,126
523
+ hestia_earth/models/utils/aquacultureManagement.py,sha256=dxrbC1Xf140cohxTbSw6TxLAnAASWTdNZwBBam4yQnw,171
524
524
  hestia_earth/models/utils/blank_node.py,sha256=VcWvWRG4hlurgQG8PzklIa7SiZnuR6fnhC_TpE_9wuM,41977
525
525
  hestia_earth/models/utils/completeness.py,sha256=2-GusD9UycobDZq8y5jar0ZcOjyqnSbzPRT_5XMc4YA,1259
526
526
  hestia_earth/models/utils/constant.py,sha256=5H7odhRwU_LmUhYwf8c1LsdqXSYbLWkuknvtRDqUBTQ,3194
527
- hestia_earth/models/utils/crop.py,sha256=S8UycHpkgx_TznW3Q7pchEMlCQ623T_SqU6V5fBLBLc,1520
527
+ hestia_earth/models/utils/crop.py,sha256=kG054fryqPSBpmzvJFBy_CLiOdjrt7RMk5uTItO5ADg,2246
528
528
  hestia_earth/models/utils/cropResidue.py,sha256=_0Q35CrliJeo31xGHsPWe8A2oHxijdIsOrf3gBEqhlA,612
529
529
  hestia_earth/models/utils/cropResidueManagement.py,sha256=nIDFjf39rDD10UHSVudfDyu-EiL261g8jyrgS-2aDKw,347
530
530
  hestia_earth/models/utils/currency.py,sha256=f_ArJANb--pZq4LL49SXQ1AMX_oKroqwBXKRRQqZwsM,578
531
- hestia_earth/models/utils/cycle.py,sha256=FMUqDnklfirQwode4dtgk5NyApBCHzPNKn9Jyvt3Wg8,16639
531
+ hestia_earth/models/utils/cycle.py,sha256=QgTmfds-SGEqGJNqEZ5A1iAxCZ54Ac0QPSmqECHPFeg,15927
532
532
  hestia_earth/models/utils/ecoClimateZone.py,sha256=NHFt-A9EiWXC6tUNIxkgOWUZOjj4I4uwJIP9ddDZegw,1112
533
533
  hestia_earth/models/utils/emission.py,sha256=AVp-ngrb4VHYT8BG1QA5EEb17edT3cLonsXV3cNm04U,1576
534
534
  hestia_earth/models/utils/excretaManagement.py,sha256=NuWPQjFZxMVt9sYgBjcqhGWCFk_OKb3sA9Ovcff3fRQ,428
@@ -540,7 +540,7 @@ hestia_earth/models/utils/indicator.py,sha256=fPq38ifd53xWbuOfoiVwiA0Nwa7jVPJLSA
540
540
  hestia_earth/models/utils/inorganicFertiliser.py,sha256=wTQKnr_fPse-G8aP3Dxrj8mzNSQgXvNL9auy_RWzY5Q,1894
541
541
  hestia_earth/models/utils/input.py,sha256=YycsAbSBfVDMu6PftDsisMFGnEp87wOj-3rrnHnOgzo,4927
542
542
  hestia_earth/models/utils/liveAnimal.py,sha256=GnajBPZw5d94raf80KtLloaOqlfqGAPwUtP9bRlGWeE,1754
543
- hestia_earth/models/utils/lookup.py,sha256=3tXnOaTGF91NhL9NsM0hQ05Vm_bQQG6aNgC5dEq0KdQ,6255
543
+ hestia_earth/models/utils/lookup.py,sha256=9yAw8JILIeAmnAC0dL1Yi6xB4h9quzV3GJQGUKe8ers,6370
544
544
  hestia_earth/models/utils/measurement.py,sha256=c0Zkz0a5hWxpYJ83aWsWTeSsukfh-dzjKlCmuj1vCY4,8070
545
545
  hestia_earth/models/utils/organicFertiliser.py,sha256=2HY-a0EBzUw4DkEAXClLMXVCEZTKYf0BwFHBo7lQ5Tg,363
546
546
  hestia_earth/models/utils/pesticideAI.py,sha256=6f8b-dFm3qr-eY049_eOvj_iDk4XBam61csozdDAvyA,2361
@@ -548,7 +548,7 @@ hestia_earth/models/utils/practice.py,sha256=tNadOzsrNlCEt801B815XaruJXzZ5yPASam
548
548
  hestia_earth/models/utils/product.py,sha256=H9UqJNzTqtMWXDQnbRkZlTpv_hg4s-Tya469fBk8InA,10143
549
549
  hestia_earth/models/utils/productivity.py,sha256=bUBVCZInGqHuHZvHDSYPQkjWXQxOtTjEk-1-f_BsFOo,594
550
550
  hestia_earth/models/utils/property.py,sha256=gHPEmy3Sw599ox64Gv-LCvjhP1THlBXBaBlTOK5lvog,5060
551
- hestia_earth/models/utils/site.py,sha256=XIpPGqByjpfrPxxcqt9iMAcIpsPUBfAENFnf8fz0iEE,3429
551
+ hestia_earth/models/utils/site.py,sha256=yei3qk7edxb_boag9h8j713r06KGstjTBWdb1KjqMus,3602
552
552
  hestia_earth/models/utils/source.py,sha256=HhZkvQoFdy6j6FC2cwP5EbHXHFM4pif9gpnuzeDwEh4,1746
553
553
  hestia_earth/models/utils/temperature.py,sha256=ljlG4-yCgFFb6LRZweb18cZKLrr7K2mqd4E4Hz_D1f8,476
554
554
  hestia_earth/models/utils/term.py,sha256=n_T1Qp_0z9ZUgrbVACNKue-5yDePOCkDw8g8dlMKSTM,17763
@@ -1008,7 +1008,7 @@ tests/models/site/test_precipitationMonthly.py,sha256=iccr-_ZrseM_OT3AKZbTNQhRFS
1008
1008
  tests/models/site/test_rainfallAnnual.py,sha256=4YYna66qjJptPJ_URvdcQuRC3dri9SB0xmWP8DFwslM,986
1009
1009
  tests/models/site/test_rainfallMonthly.py,sha256=A3gIe2Yxt9CLtLcAJNCQ0-8aRB49VdfKBLBy-7eDgJw,985
1010
1010
  tests/models/site/test_salineWater.py,sha256=by_goKU4q5Dr-ctqosfrjFPZsG9KeG26Y_xMWEHBhpA,985
1011
- tests/models/site/test_soilMeasurement.py,sha256=IMSnjbyBYAqWicXGgpdNPpJ_OQw6QEJEmfHJxyF4iec,4887
1011
+ tests/models/site/test_soilMeasurement.py,sha256=AC4wyRlSdxcjRvq--CCmZd0Jxz2bfhFNmrg9SoWbKE0,4917
1012
1012
  tests/models/site/test_temperatureAnnual.py,sha256=nOJG9ZJ8NCMM8T47uxxBeloIYLFN6-xtvUBqJsqt8xk,992
1013
1013
  tests/models/site/test_temperatureMonthly.py,sha256=C2lv-lpYqH7VUGOlxNLE6d7k_dFS6NYe8BvMlrJorCw,991
1014
1014
  tests/models/site/test_totalNitrogenPerKgSoil.py,sha256=2ILrA0jQKGniiKwS5FF3ZLtudgUgjcMnzFtrHpJKPTc,1161
@@ -1051,9 +1051,9 @@ tests/models/usetoxV2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
1051
1051
  tests/models/usetoxV2/test_freshwaterEcotoxicityPotentialCtue.py,sha256=eq7Gcmfya9g0eOKKkuBhz8vq7xi_CmZ_LTSxueBwZt4,835
1052
1052
  tests/models/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1053
1053
  tests/models/utils/test_blank_node.py,sha256=hgom8mJPWqylnf4AfLgVlbYgAHAEcH8DngOdFidFMcw,34343
1054
+ tests/models/utils/test_crop.py,sha256=ve_BqT2XuLTWAH-8YOnVY4nzMUSXYYXPB8S-5RtGlf4,463
1054
1055
  tests/models/utils/test_cropResidueManagement.py,sha256=RQt8lexeJzCyxZceIutgDpw7BpcqmjsUB0C0yZC2QpY,930
1055
1056
  tests/models/utils/test_currency.py,sha256=BPsojPsY9QW2aj8vgbjkPQXU8GU6wDwwtPZ3HdC4KTU,277
1056
- tests/models/utils/test_cycle.py,sha256=evTHH73ftNVhv5vHlYE2973msKE4pSCd3D0GfX1ZPUA,465
1057
1057
  tests/models/utils/test_dataCompleteness.py,sha256=mW6rA7ddhtjZsLxwo5xDnvBdxmqTsivy4RTIU-2Lvk0,1713
1058
1058
  tests/models/utils/test_emission.py,sha256=lQczTe39tVHbk3BEanZGU_rq9HDST2uDReKof-SV37Y,829
1059
1059
  tests/models/utils/test_feedipedia.py,sha256=S7c1W4bJ5xWXPh42pPbl3R7lDX_iEeaEtFaPXgB7hgE,906
@@ -1070,8 +1070,8 @@ tests/models/utils/test_source.py,sha256=mv3vHZV5cjpoLA2I1109-YUkuzAiuhbRSnv_76_
1070
1070
  tests/models/utils/test_term.py,sha256=M5Sa26v2gzQYbZ4H_fo7DspnaCx__-WtL-MULGapCWk,3509
1071
1071
  tests/models/webbEtAl2012AndSintermannEtAl2012/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1072
1072
  tests/models/webbEtAl2012AndSintermannEtAl2012/test_nh3ToAirOrganicFertiliser.py,sha256=qi2FNXS5Af2WDtm7nq_FsprH3BfCF0XxnE0XHmC4aIY,2244
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,,
1073
+ hestia_earth_models-0.61.7.dist-info/LICENSE,sha256=AC7h7GAgCZGJK_Tzh6LUCrML9gQEfowWwecEw2w54QM,1154
1074
+ hestia_earth_models-0.61.7.dist-info/METADATA,sha256=iynJo-vSse0wSWslH4jZ2jN5MzzWntK8WyH9rDPDtiE,3350
1075
+ hestia_earth_models-0.61.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1076
+ hestia_earth_models-0.61.7.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
1077
+ hestia_earth_models-0.61.7.dist-info/RECORD,,
@@ -160,7 +160,8 @@ def lookup_side_effect(*args, **kwargs):
160
160
  "simple-soilPh",
161
161
  "clayContent",
162
162
  "non-unique-measurements",
163
- "arrays"
163
+ "arrays",
164
+ "standard-intervals"
164
165
  ]
165
166
  )
166
167
  @patch(f"{class_path}._new_measurement", side_effect=fake_new_measurement)
@@ -1,8 +1,8 @@
1
1
  from hestia_earth.schema import SiteSiteType
2
2
 
3
- from hestia_earth.models.utils.cycle import valid_site_type
3
+ from hestia_earth.models.utils.crop import valid_site_type
4
4
 
5
- class_path = 'hestia_earth.models.utils.cycle'
5
+ class_path = 'hestia_earth.models.utils.crop'
6
6
 
7
7
 
8
8
  def test_valid_site_type():