From 036503de2dfeb99d877de18369def88fa0e82ff7 Mon Sep 17 00:00:00 2001 From: elisalle Date: Tue, 23 Jul 2024 16:05:11 +0200 Subject: [PATCH] add nominal numpy 2 support --- .github/workflows/test.yml | 10 +++++++++- pyproject.toml | 2 +- requirements-dev.txt | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ab7418e..80287c63 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,6 +27,12 @@ jobs: # 2023 - python: "3.11" pins: "sqlalchemy==2.0.24 alembic==1.13.1 geoalchemy2==0.14.3 rasterio==1.3.9" + # NumPy 1 + - python: "3.11" + pins: "sqlalchemy==2.0.24 alembic==1.13.1 geoalchemy2==0.14.3 rasterio==1.3.9 numpy==1.26.4" + # NumPy 2 + - python: "3.11" + pins: "sqlalchemy==2.0.24 alembic==1.13.1 geoalchemy2==0.14.3 rasterio==1.3.9 numpy==2.0.1" # current - python: "3.12" #pins: "sqlalchemy==2.0.* alembic==1.13.* geoalchemy2==0.14.* rasterio==1.3.9.*" @@ -50,7 +56,9 @@ jobs: shell: bash run: | pip install --disable-pip-version-check --upgrade pip setuptools wheel - pip install ${{ matrix.pins }} .[test,rasterio] pygdal==$(gdal-config --version).* + pip install ${{ matrix.pins }} + pip install .[test,rasterio] + pip install GDAL==$(gdal-config --version) --no-build-isolation # install gdal AFTER numpy pip list - name: Run tests diff --git a/pyproject.toml b/pyproject.toml index fad1d221..b8d665f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ test = [ "pytest", "pytest-asyncio", "pytest-cov", - "numpy>=1.15,<2.0", + "numpy>=1.15,<3.0", ] [project.scripts] diff --git a/requirements-dev.txt b/requirements-dev.txt index d2e50a43..89a1e718 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,4 +6,4 @@ threedi-api-client aiofiles aiohttp pytest-asyncio -numpy>=1.15,<2.0 +numpy>=1.15,<3.0