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

@@ -1,4 +1,4 @@
1
- from hestia_earth.schema import IndicatorMethodTier, TermTermType
1
+ from hestia_earth.schema import TermTermType
2
2
  from hestia_earth.utils.lookup import download_lookup, lookup_term_ids
3
3
  from hestia_earth.utils.lookup_utils import is_in_system_boundary
4
4
 
@@ -15,8 +15,7 @@ REQUIREMENTS = {
15
15
  }
16
16
  RETURNS = {
17
17
  "Indicator": [{
18
- "value": "0",
19
- "methodTier": "not relevant"
18
+ "value": "0"
20
19
  }]
21
20
  }
22
21
  LOOKUPS = {
@@ -27,13 +26,11 @@ LOOKUPS = {
27
26
  ]
28
27
  }
29
28
  MODEL = 'resourceUseNotRelevant'
30
- TIER = IndicatorMethodTier.NOT_RELEVANT.value
31
29
 
32
30
 
33
31
  def _indicator(term_id: str, land_cover_id: str):
34
32
  indicator = _new_indicator(term_id, MODEL, land_cover_id)
35
33
  indicator['value'] = 0
36
- indicator['methodTier'] = TIER
37
34
  return indicator
38
35
 
39
36
 
@@ -10,9 +10,7 @@ def _new_indicator(
10
10
  land_cover_id: str = None, previous_land_cover_id: str = None, country_id: str = None, key_id: str = None
11
11
  ):
12
12
  node = {'@type': SchemaType.INDICATOR.value}
13
- node['term'] = linked_node(term if isinstance(term, dict) else download_term(
14
- term, TermTermType.CHARACTERISEDINDICATOR)
15
- )
13
+ node['term'] = linked_node(term if isinstance(term, dict) else download_term(term))
16
14
  if land_cover_id:
17
15
  node['landCover'] = linked_node(download_term(land_cover_id, TermTermType.LANDCOVER))
18
16
  if previous_land_cover_id:
@@ -1 +1 @@
1
- VERSION = '0.74.5'
1
+ VERSION = '0.74.7'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hestia-earth-models
3
- Version: 0.74.5
3
+ Version: 0.74.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
@@ -5,7 +5,7 @@ hestia_earth/models/cache_sites.py,sha256=XpXnkYt823PQzrswgP__L4CT8xZG_n7a41CIHK
5
5
  hestia_earth/models/log.py,sha256=LQ6nRMc5q8-xs8DsAx9h8drWhWLkqDG9dFlG9OzFbeA,3780
6
6
  hestia_earth/models/preload_requests.py,sha256=-eb4TA4m-A4bLcdAwbKqr3TIsDteVSXhJGCp95mQCew,2504
7
7
  hestia_earth/models/requirements.py,sha256=eU4yT443fx7BnaokhrLB_PCizJI7Y6m4auyo8vQauNg,17363
8
- hestia_earth/models/version.py,sha256=Yw5gBLFlJzKrCW3z-N2u5t7ExCXhNqHDMYZHrXtwdx4,19
8
+ hestia_earth/models/version.py,sha256=063ysqdwW7WLAcbJ9hTLDpvitQTP0eRqk7F3ZKIs7Hg,19
9
9
  hestia_earth/models/agribalyse2016/__init__.py,sha256=WvK0qCQbnYtg9oZxrACd1wGormZyXibPtpCnIQeDqbw,415
10
10
  hestia_earth/models/agribalyse2016/fuelElectricity.py,sha256=1ngl8pdxeNhlVV8keAeWRwGorr_1uFXM9EoPUWx-uSc,4382
11
11
  hestia_earth/models/agribalyse2016/machineryInfrastructureDepreciatedAmountPerCycle.py,sha256=queToXuzq0tQ9_XuUJ2pJgSywXmbt9uX3ZoIKgqkROM,2660
@@ -202,7 +202,7 @@ hestia_earth/models/hestia/concentrateFeed.py,sha256=HnuG3zAECtFVdPRbTATGz5ImO2V
202
202
  hestia_earth/models/hestia/cropResidueManagement.py,sha256=VlubB0q5MtvBM2dQSWdrENBMOYpvFbGu36TEwxoDl7A,2301
