GRSdriver 2.0.1__tar.gz → 2.0.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 (39) hide show
  1. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/__init__.py +5 -1
  2. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/run.py +7 -2
  3. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver.egg-info/PKG-INFO +1 -1
  4. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver.egg-info/SOURCES.txt +1 -0
  5. {grsdriver-2.0.1 → grsdriver-2.0.2}/PKG-INFO +1 -1
  6. grsdriver-2.0.2/tests/test_package.py +29 -0
  7. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/driver_S2_SAFE.py +0 -0
  8. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/driver_landsat_col2.py +0 -0
  9. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/__init__.py +0 -0
  10. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/L4_TM_RSR.xlsx +0 -0
  11. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/L5_TM_RSR.xlsx +0 -0
  12. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/L7_RSR.xlsx +0 -0
  13. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/L8_Ball_BA_RSR.v1.2.xlsx +0 -0
  14. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/L8_TIRS_Relative_Spectral_Responses.BA_.v1.xlsx +0 -0
  15. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/L9_OLI2_Ball_FPM_RSR.v1.0.xlsx +0 -0
  16. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/L9_TIRS2_Relative_Spectral_Responses.BA.v1.0.xlsx +0 -0
  17. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/Sentinel-2_MSI_Spectral_Responses.xlsx +0 -0
  18. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/__init__.py +0 -0
  19. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/rsr_landsat_8_oli.nc +0 -0
  20. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/rsr_landsat_8_oli_tirs.nc +0 -0
  21. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/rsr_landsat_8_tirs.nc +0 -0
  22. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/rsr_landsat_9_oli.nc +0 -0
  23. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/rsr_landsat_9_oli_tirs.nc +0 -0
  24. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/data/rsr_landsat_9_tirs.nc +0 -0
  25. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/rsr/landsat_formatting.py +0 -0
  26. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/utils.py +0 -0
  27. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver/visual.py +0 -0
  28. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver.egg-info/dependency_links.txt +0 -0
  29. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver.egg-info/entry_points.txt +0 -0
  30. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver.egg-info/requires.txt +0 -0
  31. {grsdriver-2.0.1 → grsdriver-2.0.2}/GRSdriver.egg-info/top_level.txt +0 -0
  32. {grsdriver-2.0.1 → grsdriver-2.0.2}/LICENSE +0 -0
  33. {grsdriver-2.0.1 → grsdriver-2.0.2}/README.md +0 -0
  34. {grsdriver-2.0.1 → grsdriver-2.0.2}/pyproject.toml +0 -0
  35. {grsdriver-2.0.1 → grsdriver-2.0.2}/requirements.txt +0 -0
  36. {grsdriver-2.0.1 → grsdriver-2.0.2}/setup.cfg +0 -0
  37. {grsdriver-2.0.1 → grsdriver-2.0.2}/tests/test_landsat_driver.py +0 -0
  38. {grsdriver-2.0.1 → grsdriver-2.0.2}/tests/test_s2_driver.py +0 -0
  39. {grsdriver-2.0.1 → grsdriver-2.0.2}/tests/test_utils.py +0 -0
@@ -84,7 +84,11 @@ equations.
84
84
  # parallel band reading (``n_workers``) and Sentinel-2 angles, ~2x faster; really lazy
85
85
  # and ~7x faster dask mode; SpatioTemp.wktbox and clip_raster boxes of the documented size;
86
86
  # API documentation
87
- __version__='2.0.1'
87
+ #
88
+ # v2.0.2 (2026-10-16):
89
+ # continuous integration (tests with Python 3.9 to 3.13, PyPI publishing on tags);
90
+ # grs_driver --help without matplotlib/cartopy
91
+ __version__='2.0.2'
88
92
  __package__ ='GRSdriver'
89
93
 
90
94
  from .driver_landsat_col2 import LandsatDriver
@@ -30,8 +30,6 @@ import logging
30
30
  from GRSdriver import __package__, __version__
31
31
  import GRSdriver
32
32
 
33
- import matplotlib.pyplot as plt
34
- import cartopy.crs as ccrs
35
33
  from GRSdriver.utils import USE_DASK
36
34
  # lazy (dask-backed) loading
37
35
  os.environ[USE_DASK] = "1"
@@ -41,6 +39,13 @@ def main():
41
39
  args = docopt(__doc__, version=__package__ + '_' + __version__)
42
40
  print(args)
43
41
 
42
+ # optional dependencies (extra 'cli'), imported after the parsing so that --help works without them
43
+ try:
44
+ import matplotlib.pyplot as plt
45
+ import cartopy.crs as ccrs
46
+ except ImportError as exc:
47
+ sys.exit(f'grs_driver needs matplotlib and cartopy ({exc}): pip install "GRSdriver[cli]"')
48
+
44
49
  file = args['<input_file>']
45
50
 
46
51
  resolution = int(args['--resolution'])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GRSdriver
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: Driver for L1C satellite images dedicated to GRS processor
5
5
  Author-email: Tristan Harmel <tristan.harmel@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -32,5 +32,6 @@ GRSdriver/rsr/data/rsr_landsat_9_oli.nc
32
32
  GRSdriver/rsr/data/rsr_landsat_9_oli_tirs.nc
33
33
  GRSdriver/rsr/data/rsr_landsat_9_tirs.nc
34
34
  tests/test_landsat_driver.py
35
+ tests/test_package.py
35
36
  tests/test_s2_driver.py
36
37
  tests/test_utils.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GRSdriver
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: Driver for L1C satellite images dedicated to GRS processor
5
5
  Author-email: Tristan Harmel <tristan.harmel@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -0,0 +1,29 @@
1
+ '''
2
+ Tests of the installed package (no satellite data needed): version, data files, command line.
3
+ '''
4
+
5
+ from importlib.metadata import version
6
+
7
+ import pytest
8
+ import xarray as xr
9
+ from importlib_resources import files
10
+
11
+ import GRSdriver
12
+
13
+
14
+ def test_version():
15
+ assert GRSdriver.__version__ == version('GRSdriver')
16
+
17
+
18
+ @pytest.mark.parametrize('name', ['rsr_landsat_8_oli_tirs.nc', 'rsr_landsat_9_oli_tirs.nc'])
19
+ def test_spectral_responses(name):
20
+ '''Spectral response functions of Landsat installed with the package.'''
21
+ with xr.open_dataset(files('GRSdriver.rsr.data').joinpath(name)) as srf:
22
+ assert srf.sizes and all(size > 0 for size in srf.sizes.values())
23
+ assert len(srf.data_vars) > 0
24
+
25
+
26
+ def test_command_line_imports():
27
+ '''The command line module loads without its optional dependencies (matplotlib, cartopy).'''
28
+ from GRSdriver import run
29
+ assert callable(run.main)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes