From 518ed5a097e07dca3424ee91df9b681cf6b03329 Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Mon, 29 Jun 2026 07:19:45 +0000 Subject: [PATCH 1/3] ci: fix gdal_array missing by disabling build isolation GDAL 3.8.4 was using pip's isolated build environment, which installed an older, incompatible version of NumPy during the wheel compilation. By explicitly installing numpy in the main environment and using --no-build-isolation, we force GDAL to compile against the exact same NumPy version used at runtime. Assisted-by: gemini-3.1-pro-low --- .github/workflows/gh-pages.yml | 5 ++++- .github/workflows/python-test.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 43b2ca5..c011d15 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -31,8 +31,11 @@ jobs: run: | sudo apt-get update sudo apt-get -qq install exiftool libgdal-dev libzbar0t64 + - name: Install gdal python bindings + run: | GDAL_VERSION=$(gdal-config --version) - pip install --no-cache-dir "gdal==$GDAL_VERSION" + pip install setuptools wheel numpy + pip install --no-cache-dir --no-build-isolation "gdal==$GDAL_VERSION" - name: Install dependencies run: pip install -e .[docs] - name: Build GitHub Pages site diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 4e5f59c..5a27301 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -37,8 +37,11 @@ jobs: run: | sudo apt-get update sudo apt-get -qq install exiftool libgdal-dev libzbar0t64 + - name: Install gdal python bindings + run: | GDAL_VERSION=$(gdal-config --version) - pip install --no-cache-dir "gdal==$GDAL_VERSION" + pip install setuptools wheel numpy + pip install --no-cache-dir --no-build-isolation "gdal==$GDAL_VERSION" - name: Install package and test dependencies run: pip install -e ".[test]" - name: Test with pytest From cf2310fefea46c3e2c2b929b8689bafd155efaa3 Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Mon, 29 Jun 2026 07:23:14 +0000 Subject: [PATCH 2/3] test: enable newgdal tests in CI to cover save_capture_as_stack These tests were previously skipped by default in pytest addopts. Since the CI environment has a modern GDAL version, these tests can now be run to ensure coverage of stack export functionality. Assisted-by: gemini-3.1-pro-low --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2ae6db3..686e960 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,8 +68,6 @@ markers = [ "newgdal: tests that require newer GDAL stack behavior", ] addopts = [ - "-m", - "not newgdal", "--cov=micasense", "--cov-report=xml", "--cov-report=term-missing", From 5c3773d120ddf4f7ce910387e3afec460414ed5b Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Mon, 29 Jun 2026 17:01:49 +0200 Subject: [PATCH 3/3] ci: reduce tested versions, set minimum python version to 3.10 enable strict shell mode for GDAL_VERSION --- .github/workflows/gh-pages.yml | 4 ++-- .github/workflows/publish.yml | 2 +- .github/workflows/python-test.yml | 6 +++--- pyproject.toml | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index c011d15..d13bd90 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -34,8 +34,8 @@ jobs: - name: Install gdal python bindings run: | GDAL_VERSION=$(gdal-config --version) - pip install setuptools wheel numpy - pip install --no-cache-dir --no-build-isolation "gdal==$GDAL_VERSION" + pip install -U setuptools wheel numpy + pip install --no-cache-dir --no-build-isolation "gdal==${GDAL_VERSION}" - name: Install dependencies run: pip install -e .[docs] - name: Build GitHub Pages site diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 626a61d..e27036a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -31,7 +31,7 @@ jobs: sudo apt-get update sudo apt-get -qq install exiftool libgdal-dev libzbar0t64 GDAL_VERSION=$(gdal-config --version) - pip install "gdal==$GDAL_VERSION" + pip install "gdal==${GDAL_VERSION}" - name: Install package and test dependencies run: pip install -e ".[test]" - name: Test with pytest diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 5a27301..151f3f1 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.12", "3.14"] steps: - uses: actions/checkout@v7 with: @@ -40,8 +40,8 @@ jobs: - name: Install gdal python bindings run: | GDAL_VERSION=$(gdal-config --version) - pip install setuptools wheel numpy - pip install --no-cache-dir --no-build-isolation "gdal==$GDAL_VERSION" + pip install -U setuptools wheel numpy + pip install --no-cache-dir --no-build-isolation "gdal==${GDAL_VERSION}" - name: Install package and test dependencies run: pip install -e ".[test]" - name: Test with pytest diff --git a/pyproject.toml b/pyproject.toml index 686e960..1608d7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ authors = [ ] license = "MIT" readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ "requests", "numpy", @@ -35,7 +35,6 @@ classifiers=[ "Topic :: Scientific/Engineering :: Image Processing", "Topic :: Software Development :: Libraries :: Python Modules", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12",