hestia-earth-models 0.66.0__py3-none-any.whl → 0.67.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.
Files changed (65) hide show
  1. hestia_earth/models/cml2001Baseline/abioticResourceDepletionFossilFuels.py +23 -54
  2. hestia_earth/models/cml2001Baseline/resourceUseEnergyDepletionDuringCycle.py +147 -0
  3. hestia_earth/models/cml2001Baseline/resourceUseEnergyDepletionInputsProduction.py +40 -0
  4. hestia_earth/models/cml2001Baseline/resourceUseMineralsAndMetalsDuringCycle.py +80 -0
  5. hestia_earth/models/cml2001Baseline/resourceUseMineralsAndMetalsInputsProduction.py +40 -0
  6. hestia_earth/models/config/ImpactAssessment.json +1869 -1846
  7. hestia_earth/models/cycle/completeness/freshForage.py +7 -3
  8. hestia_earth/models/cycle/inorganicFertiliser.py +67 -17
  9. hestia_earth/models/cycle/input/hestiaAggregatedData.py +13 -10
  10. hestia_earth/models/{environmentalFootprintV3 → environmentalFootprintV3_1}/__init__.py +4 -3
  11. hestia_earth/models/{environmentalFootprintV3 → environmentalFootprintV3_1}/environmentalFootprintSingleOverallScore.py +42 -37
  12. hestia_earth/models/environmentalFootprintV3_1/marineEutrophicationPotential.py +36 -0
  13. hestia_earth/models/environmentalFootprintV3_1/scarcityWeightedWaterUse.py +40 -0
  14. hestia_earth/models/{environmentalFootprintV3 → environmentalFootprintV3_1}/soilQualityIndexLandTransformation.py +22 -14
  15. hestia_earth/models/{environmentalFootprintV3 → environmentalFootprintV3_1}/soilQualityIndexTotalLandUseEffects.py +17 -15
  16. hestia_earth/models/hestia/landTransformation100YearAverageDuringCycle.py +1 -1
  17. hestia_earth/models/hestia/landTransformation20YearAverageDuringCycle.py +1 -1
  18. hestia_earth/models/impact_assessment/product/value.py +1 -1
  19. hestia_earth/models/ipcc2019/aboveGroundBiomass.py +2 -2
  20. hestia_earth/models/ipcc2019/belowGroundBiomass.py +2 -2
  21. hestia_earth/models/ipcc2019/co2ToAirCarbonStockChange_utils.py +2 -1
  22. hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_1_utils.py +6 -5
  23. hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_2_utils.py +3 -2
  24. hestia_earth/models/mocking/search-results.json +1200 -1068
  25. hestia_earth/models/site/management.py +2 -2
  26. hestia_earth/models/utils/__init__.py +6 -0
  27. hestia_earth/models/utils/aggregated.py +13 -10
  28. hestia_earth/models/utils/array_builders.py +4 -3
  29. hestia_earth/models/utils/blank_node.py +78 -21
  30. hestia_earth/models/utils/ecoClimateZone.py +2 -2
  31. hestia_earth/models/utils/impact_assessment.py +5 -4
  32. hestia_earth/models/utils/lookup.py +5 -5
  33. hestia_earth/models/utils/property.py +5 -2
  34. hestia_earth/models/version.py +1 -1
  35. hestia_earth/orchestrator/log.py +11 -0
  36. hestia_earth/orchestrator/models/__init__.py +8 -3
  37. {hestia_earth_models-0.66.0.dist-info → hestia_earth_models-0.67.1.dist-info}/METADATA +1 -1
  38. {hestia_earth_models-0.66.0.dist-info → hestia_earth_models-0.67.1.dist-info}/RECORD +64 -52
  39. tests/models/cml2001Baseline/test_abioticResourceDepletionFossilFuels.py +51 -87
  40. tests/models/cml2001Baseline/test_resourceUseEnergyDepletionDuringCycle.py +136 -0
  41. tests/models/cml2001Baseline/test_resourceUseEnergyDepletionInputsProduction.py +23 -0
  42. tests/models/cml2001Baseline/test_resourceUseMineralsAndMetalsDuringCycle.py +58 -0
  43. tests/models/cml2001Baseline/test_resourceUseMineralsAndMetalsInputsProduction.py +23 -0
  44. tests/models/{environmentalFootprintV3 → environmentalFootprintV3_1}/test_environmentalFootprintSingleOverallScore.py +43 -12
  45. tests/models/{environmentalFootprintV3 → environmentalFootprintV3_1}/test_freshwaterEcotoxicityPotentialCtue.py +6 -5
  46. tests/models/environmentalFootprintV3_1/test_marineEutrophicationPotential.py +27 -0
  47. tests/models/environmentalFootprintV3_1/test_scarcityWeightedWaterUse.py +32 -0
  48. tests/models/{environmentalFootprintV3 → environmentalFootprintV3_1}/test_soilQualityIndexLandOccupation.py +4 -3
  49. tests/models/environmentalFootprintV3_1/test_soilQualityIndexLandTransformation.py +194 -0
  50. tests/models/{environmentalFootprintV3 → environmentalFootprintV3_1}/test_soilQualityIndexTotalLandUseEffects.py +4 -4
  51. tests/models/impact_assessment/test_emissions.py +0 -1
  52. tests/models/site/test_management.py +1 -4
  53. tests/models/test_config.py +3 -3
  54. tests/models/test_ecoinventV3.py +0 -1
  55. tests/models/utils/test_array_builders.py +2 -2
  56. tests/models/utils/test_blank_node.py +13 -165
  57. tests/orchestrator/models/test_transformations.py +4 -1
  58. tests/models/environmentalFootprintV3/test_soilQualityIndexLandTransformation.py +0 -164
  59. /hestia_earth/models/{environmentalFootprintV3 → environmentalFootprintV3_1}/freshwaterEcotoxicityPotentialCtue.py +0 -0
  60. /hestia_earth/models/{environmentalFootprintV3 → environmentalFootprintV3_1}/soilQualityIndexLandOccupation.py +0 -0
  61. /hestia_earth/models/{environmentalFootprintV3 → environmentalFootprintV3_1}/utils.py +0 -0
  62. {hestia_earth_models-0.66.0.dist-info → hestia_earth_models-0.67.1.dist-info}/LICENSE +0 -0
  63. {hestia_earth_models-0.66.0.dist-info → hestia_earth_models-0.67.1.dist-info}/WHEEL +0 -0
  64. {hestia_earth_models-0.66.0.dist-info → hestia_earth_models-0.67.1.dist-info}/top_level.txt +0 -0
  65. /tests/models/{environmentalFootprintV3 → environmentalFootprintV3_1}/__init__.py +0 -0
@@ -167,7 +167,7 @@ def _should_run(site: dict) -> tuple[bool, dict, dict]:
167
167
  inventory = _compile_inventory(land_cover) if should_compile_inventory else {}
168
168
  kwargs = {
169
169
  "eco_climate_zone": eco_climate_zone,
170
- "seed": gen_seed(site)
170
+ "seed": gen_seed(site, MODEL, TERM_ID)
171
171
  }
172
172
 
173
173
  logRequirements(
@@ -525,7 +525,7 @@ def _measurement(
525
525
  max : list[float]
526
526
  A list of maximum values representing the maximum modelled biomass stock for each year of the inventory.
527
527
  statsDefinition : str
528
- The [statsDefinition](https://www-staging.hestia.earth/schema/Measurement#statsDefinition) of the measurement.
528
+ The [statsDefinition](https://hestia.earth/schema/Measurement#statsDefinition) of the measurement.
529
529
  observations : list[int]
530
530
  The number of model iterations used to calculate the descriptive statistics.
531
531
 
@@ -38,6 +38,7 @@ from hestia_earth.models.utils.time_series import (
38
38
  )
39
39
 
40
40
  from .utils import check_consecutive
41
+ from . import MODEL
41
42
 
42
43
  _ITERATIONS = 10000
43
44
  _MAX_CORRELATION = 1
@@ -424,7 +425,7 @@ def create_should_run_function(
424
425
 
425
426
  land_cover_nodes = get_valid_management_nodes_func(site)
426
427
 
427
- seed = gen_seed(site) # All cycles linked to the same site should be consistent
428
+ seed = gen_seed(site, MODEL, carbon_stock_term_id) # All cycles linked to the same site should be consistent
428
429
  rng = random.default_rng(seed)
429
430
 
430
431
  should_compile_inventory, should_compile_logs = should_compile_inventory_func(
@@ -41,6 +41,7 @@ from .organicCarbonPerHa_utils import (
41
41
  sample_plus_minus_error, sample_plus_minus_uncertainty, SITE_TYPE_TO_IPCC_LAND_USE_CATEGORY,
42
42
  SUPER_MAJORITY_AREA_THRESHOLD, STATS_DEFINITION
43
43
  )
44
+ from . import MODEL
44
45
 
45
46
  _LOOKUPS = {
46
47
  "crop": "IPCC_LAND_USE_CATEGORY",
@@ -95,7 +96,7 @@ def _measurement(
95
96
  Build a HESTIA `Measurement` node to contain a value and descriptive statistics calculated by the models.
96
97
 
97
98
  The `descriptive_stats_dict` parameter should include the following keys and values from the
98
- [Measurement](https://www-staging.hestia.earth/schema/Measurement) schema:
99
+ [Measurement](https://hestia.earth/schema/Measurement) schema:
99
100
  ```
100
101
  {
101
102
  "value": list[float],
@@ -555,7 +556,7 @@ def should_run(site: dict) -> tuple[bool, dict, dict]:
555
556
  )
556
557
 
557
558
  kwargs = {
558
- "seed": gen_seed(site),
559
+ "seed": gen_seed(site, MODEL, _TERM_ID),
559
560
  "eco_climate_zone": eco_climate_zone,
560
561
  "ipcc_soil_category": ipcc_soil_category,
561
562
  }
@@ -873,9 +874,9 @@ def _compile_inventory(
873
874
  site_id : str
874
875
  The `@id` of the site.
875
876
  site_type : str
876
- A valid [site type](https://www-staging.hestia.earth/schema/Site#siteType).
877
+ A valid [site type](https://hestia.earth/schema/Site#siteType).
877
878
  management_nodes : list[dict]
878
- A list of [Management nodes](https://www-staging.hestia.earth/schema/Management).
879
+ A list of [Management nodes](https://hestia.earth/schema/Management).
879
880
  ipcc_soil_category : IpccSoilCategory
880
881
  The site's assigned IPCC soil category.
881
882
 
@@ -948,7 +949,7 @@ def _assign_ipcc_soil_category(
948
949
  Parameters
949
950
  ----------
950
951
  measurement_nodes : list[dict]
951
- List of A list of [Measurement nodes](https://www-staging.hestia.earth/schema/Measurement)..
952
+ List of A list of [Measurement nodes](https://hestia.earth/schema/Measurement)..
952
953
  default : IpccSoilCategory, optional
953
954
  The default soil category if none matches, by default IpccSoilCategory.LOW_ACTIVITY_CLAY_SOILS.
954
955
 
@@ -41,6 +41,7 @@ from .organicCarbonPerHa_utils import (
41
41
  IpccLandUseCategory, IpccManagementCategory, is_cover_crop, MIN_AREA_THRESHOLD, MIN_YIELD_THRESHOLD,
42
42
  sample_constant, sample_plus_minus_uncertainty, sample_truncated_normal, STATS_DEFINITION
43
43
  )
44
+ from . import MODEL
44
45
 
45
46
  _LOOKUPS = {
46
47
  "crop": "IPCC_LAND_USE_CATEGORY",
@@ -109,7 +110,7 @@ def _measurement(
109
110
  Build a HESTIA `Measurement` node to contain a value and descriptive statistics calculated by the models.
110
111
 
111
112
  The `descriptive_stats_dict` parameter should include the following keys and values from the
112
- [Measurement](https://www-staging.hestia.earth/schema/Measurement) schema:
113
+ [Measurement](https://hestia.earth/schema/Measurement) schema:
113
114
  ```
114
115
  {
115
116
  "value": list[float],
@@ -412,7 +413,7 @@ def should_run(site: dict) -> tuple[bool, dict, dict]:
412
413
  _compile_inventory(cycles, measurement_nodes)
413
414
  if should_compile_inventory else ({}, {})
414
415
  )
415
- kwargs["seed"] = gen_seed(site)
416
+ kwargs["seed"] = gen_seed(site, MODEL, _TERM_ID)
416
417
 
417
418
  valid_years = [year for year, group in inventory.items() if group.get(_InventoryKey.SHOULD_RUN)]
418
419