hestia-earth-models 0.68.0__py3-none-any.whl → 0.68.1__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.
@@ -62,6 +62,8 @@ def _harmonise_measurements(measurements_list: list, standard_depth_lower: int,
62
62
  total_weights = 0
63
63
  for measurement_dict in measurements_list:
64
64
  value = measurement_dict.get("value", [])[0]
65
+ if value is None:
66
+ continue
65
67
  depth_lower = measurement_dict.get("depthLower", 0)
66
68
  depth_upper = measurement_dict.get("depthUpper", 0)
67
69
  # Note that the upper/lower here is reversed as lower in the ground (greater depth),
@@ -35,7 +35,7 @@ def _new_measurement(term, model=None):
35
35
  def measurement_value(measurement: dict, is_larger_unit: bool = False) -> float:
36
36
  term = measurement.get('term', {})
37
37
  reducer = get_lookup_value(term, 'arrayTreatmentLargerUnitOfTime' if is_larger_unit else 'arrayTreatment') or 'mean'
38
- value = measurement.get('value', [])
38
+ value = non_empty_list(measurement.get('value', []))
39
39
  is_value_valid = value is not None and isinstance(value, list) and len(value) > 0
40
40
  return MEASUREMENT_REDUCE.get(reducer, lambda v: v[0])(value) if is_value_valid else 0
41
41
 
@@ -1 +1 @@
1
- VERSION = '0.68.0'
1
+ VERSION = '0.68.1'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hestia-earth-models
3
- Version: 0.68.0
3
+ Version: 0.68.1
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
@@ -1,10 +1,10 @@
1
1
  hestia_earth/__init__.py,sha256=G-d438vPx7m_ks5e9XTtM3u7LDRO5dSSukibukWmyPM,56
2
2
  hestia_earth/models/__init__.py,sha256=qEFeq3yuf3lQKVseALmL8aPM8fpCS54B_5pry00M3hk,76
3
- hestia_earth/models/cache_sites.py,sha256=7hW1yMTBve8ICofqFFpZltPTHjVykWCmsXznss6wpPg,6034
3
+ hestia_earth/models/cache_sites.py,sha256=-95yq3NYkg8H0B0hr0_ZYYHMmwv8zuZQ9RtKQE0RT9M,6294
4
4
  hestia_earth/models/log.py,sha256=eRuH86v7Thuw-QXdKqaqVmA_MkwnOCo0UBEwtuDq4Oc,3554
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=pb7Ey_5cM4RWpFji2Dhkx9fGMM9inACO7abGLOAaD4Y,19
7
+ hestia_earth/models/version.py,sha256=4ZxiGZdDHdDHoC7sN5sCfzEUDoNO7fNjxe2sMS-S3i0,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
@@ -416,7 +416,7 @@ hestia_earth/models/linkedImpactAssessment/utils.py,sha256=S1zlux02gU2Lajrtoq-zQ
416
416
  hestia_earth/models/mocking/__init__.py,sha256=9VX50c-grz-snfd-7MBS0KfF7AadtbKuj7kK6PqtsgE,687
417
417
  hestia_earth/models/mocking/build_mock_search.py,sha256=p15ccEUmkmLp1RiGNznxMz3OFHbI8P1-29ExuohiQN8,1355
418
418
  hestia_earth/models/mocking/mock_search.py,sha256=ccFe_WrI73JElFmxp4hPNLCX7eeU--lBC1JFR901KJY,1069
419
- hestia_earth/models/mocking/search-results.json,sha256=sZ6NTrm2jWJNb3GbJM6Vq-8wLcA7-dGUbAUsMEiKrVs,160703
419
+ hestia_earth/models/mocking/search-results.json,sha256=ltQ2W8Objq1E9ugJo98sUteqxBaTFhmP2y6pq3NawBw,160705
420
420
  hestia_earth/models/pooreNemecek2018/__init__.py,sha256=nPboL7ULJzL5nJD5q7q9VOZt_fxbKVm8fmn1Az5YkVY,417
421
421
  hestia_earth/models/pooreNemecek2018/aboveGroundCropResidueTotal.py,sha256=Qt-mel4dkhK6N5uUOutNOinCTFjbjtGzITaaI0LvYc4,2396
422
422
  hestia_earth/models/pooreNemecek2018/belowGroundCropResidue.py,sha256=JT0RybbvWVlo01FO8K0Yj41HrEaJT3Kj1xfayr2X-xw,2315
@@ -534,7 +534,7 @@ hestia_earth/models/site/precipitationMonthly.py,sha256=yGUbiUCu1Prp3qVHuZodGrcf
534
534
  hestia_earth/models/site/rainfallAnnual.py,sha256=Ix_B8Ny7IIRkJ_3lUvoHOjPgqCyR9I0U3_ADUUtMqsY,2003
535
535
  hestia_earth/models/site/rainfallMonthly.py,sha256=2Uo8F-YxnTK0_txlHmiAyVp1bGfWD4bneRKyg4tdQkI,1881
536
536
  hestia_earth/models/site/salineWater.py,sha256=wO_Dyufqni66qSCpunrJUr0ou45QrcpZc8-GtZDH9VU,1256
537
- hestia_earth/models/site/soilMeasurement.py,sha256=YMKeChGcj9lxM9c7p68LlQhqMPHAD9AEsNsDr69Q1Kw,7185
537
+ hestia_earth/models/site/soilMeasurement.py,sha256=DgiCit2Nhz2ePP_qeAgpopDaB0QJaBukG22d0N7pmIU,7232
538
538
  hestia_earth/models/site/temperatureAnnual.py,sha256=Q3b1RH2_hpA0JWwOYA5nKgMGcXHjV8-akXT9vB0cbwc,2012
539
539
  hestia_earth/models/site/temperatureMonthly.py,sha256=yXwpFCGT2tUqvVBNedaPyBmN_KlzZqo5yv2TWem1pBk,1890
540
540
  hestia_earth/models/site/totalNitrogenPerKgSoil.py,sha256=8ERrTZpN_yCRUyFg_EYaX4abE9jLcyX3lx3MO4Bi6CE,1938
@@ -609,7 +609,7 @@ hestia_earth/models/utils/landCover.py,sha256=8-nfynzCx9gf9YfhpuoH6Cn4kQwWFpYA5R
609
609
  hestia_earth/models/utils/liveAnimal.py,sha256=GnajBPZw5d94raf80KtLloaOqlfqGAPwUtP9bRlGWeE,1754
610
610
  hestia_earth/models/utils/lookup.py,sha256=OxoUVCJ8FqliMtBuu_GzP9tSbHZKf3gwSNl0CYQUhF8,5973
611
611
  hestia_earth/models/utils/management.py,sha256=urvoHvTw5wrO12POjGQ50Or25X1Y4Gx26l4fDoVt-Ck,376
612
- hestia_earth/models/utils/measurement.py,sha256=5oSfTKaUJ5XKHaAnnCdGEAw-tOgugzEWeZXSWRZ4o4w,11085
612
+ hestia_earth/models/utils/measurement.py,sha256=dxaEJu9VtZedk7-BocXTXx6pVNkVoFchawv7SAymMu8,11101
613
613
  hestia_earth/models/utils/method.py,sha256=ZYN2_Fyeiwr9pmvD84ZPg7ZHBlvaIY2A6XL4F_KByS0,740
614
614
  hestia_earth/models/utils/organicFertiliser.py,sha256=2HY-a0EBzUw4DkEAXClLMXVCEZTKYf0BwFHBo7lQ5Tg,363
615
615
  hestia_earth/models/utils/pesticideAI.py,sha256=_mlhKnA1TxF-x39CPNnOGXk6754SoSQqrkHVH2y6rv8,2038
@@ -1233,8 +1233,8 @@ tests/orchestrator/strategies/run/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
1233
1233
  tests/orchestrator/strategies/run/test_add_blank_node_if_missing.py,sha256=enmPg2cuUGEKvXRcgWVJfHdQwyArKjPBOVzcK1T1i8A,3482
1234
1234
  tests/orchestrator/strategies/run/test_add_key_if_missing.py,sha256=hKwvk1ohcBVnQUCTiDhRW99J0xEa29BpwFi1KC0yWLE,329
1235
1235
  tests/orchestrator/strategies/run/test_always.py,sha256=w5-Dhp6yLzgZGAeMRz3OrqZbbAed9gZ1O266a3z9k7w,134
1236
- hestia_earth_models-0.68.0.dist-info/LICENSE,sha256=TD25LoiRJsA5CPUNrcyt1PXlGcbUGFMAeZoBcfCrCNE,1154
1237
- hestia_earth_models-0.68.0.dist-info/METADATA,sha256=hv1nrrYZge4RB0FwJRX-w8_krHA9jbW2YJ_5lWLhrvI,4045
1238
- hestia_earth_models-0.68.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1239
- hestia_earth_models-0.68.0.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
1240
- hestia_earth_models-0.68.0.dist-info/RECORD,,
1236
+ hestia_earth_models-0.68.1.dist-info/LICENSE,sha256=TD25LoiRJsA5CPUNrcyt1PXlGcbUGFMAeZoBcfCrCNE,1154
1237
+ hestia_earth_models-0.68.1.dist-info/METADATA,sha256=mykRDJIa4NxR3m2ScAXfmzQ31AX4akg3w5i1TFtbVjo,4045
1238
+ hestia_earth_models-0.68.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1239
+ hestia_earth_models-0.68.1.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
1240
+ hestia_earth_models-0.68.1.dist-info/RECORD,,