203
203
  hestia_earth/models/hestia/croppingIntensity.py,sha256=xev3GOE06nBJ8ZY3XtbnE0eR2YR_kqAFPnrTuKFtLrQ,1777
204
204
  hestia_earth/models/hestia/default_emissions.py,sha256=UaG__VXbsa2f3lU_wD7Pz0hYWhABSTmyx8wwT3MQG1w,3546
205
- hestia_earth/models/hestia/default_resourceUse.py,sha256=uV4yawZTDoDNyb_NojOEzRZgjy-tWzXCzaxgAT1BGTs,3880
205
+ hestia_earth/models/hestia/default_resourceUse.py,sha256=ne1apNctXHNFW0_Xzbwyk6hfW8ittWQSeygfaCcJFcw,4341
206
206
  hestia_earth/models/hestia/energyContentLowerHeatingValue.py,sha256=2gR7Iu5nUUCGSXjFrkTnss6XBGtQz-yKwexCQoy8TJU,2214
207
207
  hestia_earth/models/hestia/excretaKgMass.py,sha256=pBhD3I2NPjJ-Dbnp_P508J7OCLI_fxOAyTi_wKtrkcg,4017
208
208
  hestia_earth/models/hestia/excretaKgN.py,sha256=J2TuRGzA8KHDgsRnZflF8LMcd8993YPguY-cdbQOJ8Y,2878
@@ -213,7 +213,7 @@ hestia_earth/models/hestia/histosol.py,sha256=IexiWTSlSJYGjrdpYmRooW6v8LjhYATPQ8
213
213
  hestia_earth/models/hestia/inorganicFertiliser.py,sha256=We4PBaTXyGwEQTfhX0-J8Xt03p-FB9i9j3tEK5JQ8uE,9026
214
214
  hestia_earth/models/hestia/irrigatedTypeUnspecified.py,sha256=VdYzfYxcRzWv21qxRkDn9HBid7-Bt_CgIv4iyXJH03g,1929
215
215
  hestia_earth/models/hestia/landCover.py,sha256=bZdlubbri0yzYCdhAQx_6iXZWQjeijBLr8NLldZPWOs,40280
216
- hestia_earth/models/hestia/landOccupationDuringCycle.py,sha256=9FAjqFh-MFeABzW83Ge5Y5JOmakhG8hYv8dtKqdXms0,9582
216
+ hestia_earth/models/hestia/landOccupationDuringCycle.py,sha256=xiVun-YIXwtQ917DG9K8-7qzllwIj_QiBjuk1e0CQJU,9574
217
217
  hestia_earth/models/hestia/landTransformation100YearAverageDuringCycle.py,sha256=Bd8rD4ioiXvlKCTtYva_Cj3yqIgi2ykeVmCDtjgeY4A,1202
218
218
  hestia_earth/models/hestia/landTransformation20YearAverageDuringCycle.py,sha256=yWbnkjvV87M8lUcSR5nxJGunX3Ne3wdVvBMR2b1K_Sc,1200
219
219
  hestia_earth/models/hestia/liveAnimal.py,sha256=d7HuUi40c-7TN1kecdRuqbht8PAe7x4ps0NhSuWG34Q,3868
@@ -243,7 +243,7 @@ hestia_earth/models/hestia/residueLeftOnField.py,sha256=EZoPlDhh1aNJvPT52Bvro6xc
243
243
  hestia_earth/models/hestia/residueRemoved.py,sha256=2I4wTJJcORrhkWiRJOzjwxRMIn3Jjeggh1dhFC2CK4Y,4969
244
244
  hestia_earth/models/hestia/resourceUse_utils.py,sha256=eEROdEYQc4hQsz57iAThV8hQi-FVb5aDZmDZWqzHF-M,6624
245
245
  hestia_earth/models/hestia/salineWater.py,sha256=rqiF3KfjvvNx3sxWFiXsP1_e5aB3ekA4QGC8vtcFHmo,1270
246
- hestia_earth/models/hestia/seed_emissions.py,sha256=1TxXfDjtIYS7yEZLDs70j6D3-x-68K9KZQGwHIBl7EE,12107
246
+ hestia_earth/models/hestia/seed_emissions.py,sha256=JPvpkwA1lv2iBSgp9gl73Xnu_mhk3pDIaWeQo8HgZqA,12475
247
247
  hestia_earth/models/hestia/soilMeasurement.py,sha256=cP4nuz2DE-FLaFbP-0fG5wbIgU28s3n4-lo8-RTFpF0,7088
248
248
  hestia_earth/models/hestia/stockingDensityAnimalHousingAverage.py,sha256=WIRmBSTk70Dffm_KcbTqpAhtnrV4rzl_m0gKED5NIAo,1844
249
249
  hestia_earth/models/hestia/temperatureAnnual.py,sha256=IhMoO-SkSp1JBxgu9bSr1OCtr7QQlZsoCXqhsWeEprs,1963
@@ -467,7 +467,7 @@ hestia_earth/models/linkedImpactAssessment/utils.py,sha256=DM6ZUnw23KH0oMKS3jA5q
467
467
  hestia_earth/models/mocking/__init__.py,sha256=-mJ_zrVWZSGc3awWW2YJfXAK3Nku77sAUgmmFa99Xmo,733
468
468
  hestia_earth/models/mocking/build_mock_search.py,sha256=p15ccEUmkmLp1RiGNznxMz3OFHbI8P1-29ExuohiQN8,1355
469
469
  hestia_earth/models/mocking/mock_search.py,sha256=uvklojTAbjDI7Jw43jGAUDcTHk1R3A3CWiYBJZI6rao,1493
470
- hestia_earth/models/mocking/search-results.json,sha256=jzk1kqMxajoL5SojazrZfsG3Tl2LqvxfBihTTMT0Dc0,103845
470
+ hestia_earth/models/mocking/search-results.json,sha256=j-TFPJNkexB3Hf9ADBKg63yAkLM0hZkK8lsZxukCo4o,103843
471
471
  hestia_earth/models/pooreNemecek2018/__init__.py,sha256=nPboL7ULJzL5nJD5q7q9VOZt_fxbKVm8fmn1Az5YkVY,417
472
472
  hestia_earth/models/pooreNemecek2018/aboveGroundCropResidueTotal.py,sha256=oXillpppAas1q9GKmODxe1YXyno3EzV-j12xhzkqtTc,2404
473
473
  hestia_earth/models/pooreNemecek2018/belowGroundCropResidue.py,sha256=_pQMPSvI--Xm00H6vXDA4ct_pQXKRGrLE2f-2tQE6y4,2323
@@ -551,7 +551,7 @@ hestia_earth/models/recipe2016Individualist/marineEutrophicationPotential.py,sha
551
551
  hestia_earth/models/recipe2016Individualist/ozoneDepletionPotential.py,sha256=cRpcfMsQnFFYV6lW5iy0yEqt9lqL0C7ALL-OdhdbV8A,1064
552
552
  hestia_earth/models/recipe2016Individualist/terrestrialAcidificationPotential.py,sha256=YvFqXh8SdYy1Na71mYGO9Dpi928fzzXESRA3x-JKG7Y,1069
553
553
  hestia_earth/models/recipe2016Individualist/terrestrialEcotoxicityPotential14Dcbeq.py,sha256=Sf6_kPt1hHRwe_Cg6Fz7nnxBZgIhpUzi8xMLJSxoRN8,928
554
- hestia_earth/models/resourceUseNotRelevant/__init__.py,sha256=UWlMN3tYCyTDpnlyoKqsoAQADPgBwY5tZWN0FVXoPrQ,2236
554
+ hestia_earth/models/resourceUseNotRelevant/__init__.py,sha256=U2QEwqwRhLpGpl0GWZf9XzivzHYPHKMMRiw6F5ZRaBw,2096
555
555
  hestia_earth/models/schererPfister2015/__init__.py,sha256=_6FJKfWeAbbS3jFzQ8gEVzoX1LZdPWUTLrow6Hz90U0,419
556
556
  hestia_earth/models/schererPfister2015/nErosionSoilFlux.py,sha256=rh1H-06upTXlv5x8RqhBt1RRrWnMznPbm3k3EBoAGY0,5450
557
557
  hestia_earth/models/schererPfister2015/pErosionSoilFlux.py,sha256=2LVjKHpKKsV6vEcUrDwtqrdFqAYeSXzTLqhkBPBBxno,5462
@@ -630,7 +630,7 @@ hestia_earth/models/utils/feedipedia.py,sha256=ETJx80zf_qGFWASE1u4kmpYncCz-7xSFl
630
630
  hestia_earth/models/utils/fertiliser.py,sha256=9Kv7czDEPDvZ5Bz6Rr_2vy2MsXrPDvBC3921cEJSks8,810
631
631
  hestia_earth/models/utils/fuel.py,sha256=XzOELV3dn506PkMKjFQ_ZKVZInd2lL2x6PKdsa6Po4M,1429
632
632
  hestia_earth/models/utils/impact_assessment.py,sha256=AfIZo_ykkkqWYY2AG-kLzGtd3fwzGIQXxnEKEzL_oGk,8516
633
- hestia_earth/models/utils/indicator.py,sha256=Vb5L2ziXKXiL558M0K5V5ihaDTuvX3BLJP1SCbQ_B5E,1009
633
+ hestia_earth/models/utils/indicator.py,sha256=b3aRJ73p_y4VmL2_ZY9eXVDJxrQEP0WathuLKbSaluk,958
634
634
  hestia_earth/models/utils/inorganicFertiliser.py,sha256=2Uq6ATWwb_YYRzBCMdrlVWyCDDtWVApUxgxDEN3-3OA,1782
635
635
  hestia_earth/models/utils/input.py,sha256=61aaJV6QApJQIQT5TMsBww46cBYpJdf__krnwV95KsY,6160
636
636
  hestia_earth/models/utils/landCover.py,sha256=8-nfynzCx9gf9YfhpuoH6Cn4kQwWFpYA5RmoGW-0ETE,300
@@ -858,8 +858,8 @@ tests/models/hestia/test_coldDressedCarcassWeightPerHead.py,sha256=5UwhLh0DjPlOc
858
858
  tests/models/hestia/test_concentrateFeed.py,sha256=knFM7SlKZhvmRu9T6T5H1fitFAZBuEBdxiBQpnekn4M,2012
859
859
  tests/models/hestia/test_cropResidueManagement.py,sha256=zjHY0dlrJN7pqlRIs3rpssuwqOFJtjv4El3V39QpoFs,2021
860
860
  tests/models/hestia/test_croppingIntensity.py,sha256=YIBeAj3HSpLTKKjTNpQyy273w36xKSnv2lUbeO_-cb0,1566
861
- tests/models/hestia/test_default_emissions.py,sha256=d85cKeFJsT-p3ti4AliSPB7lUJmwNoogRU-sUGn52Zg,869
862
- tests/models/hestia/test_default_resourceUse.py,sha256=RZ0oV4lzl-LujGoih6OAxxZmeqi655KHQWQNG_senmg,917
861
+ tests/models/hestia/test_default_emissions.py,sha256=56nVuEm0OMF_Z_JgdUffAmw6lAIVT4x_0mUUcLJDWvs,1053
862
+ tests/models/hestia/test_default_resourceUse.py,sha256=GKfAIJSUvpNkDqrNVXPrATet91K8F-2nJtMqcxhs2PM,1066
863
863
  tests/models/hestia/test_energyContentLowerHeatingValue.py,sha256=sjFrRFNMGvZy8i5WWqfR3Z_92wd9lUTtdZv0YFXidR8,1222
864
864
  tests/models/hestia/test_excretaKgMass.py,sha256=tY4he1xRDHZi976slnFra-4lRqWwogx2fXkpXfJxpOY,2924
865
865
  tests/models/hestia/test_excretaKgN.py,sha256=7yuF9-nrwfkcmU_VsQtFBYSO92RqEDtUU9kdL0ERiUk,1091
