diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c992b1f..3358e5f 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 @@ -43,20 +43,24 @@ 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/ \ --trusted-host pypi.anaconda.org \ --no-deps --pre --upgrade \ numpy \ - pandas; \ + pandas \ + scipy; \ 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/rasterio/rasterio \ git+https://github.com/pydata/bottleneck \ - git+https://github.com/pydata/xarray; + git+https://github.com/zarr-developers/zarr \ + git+https://github.com/pydata/xarray@2024.01.0; + python -m pip install -e . --no-deps --no-build-isolation; - name: Install trollimage shell: bash -l {0} @@ -69,6 +73,7 @@ jobs: - name: Run unit tests shell: bash -l {0} run: | + python -c "import xarray.backends" pytest --cov=trollimage trollimage/tests --cov-report=xml --cov-report= - name: Upload unittest coverage to Codecov 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" 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: