pyramids-eo 0.12.0__tar.gz → 0.12.2__tar.gz

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 (118) hide show
  1. {pyramids_eo-0.12.0/src/pyramids_eo.egg-info → pyramids_eo-0.12.2}/PKG-INFO +5 -5
  2. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/pyproject.toml +27 -56
  3. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/readers/harmonise.py +1 -1
  4. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sentinel/product.py +2 -2
  5. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sentinel/s2/masks.py +1 -1
  6. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sentinel/s2/reader.py +1 -1
  7. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sentinel/s2/scaling.py +4 -4
  8. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2/src/pyramids_eo.egg-info}/PKG-INFO +5 -5
  9. pyramids_eo-0.12.2/src/pyramids_eo.egg-info/requires.txt +10 -0
  10. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_extras_gating.py +92 -0
  11. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_sentinel_reader_crop.py +1 -1
  12. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_sentinel_s2.py +1 -1
  13. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_sentinel_units.py +8 -8
  14. pyramids_eo-0.12.0/src/pyramids_eo.egg-info/requires.txt +0 -10
  15. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/LICENSE +0 -0
  16. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/README.md +0 -0
  17. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/setup.cfg +0 -0
  18. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/__init__.py +0 -0
  19. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/composites/__init__.py +0 -0
  20. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/composites/_common.py +0 -0
  21. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/composites/background.py +0 -0
  22. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/composites/blend.py +0 -0
  23. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/composites/geometry.py +0 -0
  24. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/composites/overlay.py +0 -0
  25. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/composites/rayleigh.py +0 -0
  26. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/composites/true_color.py +0 -0
  27. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/composites/true_color_night.py +0 -0
  28. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/drivers/__init__.py +0 -0
  29. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/drivers/_base.py +0 -0
  30. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/drivers/ahi.py +0 -0
  31. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/drivers/earthengine.py +0 -0
  32. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/drivers/fci.py +0 -0
  33. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/drivers/olci.py +0 -0
  34. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/drivers/sentinel2.py +0 -0
  35. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/drivers/seviri.py +0 -0
  36. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/drivers/slstr.py +0 -0
  37. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/earthengine/__init__.py +0 -0
  38. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/earthengine/credentials.py +0 -0
  39. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/earthengine/reader.py +0 -0
  40. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/enhance.py +0 -0
  41. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/errors.py +0 -0
  42. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/resample.py +0 -0
  43. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/__init__.py +0 -0
  44. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/readers/__init__.py +0 -0
  45. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/readers/_common.py +0 -0
  46. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/readers/_sentinel3.py +0 -0
  47. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/readers/ahi.py +0 -0
  48. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/readers/fci.py +0 -0
  49. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/readers/fci_l1c.py +0 -0
  50. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/readers/olci.py +0 -0
  51. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/readers/seviri.py +0 -0
  52. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/readers/slstr.py +0 -0
  53. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/registry/__init__.py +0 -0
  54. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/registry/calibration.py +0 -0
  55. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/registry/data/ahi.yaml +0 -0
  56. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/registry/data/fci.yaml +0 -0
  57. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/registry/data/msi.yaml +0 -0
  58. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/registry/data/olci.yaml +0 -0
  59. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/registry/data/seviri.yaml +0 -0
  60. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/registry/data/slstr.yaml +0 -0
  61. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/registry/data/tasseled_cap.yaml +0 -0
  62. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/registry/sensors.py +0 -0
  63. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sensors/registry/tasseled_cap.py +0 -0
  64. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sentinel/__init__.py +0 -0
  65. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sentinel/_connection.py +0 -0
  66. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sentinel/s2/__init__.py +0 -0
  67. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/sentinel/s2/product.py +0 -0
  68. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/spectral/__init__.py +0 -0
  69. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/spectral/tasseled_cap.py +0 -0
  70. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/stac/__init__.py +0 -0
  71. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/stac/auth_cdse.py +0 -0
  72. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo/stac/signers.py +0 -0
  73. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo.egg-info/SOURCES.txt +0 -0
  74. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo.egg-info/dependency_links.txt +0 -0
  75. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo.egg-info/entry_points.txt +0 -0
  76. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/src/pyramids_eo.egg-info/top_level.txt +0 -0
  77. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_composites_azimuth.py +0 -0
  78. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_composites_blend.py +0 -0
  79. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_composites_geometry.py +0 -0
  80. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_composites_geostationary_crs.py +0 -0
  81. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_composites_overlay.py +0 -0
  82. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_composites_rayleigh.py +0 -0
  83. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_composites_real.py +0 -0
  84. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_composites_static_image.py +0 -0
  85. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_composites_sunz.py +0 -0
  86. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_composites_true_color.py +0 -0
  87. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_composites_true_color_night.py +0 -0
  88. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_drivers_ahi.py +0 -0
  89. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_drivers_base.py +0 -0
  90. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_drivers_discovery.py +0 -0
  91. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_drivers_earthengine.py +0 -0
  92. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_drivers_fci.py +0 -0
  93. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_drivers_olci.py +0 -0
  94. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_drivers_sentinel2.py +0 -0
  95. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_drivers_seviri.py +0 -0
  96. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_drivers_slstr.py +0 -0
  97. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_earthengine_credentials.py +0 -0
  98. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_earthengine_reader.py +0 -0
  99. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_enhance.py +0 -0
  100. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_netcdf3_writer.py +0 -0
  101. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_package.py +0 -0
  102. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_read_file_dispatch.py +0 -0
  103. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_readers_ahi.py +0 -0
  104. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_readers_fci.py +0 -0
  105. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_readers_fci_l1c.py +0 -0
  106. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_readers_harmonise.py +0 -0
  107. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_readers_olci.py +0 -0
  108. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_readers_sentinel3.py +0 -0
  109. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_readers_seviri.py +0 -0
  110. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_readers_slstr.py +0 -0
  111. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_registry.py +0 -0
  112. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_resample.py +0 -0
  113. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_sentinel_connection.py +0 -0
  114. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_sentinel_live.py +0 -0
  115. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_sentinel_live_helpers.py +0 -0
  116. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_sentinel_registry.py +0 -0
  117. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_spectral_tasseled_cap.py +0 -0
  118. {pyramids_eo-0.12.0 → pyramids_eo-0.12.2}/tests/test_stac_signers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyramids-eo
3
- Version: 0.12.0
3
+ Version: 0.12.2
4
4
  Summary: Remote-sensing / Earth-observation tier for the pyramids GIS stack
5
5
  Author-email: Mostafa Farrag <moah.farag@gmail.com>
6
6
  License: GNU General Public License v3
@@ -21,17 +21,17 @@ Classifier: Programming Language :: Python :: 3.14
21
21
  Classifier: Topic :: Scientific/Engineering :: GIS
22
22
  Classifier: Intended Audience :: Science/Research
23
23
  Classifier: Intended Audience :: Developers
24
- Requires-Python: <4,>=3.11
24
+ Requires-Python: <4,>=3.11.5
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
- Requires-Dist: pyramids-core>=0.73.0
27
+ Requires-Dist: pyramids-core>=0.80.0
28
28
  Requires-Dist: numpy>=2.0.0
29
29
  Requires-Dist: pyyaml>=6.0
30
30
  Provides-Extra: viz
31
- Requires-Dist: pyramids-core[viz]>=0.73.0; extra == "viz"
31
+ Requires-Dist: pyramids-core[viz]>=0.80.0; extra == "viz"
32
32
  Requires-Dist: pillow>=13.0.0; extra == "viz"
33
33
  Provides-Extra: lazy
34
- Requires-Dist: pyramids-core[lazy]>=0.73.0; extra == "lazy"
34
+ Requires-Dist: pyramids-lazy>=0.2.0; extra == "lazy"
35
35
  Dynamic: license-file
36
36
 
37
37
  # pyramids-eo
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyramids-eo"
3
- version = "0.12.0"
3
+ version = "0.12.2"
4
4
  description = "Remote-sensing / Earth-observation tier for the pyramids GIS stack"
5
5
  readme = {file = "README.md", content-type = "text/markdown"}
6
6
  authors = [{ name = "Mostafa Farrag", email = "moah.farag@gmail.com" }]
@@ -22,39 +22,26 @@ classifiers = [
22
22
  "Intended Audience :: Developers",
23
23
  ]
24
24
 
25
- requires-python = ">= 3.11, <4"
25
+ # 3.11.5 floor so the lock can take patched soupsieve (clears its CVEs).
26
+ requires-python = ">= 3.11.5, <4"
26
27
 
27
28
  dependencies = [
28
- # >=0.73.0 for the in-memory DatasetCollection reduction (pyramids #1412): the
29
- # collection `collection_from_earthengine` returns is backed by resident scenes
30
- # (`datasets=`, so `files is None`), and before 0.73.0 `DatasetCollection.data`
31
- # — which `reduce_time` and the associative `mean`/`min`/`max`/`sum` all read —
32
- # raised RuntimeError on it, making the reader's collection unreducible (#131).
33
- "pyramids-core >=0.73.0",
29
+ # 0.80.0 dropped the [lazy] extra (#1569) this package's [lazy] forwards to; also the
30
+ # floor for #131's resident-collection reduction.
31
+ "pyramids-core >=0.80.0",
34
32
  "numpy >=2.0.0",
35
33
  "pyyaml >=6.0",
36
34
  ]
37
35
 
38
36
  [project.optional-dependencies]
39
37
  viz = [
40
- "pyramids-core[viz]>=0.73.0",
41
- # CVE-2026-112395/112397/112400/112404/112895/112896/112897/112899: eight
42
- # vulnerabilities in Pillow < 13.0.0, fixed in 13.0.0. Pillow arrives *only* via
43
- # the viz stack (pyramids-core[viz] → matplotlib → pillow), so the floor belongs
44
- # on this extra — a bare `pip install pyramids-eo` takes no pin, `pip install
45
- # pyramids-eo[viz]` does. (certifi is also flagged transitively via pyogrio /
46
- # pyproj and the dev-only requests chain, but pyramids-eo doesn't own those
47
- # chains — upstream pyramids-gis guards them; pip-audit on the lock sees the
48
- # resolver's 2026.10.19 already.)
38
+ "pyramids-core[viz]>=0.80.0",
39
+ # Pillow <13 CVEs; arrives via the viz stack, so the floor sits on this extra.
49
40
  "pillow >=13.0.0",
50
41
  ]
51
- # Reductions over a returned DatasetCollection (`reduce_time`, `mean` / `min` /
52
- # `max` / `sum`) read `DatasetCollection.data`, which needs dask — so a bare install
53
- # raises `OptionalPackageDoesNotExist` on them (#131). This is the supported opt-in:
54
- # `pip install pyramids-eo[lazy]`, rather than requiring a user to know to install an
55
- # upstream package's extra by hand. It is an extra, not a runtime dependency, so a
56
- # plain `pip install pyramids-eo` still pulls none of its ~31 distributions.
57
- lazy = ["pyramids-core[lazy]>=0.73.0"]
42
+ # Delivers the dask array stack DatasetCollection reductions need (#131). Forwards to
43
+ # the pyramids-lazy plugin: core 0.80 dropped its own [lazy] extra (#1569).
44
+ lazy = ["pyramids-lazy>=0.2.0"]
58
45
 
59
46
  [dependency-groups]
60
47
  dev = [
@@ -70,28 +57,19 @@ dev = [
70
57
  "build>=1.0.0",
71
58
  "twine>=5.0.0",
72
59
  "pip",
73
- # Floor jupyterlab / notebook past PYSEC-2026-4055/4056/4057 +
74
- # CVE-2026-102832 (jupyterlab) and PYSEC-2026-4112 (notebook), fixed in
75
- # 4.6.4 and 7.6.3 respectively.
60
+ # security floors (jupyterlab / notebook CVEs)
76
61
  "jupyterlab >=4.6.4",
77
62
  "notebook >=7.6.3",
78
63
  "jupyter",
79
- # Floor jupyter-server past CVE-2026-86049 (token leaked into 500 logs,
80
- # fixed in 2.21.0); it arrives transitively via jupyterlab / notebook.
64
+ # security floor (jupyter-server CVE-2026-86049), transitive via jupyterlab
81
65
  "jupyter-server >=2.21.0",
82
- # Floor tornado past GHSA-chx6-46f5-w4vp / c2m8-h5v5-343r / 3hv7-mjh2-fv65
83
- # (fixed in 6.5.9) and CVE-2026-115927 / 116577 / 116578 (fixed in 6.6); it
84
- # arrives transitively via the jupyter stack.
66
+ # security floor (tornado CVEs), transitive via the jupyter stack
85
67
  "tornado >=6.6",
86
- # Floor filelock past CVE-2026-112907/112908/112909/112910/112911/112913/
87
- # 112915/112935/112936/112938/112939/112940 (fixed by 4.2.1); it arrives
88
- # transitively via virtualenv / pre-commit.
68
+ # security floor (filelock CVEs), transitive via virtualenv / pre-commit
89
69
  "filelock >=4.2.1",
90
- # Floor urllib3 past PYSEC-2026-4175/4176/4177 (chunked-encoding memory
91
- # DoS, fixed in 2.8.0); it arrives transitively via the jupyter / HTTP stack.
70
+ # security floor (urllib3 PYSEC-2026-4175..4177), transitive via the HTTP stack
92
71
  "urllib3 >=2.8.0",
93
- # Floor virtualenv past PYSEC-2026-4011/4012/4013/4014 (fixed by 21.7.13);
94
- # it arrives transitively via pre-commit.
72
+ # security floor (virtualenv PYSEC-2026-4011..4014), transitive via pre-commit
95
73
  "virtualenv >=21.7.13",
96
74
  "commitizen>=4.8.4",
97
75
  "mypy>=1.10.0",
@@ -112,9 +90,7 @@ docs = [
112
90
  "jupyter",
113
91
  "nbconvert",
114
92
  "ipykernel",
115
- # Same tornado floor the dev group carries (CVE-2026-115927 / 116577 / 116578,
116
- # fixed in 6.6): it arrives here too, via the notebook / jupyter stack. pip-audit
117
- # only scans the py311 environment, so this one is not caught by CI.
93
+ # security floor (tornado CVEs), transitive via the jupyter stack
118
94
  "tornado >=6.6",
119
95
  ]
120
96
 
@@ -124,13 +100,7 @@ repository = "https://github.com/serapeum-org/pyramids-eo"
124
100
  documentation = "https://serapeum-org.github.io/pyramids-eo"
125
101
  Changelog = "https://github.com/serapeum-org/pyramids-eo/blob/main/docs/change-log.md"
126
102
 
127
- # Raster-reader plugins discovered by pyramids-core's `pyramids.raster_drivers`
128
- # hook: installing this package lets `Dataset.read_file(<source>)` route into these.
129
- # Every reader that fits the single-source read_file model is registered (see
130
- # src/pyramids_eo/drivers/__init__.py). What stays facade-only is the temporal
131
- # path: read_file only ever dispatches a driver's `read`, never `read_collection`,
132
- # so a time series goes through `collection_from_*`. The Sentinel-2 driver also declares
133
- # `preempts`, so a zipped product beats GDAL to the bare read.
103
+ # Reader plugins discovered via pyramids-core's `pyramids.raster_drivers` hook.
134
104
  [project.entry-points."pyramids.raster_drivers"]
135
105
  ahi = "pyramids_eo.drivers.ahi:AhiDriver"
136
106
  earthengine = "pyramids_eo.drivers.earthengine:EarthEngineDriver"
@@ -225,21 +195,24 @@ pythonpath = ["src"]
225
195
  testpaths = ["tests"]
226
196
  timeout = 300
227
197
  faulthandler_timeout = 120
198
+ filterwarnings = [
199
+ # Fail on any deprecation so a reintroduced pyramids alias can't slip by. Category,
200
+ # not module/message: pyramids warns with stacklevel=2 and its wording varies.
201
+ "error::DeprecationWarning",
202
+ ]
228
203
  markers = [
229
204
  "slow: mark test as slow (deselect with '-m \"not slow\"')",
230
205
  "fast: mark test as fast (deselect with '-m \"not fast\"')",
231
206
  "core: extras-free test (auto-applied when no extras marker is present)",
232
207
  "plot: tests requiring the [viz] extra (cleopatra) — plotting tests (deselect with '-m \"not plot\"')",
233
- "lazy: tests requiring pyramids-core[lazy] (dask) — DatasetCollection reductions (deselect with '-m \"not lazy\"')",
208
+ "lazy: tests requiring dask.array (the pyramids-lazy extra) — DatasetCollection reductions (deselect with '-m \"not lazy\"')",
234
209
  "live: test against a real external resource — a network service, or a real granule on disk that the offline fixtures cannot stand in for (deselect with '-m \"not live\"', run with '-m live')",
235
210
  ]
236
211
 
237
212
 
238
213
  [tool.pixi.workspace]
239
214
  channels = ["conda-forge"]
240
- # macOS floor raised to 14.0 on the osx platforms so pixi accepts the
241
- # macosx_14_0_arm64 wheels (pyproj/numpy) instead of falling back to an sdist
242
- # build. Declared per-platform (the global [system-requirements] table is deprecated).
215
+ # osx floor 14.0 so pixi takes the macosx_14_0 wheels (pyproj/numpy) over an sdist build.
243
216
  platforms = [
244
217
  "win-64",
245
218
  "linux-64",
@@ -269,9 +242,7 @@ cz-changelog = { cmd = "cz changelog", description = "Generate changelog using C
269
242
  cz-bump = { cmd = "cz bump", description = "Bump version using Commitizen" }
270
243
  mypy = { cmd = "mypy", description = "Run mypy type checking" }
271
244
 
272
- # The test environments carry `lazy` (dask) so the `@pytest.mark.lazy` reduction
273
- # tests execute rather than auto-skip; `default` and `docs` stay without it, so a
274
- # bare install and the docs build pull none of its ~31 distributions (#131).
245
+ # Test envs carry `lazy` so `@pytest.mark.lazy` tests run; default/docs stay without it.
275
246
  [tool.pixi.environments]
276
247
  default = { features = ["viz"], solve-group = "default" }
277
248
  dev = { features = ["viz", "lazy", "dev"], solve-group = "default" }
@@ -35,7 +35,7 @@ def _resample_to(band: Any, reference: Any, method: str | None) -> Any:
35
35
  crs,
36
36
  method=method,
37
37
  cell_size=reference.cell_size,
38
- bbox=tuple(reference.bbox),
38
+ bbox=tuple(reference.total_bounds),
39
39
  )
40
40
  # warped_view derives its grid from bbox + cell size, which can land off the
41
41
  # reference by a pixel for non-integer ratios / rounding; align snaps it to
@@ -48,7 +48,7 @@ class SentinelProduct(abc.ABC):
48
48
  Attributes:
49
49
  path: The path (or connection root) the product was opened from.
50
50
  driver: The GDAL driver short name (``"SENTINEL2"`` / ``"SAFE"``).
51
- metadata: The container's default-domain metadata (``Dataset.meta_data``).
51
+ metadata: The container's default-domain metadata (``Dataset.metadata``).
52
52
  subdatasets: The pyramids ``SubDataset`` value objects the container
53
53
  exposes, each openable with ``.open()``.
54
54
  """
@@ -56,7 +56,7 @@ class SentinelProduct(abc.ABC):
56
56
  def __init__(self, path: str, container: Dataset) -> None:
57
57
  self.path = path
58
58
  self.driver = container.raster.GetDriver().ShortName
59
- self.metadata: dict[str, str] = dict(container.meta_data or {})
59
+ self.metadata: dict[str, str] = dict(container.metadata or {})
60
60
  self.subdatasets: list[Any] = list(container.subdatasets)
61
61
 
62
62
  @property
@@ -96,7 +96,7 @@ def _resolve_classes(classes: Sequence[SclClass | str | int]) -> set[int]:
96
96
 
97
97
  def _find_scl_band(dataset: Any) -> int | None:
98
98
  """Return the 0-based index of a band named ``SCL`` in ``dataset``, else None."""
99
- for i, meta in enumerate(dataset.band_meta_data):
99
+ for i, meta in enumerate(dataset.band_metadata):
100
100
  if (meta.get("BANDNAME") or "").strip().upper() == "SCL":
101
101
  return i
102
102
  for i, name in enumerate(dataset.band_names):
@@ -357,7 +357,7 @@ def _native_subdataset(product: S2Product, band: str, epsg: int | None) -> S2Sub
357
357
 
358
358
  def _offsets_of(dataset: Any) -> list[float]:
359
359
  """Per-band radiometric offsets (BOA/RADIO_ADD_OFFSET), ``0.0`` if absent."""
360
- return [_scaling._band_offset(meta) for meta in dataset.band_meta_data]
360
+ return [_scaling._band_offset(meta) for meta in dataset.band_metadata]
361
361
 
362
362
 
363
363
  def _check_bands_present(subdataset: S2Subdataset, wanted: list[str]) -> None:
@@ -7,7 +7,7 @@ radiometric offset that processing baselines ``>= 04.00`` introduced
7
7
  (``BOA_ADD_OFFSET`` / ``RADIO_ADD_OFFSET``; ``0`` before that).
8
8
 
9
9
  The GDAL ``SENTINEL2`` driver surfaces the offset in **per-band** metadata
10
- (``Dataset.band_meta_data[i]``), which is where :func:`_band_offset` reads it —
10
+ (``Dataset.band_metadata[i]``), which is where :func:`_band_offset` reads it —
11
11
  verified end-to-end against a real baseline-05.09 product (offset ``-1000``
12
12
  flows into ``read_array()``; see ``test_baseline_509_*``), not just
13
13
  the offset parser.
@@ -100,7 +100,7 @@ def tag_reflectance(
100
100
  raise ProductError("product has no usable quantification value")
101
101
 
102
102
  band_names = dataset.band_names
103
- band_meta = dataset.band_meta_data
103
+ band_meta = dataset.band_metadata
104
104
  scales: list[float] = []
105
105
  tagged_offsets: list[float] = []
106
106
  for i, name in enumerate(band_names):
@@ -132,10 +132,10 @@ def _stamp_baseline(dataset: Any, product: S2Product) -> None:
132
132
  untagged rather than failing the reflectance conversion.
133
133
  """
134
134
  try:
135
- meta = dict(dataset.meta_data or {})
135
+ meta = dict(dataset.metadata or {})
136
136
  meta["PROCESSING_BASELINE"] = product.baseline
137
137
  meta["PYRAMIDS_EO_REFLECTANCE"] = "scaled"
138
- dataset.meta_data = meta
138
+ dataset.metadata = meta
139
139
  except (RuntimeError, ValueError, TypeError):
140
140
  # baseline stamping is non-essential; a rejecting setter must not fail
141
141
  # the reflectance conversion, but a programming error still surfaces.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyramids-eo
3
- Version: 0.12.0
3
+ Version: 0.12.2
4
4
  Summary: Remote-sensing / Earth-observation tier for the pyramids GIS stack
5
5
  Author-email: Mostafa Farrag <moah.farag@gmail.com>
6
6
  License: GNU General Public License v3
@@ -21,17 +21,17 @@ Classifier: Programming Language :: Python :: 3.14
21
21
  Classifier: Topic :: Scientific/Engineering :: GIS
22
22
  Classifier: Intended Audience :: Science/Research
23
23
  Classifier: Intended Audience :: Developers
24
- Requires-Python: <4,>=3.11
24
+ Requires-Python: <4,>=3.11.5
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
- Requires-Dist: pyramids-core>=0.73.0
27
+ Requires-Dist: pyramids-core>=0.80.0
28
28
  Requires-Dist: numpy>=2.0.0
29
29
  Requires-Dist: pyyaml>=6.0
30
30
  Provides-Extra: viz
31
- Requires-Dist: pyramids-core[viz]>=0.73.0; extra == "viz"
31
+ Requires-Dist: pyramids-core[viz]>=0.80.0; extra == "viz"
32
32
  Requires-Dist: pillow>=13.0.0; extra == "viz"
33
33
  Provides-Extra: lazy
34
- Requires-Dist: pyramids-core[lazy]>=0.73.0; extra == "lazy"
34
+ Requires-Dist: pyramids-lazy>=0.2.0; extra == "lazy"
35
35
  Dynamic: license-file
36
36
 
37
37
  # pyramids-eo
@@ -0,0 +1,10 @@
1
+ pyramids-core>=0.80.0
2
+ numpy>=2.0.0
3
+ pyyaml>=6.0
4
+
5
+ [lazy]
6
+ pyramids-lazy>=0.2.0
7
+
8
+ [viz]
9
+ pyramids-core[viz]>=0.80.0
10
+ pillow>=13.0.0
@@ -8,6 +8,12 @@ unavailable — without needing the real dependency to be absent.
8
8
 
9
9
  from __future__ import annotations
10
10
 
11
+ import re
12
+ from importlib.metadata import PackageNotFoundError
13
+ from importlib.metadata import requires as _dist_requires
14
+
15
+ import pytest
16
+
11
17
  from tests import _marks
12
18
  from tests._marks import EXTRA_MARKERS, _has
13
19
  from tests.conftest import pytest_collection_modifyitems
@@ -115,3 +121,89 @@ class TestPytestCollectionModifyItems:
115
121
  {"plot": (False, "requires the [viz] extra")},
116
122
  )
117
123
  pytest_collection_modifyitems(config=None, items=[])
124
+
125
+
126
+ def _canonical_name(requirement: str) -> str:
127
+ """The canonical distribution name of a ``Requires-Dist`` string.
128
+
129
+ Strips the environment marker, version specifier and any extras, then
130
+ PEP 503-normalises, so ``pyramids-lazy[parquet]>=0.2.0; extra == "lazy"``
131
+ and ``pyramids_lazy >= 0.2`` both reduce to ``pyramids-lazy``.
132
+
133
+ Args:
134
+ requirement: One ``Requires-Dist`` entry.
135
+
136
+ Returns:
137
+ The lower-cased, dash-normalised project name with no extras or specifier.
138
+ """
139
+ head = requirement.split(";")[0].strip()
140
+ name = re.split(r"[<>=!~\[ (]", head, maxsplit=1)[0]
141
+ return re.sub(r"[-_.]+", "-", name).lower()
142
+
143
+
144
+ def _lazy_extra_requirements():
145
+ """This package's own ``[lazy]`` extra requirements, from installed metadata.
146
+
147
+ Returns:
148
+ The ``Requires-Dist`` entries of ``pyramids-eo`` gated on the ``lazy``
149
+ extra, or ``None`` when the distribution is not installed (an
150
+ editable/source tree run via ``pythonpath`` with no built metadata).
151
+ """
152
+ try:
153
+ reqs = _dist_requires("pyramids-eo") or []
154
+ except PackageNotFoundError:
155
+ return None
156
+ # importlib normalises markers to double quotes, but accept either so the
157
+ # test leans on no normalisation it does not itself assert.
158
+ return [r for r in reqs if 'extra == "lazy"' in r or "extra == 'lazy'" in r]
159
+
160
+
161
+ class TestLazyExtraContract:
162
+ """The ``[lazy]`` extra must deliver the dask stack, not a dead core extra.
163
+
164
+ This is the regression guard for the break this extra was repaired from:
165
+ ``pyramids-core`` 0.80.0 deleted the ``[lazy]`` extra that
166
+ ``pyramids-eo[lazy]`` used to forward to, so the old ``pyramids-core[lazy]``
167
+ requirement resolved to a pip warning and no dask — ``pip install
168
+ pyramids-eo[lazy]`` silently installed nothing a ``DatasetCollection``
169
+ reduction (#131) needs.
170
+
171
+ The contract test reads declared metadata by *name* — it proves the extra
172
+ points at ``pyramids-lazy`` rather than the dead core form, not that the pin
173
+ resolves to a working dask; the latter is what the dask-stack test covers.
174
+ """
175
+
176
+ def test_lazy_extra_targets_the_pyramids_lazy_plugin(self):
177
+ """``[lazy]`` requires ``pyramids-lazy`` and never the dead core extra."""
178
+ reqs = _lazy_extra_requirements()
179
+ if reqs is None:
180
+ pytest.skip("pyramids-eo not installed; run against built metadata")
181
+ assert reqs, "pyramids-eo must declare a non-empty [lazy] extra"
182
+ names = [_canonical_name(r) for r in reqs]
183
+ assert "pyramids-lazy" in names, (
184
+ f"[lazy] must forward to the pyramids-lazy plugin, got {reqs}"
185
+ )
186
+ assert not any("pyramids-core[lazy]" in r.replace(" ", "") for r in reqs), (
187
+ "[lazy] must not name pyramids-core[lazy]: 0.80.0 deleted that extra, so "
188
+ f"it resolves to no backend (the bug this guards). Got {reqs}"
189
+ )
190
+
191
+ @pytest.mark.lazy
192
+ def test_lazy_plugin_brings_the_dask_array_stack(self):
193
+ """The installed ``[lazy]`` stack imports ``dask.array`` and ``pyramids-lazy`` hard-needs dask.
194
+
195
+ Marked ``lazy`` so it runs only where ``dask.array`` is importable (the
196
+ #131 reduction path reads it directly). The ``pyramids-lazy`` distribution
197
+ lookup is guarded, because dask can be present for reasons unrelated to
198
+ this extra, so the dist may be absent even when the marker lets the test run.
199
+ """
200
+ import dask.array as da # noqa: F401 - the end-to-end check that the stack resolves
201
+
202
+ try:
203
+ lazy_reqs = _dist_requires("pyramids-lazy") or []
204
+ except PackageNotFoundError:
205
+ pytest.skip("pyramids-lazy not installed; dask present for another reason")
206
+ dask_pins = [
207
+ r for r in lazy_reqs if "extra ==" not in r and _canonical_name(r) == "dask"
208
+ ]
209
+ assert dask_pins, f"pyramids-lazy must hard-depend on dask, got {lazy_reqs!r}"
@@ -168,7 +168,7 @@ class TestFromSentinel2Wiring:
168
168
 
169
169
  spy = mock.Mock(side_effect=_reader._crop_to_bbox)
170
170
  monkeypatch.setattr(_reader, "_crop_to_bbox", spy)
171
- bb = from_sentinel2(_L2A, bands=["B04"]).bbox
171
+ bb = from_sentinel2(_L2A, bands=["B04"]).total_bounds
172
172
  window = (bb[0], bb[1], (bb[0] + bb[2]) / 2, (bb[1] + bb[3]) / 2)
173
173
  from_sentinel2(_L2A, bands=["B04"], bbox=window)
174
174
  assert spy.call_count == 1, (
@@ -199,7 +199,7 @@ def test_baseline_509_carries_radiometric_offset():
199
199
  product = open_product(_L1C_509)
200
200
  assert product.baseline == "05.09"
201
201
  sub = product.subdataset_for(min(product.resolutions)).open()
202
- assert sub.band_meta_data[0]["RADIO_ADD_OFFSET"] == "-1000"
202
+ assert sub.band_metadata[0]["RADIO_ADD_OFFSET"] == "-1000"
203
203
 
204
204
 
205
205
  def test_baseline_509_offset_flows_to_scaled_read():
@@ -400,7 +400,7 @@ class TestTagReflectance:
400
400
  """`_stamp_baseline` never raises when the metadata write fails.
401
401
 
402
402
  Test scenario:
403
- A dataset whose ``meta_data`` setter raises leaves scaling
403
+ A dataset whose ``metadata`` setter raises leaves scaling
404
404
  unaffected (the defensive except path).
405
405
  """
406
406
 
@@ -408,11 +408,11 @@ class TestTagReflectance:
408
408
  baseline = "05.09"
409
409
 
410
410
  @property
411
- def meta_data(self):
411
+ def metadata(self):
412
412
  return {}
413
413
 
414
- @meta_data.setter
415
- def meta_data(self, value):
414
+ @metadata.setter
415
+ def metadata(self, value):
416
416
  raise RuntimeError("read only")
417
417
 
418
418
  product = open_product(_L2A)
@@ -625,7 +625,7 @@ class TestReaderEdges:
625
625
 
626
626
  product = open_product(_L2A)
627
627
  full = from_sentinel2(product, bands=["B04"])
628
- bb = full.bbox
628
+ bb = full.total_bounds
629
629
  window = (
630
630
  bb[0],
631
631
  bb[1],
@@ -641,7 +641,7 @@ class TestReaderEdges:
641
641
  from pyramids_eo.sentinel import from_sentinel2
642
642
 
643
643
  product = open_product(_L2A)
644
- bb = from_sentinel2(product, bands=["B04"]).bbox
644
+ bb = from_sentinel2(product, bands=["B04"]).total_bounds
645
645
  window = (
646
646
  bb[0],
647
647
  bb[1],
@@ -763,7 +763,7 @@ class TestCoverageGaps:
763
763
  """`_find_scl_band` falls back to the display name when BANDNAME is absent."""
764
764
 
765
765
  class _DS:
766
- band_meta_data = [{}, {}]
766
+ band_metadata = [{}, {}]
767
767
  band_names = ["red", "SCL, Scene Classification"]
768
768
 
769
769
  assert _masks._find_scl_band(_DS()) == 1
@@ -772,7 +772,7 @@ class TestCoverageGaps:
772
772
  """`_find_scl_band` returns None when no band is SCL."""
773
773
 
774
774
  class _DS:
775
- band_meta_data = [{"BANDNAME": "B4"}]
775
+ band_metadata = [{"BANDNAME": "B4"}]
776
776
  band_names = ["B4"]
777
777
 
778
778
  assert _masks._find_scl_band(_DS()) is None
@@ -1,10 +0,0 @@
1
- pyramids-core>=0.73.0
2
- numpy>=2.0.0
3
- pyyaml>=6.0
4
-
5
- [lazy]
6
- pyramids-core[lazy]>=0.73.0
7
-
8
- [viz]
9
- pyramids-core[viz]>=0.73.0
10
- pillow>=13.0.0
File without changes
File without changes
File without changes