From 9d1d99791fb5df900eb562a6e10bd552e2bfcf5d Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Fri, 17 Nov 2023 08:54:52 +0100 Subject: [PATCH 1/3] Bump up python versions --- .github/workflows/ci.yaml | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 514a3ad5..b1316cb8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,10 +10,10 @@ jobs: fail-fast: true matrix: os: ["windows-latest", "ubuntu-latest", "macos-latest"] - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.10", "3.11", "3.12"] experimental: [false] include: - - python-version: "3.10" + - python-version: "3.12" os: "ubuntu-latest" experimental: true diff --git a/setup.py b/setup.py index 51bebfff..739b0381 100644 --- a/setup.py +++ b/setup.py @@ -82,6 +82,6 @@ 'pyspectral/data/MSG_SEVIRI_Spectral_Response_Characterisation.XLS'])], test_suite='pyspectral.tests.suite', tests_require=test_requires, - python_requires='>=3.7', + python_requires='>=3.10', zip_safe=False, ) From fbbf1724237d8965fe1eb46748f887cba921aede Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Wed, 22 Nov 2023 09:55:27 +0100 Subject: [PATCH 2/3] Fix use of deprecated not_called --- pyspectral/tests/test_rayleigh.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyspectral/tests/test_rayleigh.py b/pyspectral/tests/test_rayleigh.py index 9ee890e9..f11dbe5d 100644 --- a/pyspectral/tests/test_rayleigh.py +++ b/pyspectral/tests/test_rayleigh.py @@ -219,7 +219,7 @@ def test_get_reflectance_wvl_outside_range(self, fake_lut_hdf5): refl_corr = rayl.get_reflectance(sun_zenith, sat_zenith, azidiff, 1.2, redband_refl) np.testing.assert_allclose(refl_corr, 0) assert isinstance(refl_corr, da.Array) - assert rsr_obj.not_called() + rsr_obj.assert_not_called() class TestRayleigh: @@ -385,7 +385,7 @@ def test_get_reflectance_float_wavelength(self, fake_lut_hdf5): refl_corr = rayl.get_reflectance(sun_zenith, sat_zenith, azidiff, 0.634, redband_refl) np.testing.assert_allclose(refl_corr, TEST_RAYLEIGH_RESULT3) assert isinstance(refl_corr, np.ndarray) - assert rsr_obj.not_called() + rsr_obj.assert_not_called() @patch('pyspectral.rayleigh.da', None) def test_get_reflectance_wvl_outside_range(self, fake_lut_hdf5): @@ -402,7 +402,7 @@ def test_get_reflectance_wvl_outside_range(self, fake_lut_hdf5): refl_corr = rayl.get_reflectance(sun_zenith, sat_zenith, azidiff, 1.2, redband_refl) np.testing.assert_allclose(refl_corr, 0) assert isinstance(refl_corr, np.ndarray) - assert rsr_obj.not_called() + rsr_obj.assert_not_called() def test_get_reflectance_no_lut(self, fake_lut_hdf5): """Test that missing a LUT causes an exception..""" From a546b34c6a203278392c30d536158556fb3135e7 Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Wed, 22 Nov 2023 16:02:09 +0100 Subject: [PATCH 3/3] Remove unneeded packages from ci environment --- continuous_integration/environment.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/continuous_integration/environment.yaml b/continuous_integration/environment.yaml index d5c0da01..78772240 100644 --- a/continuous_integration/environment.yaml +++ b/continuous_integration/environment.yaml @@ -17,8 +17,6 @@ dependencies: - behave - netcdf4 - h5py - - h5netcdf - - pyhdf - mock - pytest - pytest-cov