From 7aeb842937a8eb94d38746b7ba07be56aa2112bd Mon Sep 17 00:00:00 2001 From: David Hoese Date: Fri, 12 Apr 2024 10:24:13 -0500 Subject: [PATCH 01/14] Build against numpy 2.0rc1 --- .github/workflows/deploy.yaml | 3 --- pyproject.toml | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 812048e..4c3813c 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -64,9 +64,6 @@ jobs: CIBW_SKIP: "cp36-* cp37-* cp38-* pp* *-manylinux_i686 *-musllinux_i686 *-musllinux_aarch64 *-win32" CIBW_ARCHS: "${{ matrix.cibw_archs }}" CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64" - # below only for building against unstable numpy - CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation" - CIBW_BEFORE_BUILD: "pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython setuptools versioneer" - uses: actions/upload-artifact@v4 with: diff --git a/pyproject.toml b/pyproject.toml index 988581c..9012fc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,7 @@ [build-system] requires = [ "wheel", - 'numpy; python_full_version<"3.12.0rc1"', - 'numpy>=1.26.0rc1; python_full_version>="3.12.0rc1"', + "numpy>=2.0.0rc1,<2.3", "setuptools>=42", "versioneer", "Cython>=3.0.0" From 7f06049bb16f21c1f113d18bce929a0980172884 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Fri, 12 Apr 2024 11:01:55 -0500 Subject: [PATCH 02/14] Update unstable CI to use no build isolation --- .github/workflows/ci.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c992b1f..ba786cf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ jobs: python-version: ["3.9", "3.11", "3.12"] experimental: [false] include: - - python-version: "3.11" + - python-version: "3.12" os: "ubuntu-latest" experimental: true @@ -50,13 +50,14 @@ jobs: numpy \ pandas; \ python -m pip install \ - --no-deps --upgrade \ + --no-deps --upgrade --pre --no-build-isolation \ git+https://github.com/dask/dask \ git+https://github.com/dask/distributed \ git+https://github.com/Unidata/cftime \ git+https://github.com/mapbox/rasterio \ git+https://github.com/pydata/bottleneck \ git+https://github.com/pydata/xarray; + python -m pip install -e . --no-deps --no-build-isolation; - name: Install trollimage shell: bash -l {0} From 6a4e24b58a8d94620116eed3acbc755d9ae30163 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Fri, 12 Apr 2024 11:06:12 -0500 Subject: [PATCH 03/14] Add versioneer to no build isolation unstable CI environ --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ba786cf..fbb96da 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -43,6 +43,7 @@ jobs: if: matrix.experimental == true shell: bash -l {0} run: | + python -m pip install versioneer; \ python -m pip install \ -f https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ \ --trusted-host pypi.anaconda.org \ From 2538e57aa785051cbf476dd30e3313036768b9b3 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Fri, 12 Apr 2024 11:14:52 -0500 Subject: [PATCH 04/14] Fix missing noexcept declaration on color convert func --- trollimage/_colorspaces.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trollimage/_colorspaces.pyx b/trollimage/_colorspaces.pyx index 4f668f0..333e42e 100644 --- a/trollimage/_colorspaces.pyx +++ b/trollimage/_colorspaces.pyx @@ -18,7 +18,7 @@ np.import_array() # bint npy_isnan(np.float32_t x) nogil # Function pointer type to allow for generic high-level functions -ctypedef void (*CONVERT_FUNC)(floating[:] comp1, floating[:] comp2, floating[:] comp3, floating[:, ::1] out) nogil +ctypedef void (*CONVERT_FUNC)(floating[:] comp1, floating[:] comp2, floating[:] comp3, floating[:, ::1] out) noexcept nogil cdef: From 9f97397825ee4b0a0460b29281af374c35f2298e Mon Sep 17 00:00:00 2001 From: David Hoese Date: Fri, 12 Apr 2024 11:25:36 -0500 Subject: [PATCH 05/14] Add zarr to unstable deps hoping it fixes xarray import error --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fbb96da..3b8630c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -57,6 +57,7 @@ jobs: git+https://github.com/Unidata/cftime \ git+https://github.com/mapbox/rasterio \ git+https://github.com/pydata/bottleneck \ + git+https://github.com/zarr-developers/zarr \ git+https://github.com/pydata/xarray; python -m pip install -e . --no-deps --no-build-isolation; From 664af360e2e1a6a14539d92cb520c80bae6a8a83 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Fri, 12 Apr 2024 11:37:29 -0500 Subject: [PATCH 06/14] Add scipy unstable CI dep --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3b8630c..eca13a2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -49,7 +49,8 @@ jobs: --trusted-host pypi.anaconda.org \ --no-deps --pre --upgrade \ numpy \ - pandas; \ + pandas \ + scipy; \ python -m pip install \ --no-deps --upgrade --pre --no-build-isolation \ git+https://github.com/dask/dask \ From 95d030b90de4b01207d50f660d67458bb5e0e163 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Fri, 12 Apr 2024 17:43:05 -0500 Subject: [PATCH 07/14] Debub failing xarray import in unstable CI --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index eca13a2..f529906 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -73,6 +73,7 @@ jobs: - name: Run unit tests shell: bash -l {0} run: | + python -c "from xarray.backends.api import open_dataset" pytest --cov=trollimage trollimage/tests --cov-report=xml --cov-report= - name: Upload unittest coverage to Codecov From f2f71675dd2ad2bf3f737323382d0b9dd0b174df Mon Sep 17 00:00:00 2001 From: David Hoese Date: Fri, 12 Apr 2024 20:59:41 -0500 Subject: [PATCH 08/14] Add more dependencies to unstable CI Try to make xarray happy --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f529906..1f8696e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -58,6 +58,8 @@ jobs: git+https://github.com/Unidata/cftime \ git+https://github.com/mapbox/rasterio \ git+https://github.com/pydata/bottleneck \ + git+https://github.com/h5py/h5py \ + git+https://github.com/h5netcdf/h5netcdf \ git+https://github.com/zarr-developers/zarr \ git+https://github.com/pydata/xarray; python -m pip install -e . --no-deps --no-build-isolation; @@ -73,7 +75,6 @@ jobs: - name: Run unit tests shell: bash -l {0} run: | - python -c "from xarray.backends.api import open_dataset" pytest --cov=trollimage trollimage/tests --cov-report=xml --cov-report= - name: Upload unittest coverage to Codecov From fcd12f05727c6255cb158bd94314aec3f911774d Mon Sep 17 00:00:00 2001 From: David Hoese Date: Fri, 12 Apr 2024 21:08:23 -0500 Subject: [PATCH 09/14] Add missing pkgconfig dependency to unstable CI --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1f8696e..7a38bc6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -43,7 +43,7 @@ jobs: if: matrix.experimental == true shell: bash -l {0} run: | - python -m pip install versioneer; \ + python -m pip install versioneer pkgconfig; \ python -m pip install \ -f https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ \ --trusted-host pypi.anaconda.org \ From c6e95ff75cf2f739680b918a49a4b266ee600acf Mon Sep 17 00:00:00 2001 From: David Hoese Date: Sat, 13 Apr 2024 10:44:51 -0500 Subject: [PATCH 10/14] Debug with more imports --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7a38bc6..4d3feea 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -75,6 +75,10 @@ jobs: - name: Run unit tests shell: bash -l {0} run: | + python -c "import cftime" + python -c "from netCDF4 import Dataset" + python -c "import h5py" + python -c "import h5netcdf" pytest --cov=trollimage trollimage/tests --cov-report=xml --cov-report= - name: Upload unittest coverage to Codecov From 887fe1364126bba73473a134673b7c5f0eaf6945 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Sat, 13 Apr 2024 10:48:36 -0500 Subject: [PATCH 11/14] Remove cftime in unstable CI --- .github/workflows/ci.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4d3feea..eb7dd33 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,7 +55,6 @@ jobs: --no-deps --upgrade --pre --no-build-isolation \ git+https://github.com/dask/dask \ git+https://github.com/dask/distributed \ - git+https://github.com/Unidata/cftime \ git+https://github.com/mapbox/rasterio \ git+https://github.com/pydata/bottleneck \ git+https://github.com/h5py/h5py \ @@ -75,7 +74,6 @@ jobs: - name: Run unit tests shell: bash -l {0} run: | - python -c "import cftime" python -c "from netCDF4 import Dataset" python -c "import h5py" python -c "import h5netcdf" From 2a116f9643f12581a829051c5fc0d6dc99fa1d07 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Sat, 13 Apr 2024 10:53:05 -0500 Subject: [PATCH 12/14] Remove unused unstable dependencies --- .github/workflows/ci.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index eb7dd33..bad40ef 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -43,6 +43,7 @@ jobs: if: matrix.experimental == true shell: bash -l {0} run: | + python -c "import xarray.backends"; \ python -m pip install versioneer pkgconfig; \ python -m pip install \ -f https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ \ @@ -57,8 +58,6 @@ jobs: git+https://github.com/dask/distributed \ git+https://github.com/mapbox/rasterio \ git+https://github.com/pydata/bottleneck \ - git+https://github.com/h5py/h5py \ - git+https://github.com/h5netcdf/h5netcdf \ git+https://github.com/zarr-developers/zarr \ git+https://github.com/pydata/xarray; python -m pip install -e . --no-deps --no-build-isolation; @@ -74,9 +73,7 @@ jobs: - name: Run unit tests shell: bash -l {0} run: | - python -c "from netCDF4 import Dataset" - python -c "import h5py" - python -c "import h5netcdf" + python -c "import xarray.backends" pytest --cov=trollimage trollimage/tests --cov-report=xml --cov-report= - name: Upload unittest coverage to Codecov From b36fe217d39e81cc9799445e6b72bce11c36a9e4 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Sun, 14 Apr 2024 10:30:21 -0500 Subject: [PATCH 13/14] Use old version of xarray in unstable CI for debugging --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bad40ef..3486e42 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -56,10 +56,10 @@ jobs: --no-deps --upgrade --pre --no-build-isolation \ git+https://github.com/dask/dask \ git+https://github.com/dask/distributed \ - git+https://github.com/mapbox/rasterio \ + git+https://github.com/rasterio/rasterio \ git+https://github.com/pydata/bottleneck \ git+https://github.com/zarr-developers/zarr \ - git+https://github.com/pydata/xarray; + git+https://github.com/pydata/xarray@013a4268124919fcc1f22118685ddc2a179ea24f; python -m pip install -e . --no-deps --no-build-isolation; - name: Install trollimage From 44c302632848358b7365a15fd18797cd9ef8752e Mon Sep 17 00:00:00 2001 From: David Hoese Date: Sun, 14 Apr 2024 10:36:13 -0500 Subject: [PATCH 14/14] Use old version of xarray in unstable CI for debugging --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3486e42..3358e5f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -59,7 +59,7 @@ jobs: git+https://github.com/rasterio/rasterio \ git+https://github.com/pydata/bottleneck \ git+https://github.com/zarr-developers/zarr \ - git+https://github.com/pydata/xarray@013a4268124919fcc1f22118685ddc2a179ea24f; + git+https://github.com/pydata/xarray@2024.01.0; python -m pip install -e . --no-deps --no-build-isolation; - name: Install trollimage