@@ -1286,8 +1286,8 @@ tests/orchestrator/strategies/run/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
1286
1286
  tests/orchestrator/strategies/run/test_add_blank_node_if_missing.py,sha256=K4xg4UAXfNhSaLyknKVPO7MGBF44Z_gD7CuZ_pe28gU,3512
1287
1287
  tests/orchestrator/strategies/run/test_add_key_if_missing.py,sha256=hKwvk1ohcBVnQUCTiDhRW99J0xEa29BpwFi1KC0yWLE,329
1288
1288
  tests/orchestrator/strategies/run/test_always.py,sha256=w5-Dhp6yLzgZGAeMRz3OrqZbbAed9gZ1O266a3z9k7w,134
1289
- hestia_earth_models-0.74.5.dist-info/LICENSE,sha256=TD25LoiRJsA5CPUNrcyt1PXlGcbUGFMAeZoBcfCrCNE,1154
1290
- hestia_earth_models-0.74.5.dist-info/METADATA,sha256=7JSVI3aieeaAATUOsKCFJUyxj9Suv4GkM8Cy0A88FaE,4037
1291
- hestia_earth_models-0.74.5.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1292
- hestia_earth_models-0.74.5.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
1293
- hestia_earth_models-0.74.5.dist-info/RECORD,,
1289
+ hestia_earth_models-0.74.7.dist-info/LICENSE,sha256=TD25LoiRJsA5CPUNrcyt1PXlGcbUGFMAeZoBcfCrCNE,1154
1290
+ hestia_earth_models-0.74.7.dist-info/METADATA,sha256=8Znns2lsgYAaWBeVScidRuK_3NCf-xF__bW6sUBFyto,4037
1291
+ hestia_earth_models-0.74.7.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
1292
+ hestia_earth_models-0.74.7.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
1293
+ hestia_earth_models-0.74.7.dist-info/RECORD,,
@@ -11,8 +11,14 @@ fixtures_folder = f"{fixtures_path}/{MODEL}/{MODEL_KEY}"
11
11
  _folders = [d for d in os.listdir(fixtures_folder) if os.path.isdir(os.path.join(fixtures_folder, d))]
12
12
 
13
13
 
14
+ def fake_new_emission_extended(*args):
15
+ data = fake_new_emission(*args)
16
+ data['term']['termType'] = 'emission'
17
+ return data
18
+
19
+
14
20
  @pytest.mark.parametrize("subfolder", _folders)
15
- @patch(f"{class_path}._new_emission", side_effect=fake_new_emission)
21
+ @patch(f"{class_path}._new_emission", side_effect=fake_new_emission_extended)
16
22
  def test_run(mock, subfolder: str):
17
23
  folder = f"{fixtures_folder}/{subfolder}"
18
24
  with open(f"{folder}/cycle.jsonld", encoding='utf-8') as f:
@@ -22,4 +28,5 @@ def test_run(mock, subfolder: str):
22
28
  expected = json.load(f)
23
29
 
24
30
  result = run(cycle)
31
+ print(json.dumps(result, indent=2))
25
32
  assert result == expected
@@ -11,8 +11,14 @@ fixtures_folder = f"{fixtures_path}/{MODEL}/{MODEL_KEY}"
11
11
  _folders = [d for d in os.listdir(fixtures_folder) if os.path.isdir(os.path.join(fixtures_folder, d))]
12
12
 
13
13
 
14
+ def fake_new_indicator_extended(*args):
15
+ data = fake_new_indicator(*args)
16
+ data['term']['termType'] = 'resourceUse'
17
+ return data
18
+
19
+
14
20
  @pytest.mark.parametrize("subfolder", _folders)
15
- @patch(f"{class_path}._new_indicator", side_effect=fake_new_indicator)
21
+ @patch(f"{class_path}._new_indicator", side_effect=fake_new_indicator_extended)
16
22
  def test_run(mock, subfolder: str):
17
23
  folder = f"{fixtures_folder}/{subfolder}"
18
24
  with open(f"{folder}/impact.jsonld", encoding='utf-8') as f: