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

Files changed (32) hide show
  1. hestia_earth/models/cycle/croppingIntensity.py +57 -0
  2. hestia_earth/models/cycle/longFallowRatio.py +52 -0
  3. hestia_earth/models/cycle/siteDuration.py +23 -3
  4. hestia_earth/models/cycle/siteUnusedDuration.py +64 -0
  5. hestia_earth/models/geospatialDatabase/croppingIntensity.py +32 -22
  6. hestia_earth/models/geospatialDatabase/longFallowRatio.py +34 -23
  7. hestia_earth/models/mocking/mock_search.py +14 -8
  8. hestia_earth/models/mocking/search-results.json +27 -27
  9. hestia_earth/models/pooreNemecek2018/{longFallowPeriod.py → longFallowDuration.py} +3 -4
  10. hestia_earth/models/pooreNemecek2018/nurseryDensity.py +1 -2
  11. hestia_earth/models/pooreNemecek2018/nurseryDuration.py +1 -2
  12. hestia_earth/models/pooreNemecek2018/plantationDensity.py +1 -2
  13. hestia_earth/models/pooreNemecek2018/plantationLifespan.py +1 -2
  14. hestia_earth/models/pooreNemecek2018/plantationProductiveLifespan.py +1 -2
  15. hestia_earth/models/pooreNemecek2018/rotationDuration.py +5 -5
  16. hestia_earth/models/preload_requests.py +14 -7
  17. hestia_earth/models/utils/__init__.py +0 -9
  18. hestia_earth/models/utils/cycle.py +10 -2
  19. hestia_earth/models/utils/product.py +2 -2
  20. hestia_earth/models/version.py +1 -1
  21. {hestia_earth_models-0.62.5.dist-info → hestia_earth_models-0.63.0.dist-info}/METADATA +2 -2
  22. {hestia_earth_models-0.62.5.dist-info → hestia_earth_models-0.63.0.dist-info}/RECORD +32 -26
  23. tests/models/cycle/test_croppingIntensity.py +53 -0
  24. tests/models/cycle/test_longFallowRatio.py +49 -0
  25. tests/models/cycle/test_siteDuration.py +41 -14
  26. tests/models/cycle/test_siteUnusedDuration.py +55 -0
  27. tests/models/geospatialDatabase/test_croppingIntensity.py +5 -3
  28. tests/models/geospatialDatabase/test_longFallowRatio.py +5 -3
  29. tests/models/pooreNemecek2018/{test_longFallowPeriod.py → test_longFallowDuration.py} +1 -1
  30. {hestia_earth_models-0.62.5.dist-info → hestia_earth_models-0.63.0.dist-info}/LICENSE +0 -0
  31. {hestia_earth_models-0.62.5.dist-info → hestia_earth_models-0.63.0.dist-info}/WHEEL +0 -0
  32. {hestia_earth_models-0.62.5.dist-info → hestia_earth_models-0.63.0.dist-info}/top_level.txt +0 -0
@@ -9,14 +9,16 @@ fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"
9
9
 
10
10
 
11
11
  @patch(f"{class_path}.is_plantation")
12
- def test_should_run(mock_is_plantation):
12
+ def test_should_run(mock_is_plantation, *args):
13
13
  cycle = {'@type': 'Cycle'}
14
14
 
15
15
  mock_is_plantation.return_value = False
16
- assert _should_run(cycle) is True
16
+ should_run = _should_run(cycle)
17
+ assert should_run is True
17
18
 
18
19
  mock_is_plantation.return_value = True
19
- assert not _should_run(cycle)
20
+ should_run = _should_run(cycle)
21
+ assert not should_run
20
22
 
21
23
 
22
24
  @patch(f"{class_path}._new_practice", side_effect=fake_new_practice)
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
  import json
3
3
  from tests.utils import fixtures_path, fake_new_practice
4
4
 
5
- from hestia_earth.models.pooreNemecek2018.longFallowPeriod import MODEL, TERM_ID, run
5
+ from hestia_earth.models.pooreNemecek2018.longFallowDuration import MODEL, TERM_ID, run
6
6
 
7
7
  class_path = f"hestia_earth.models.{MODEL}.{TERM_ID}"
8
8
  fixtures_folder = f"{fixtures_path}/{MODEL}/{TERM_ID}"