From 0492af8dea3f9e32c7fb33a705da3bfd0ed15da4 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Sat, 9 Nov 2024 20:48:48 -0700 Subject: [PATCH 01/12] Increment GDAL and Python versions --- .github/workflows/test_gdal_latest.yml | 4 ++-- .github/workflows/tests.yml | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test_gdal_latest.yml b/.github/workflows/test_gdal_latest.yml index b742776f..86710e7f 100644 --- a/.github/workflows/test_gdal_latest.yml +++ b/.github/workflows/test_gdal_latest.yml @@ -21,13 +21,13 @@ jobs: test_gdal_latest: name: GDAL Latest runs-on: ubuntu-latest - container: osgeo/proj:9.1.0 + container: osgeo/proj:9.2.0 env: GDAL_DIR: ${{ github.workspace }}/gdal_install GDAL_DATA: ${{ github.workspace }}/gdal_install/share/gdal LD_LIBRARY_PATH: "${{ github.workspace }}/gdal_install/lib/:${LD_LIBRARY_PATH}" steps: - - uses: actions/checkout@v4.1.3 + - uses: actions/checkout@v4 - name: Update run: | apt-get update diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1d7f8eea..4ace46d2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,6 +39,8 @@ jobs: strategy: fail-fast: false matrix: + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] + gdal-version: ['3.9.3'] include: - python-version: '3.8' gdal-version: '3.4.3' @@ -49,10 +51,12 @@ jobs: - python-version: '3.11' gdal-version: '3.7.3' - python-version: '3.12' - gdal-version: '3.8.3' + gdal-version: '3.8.4' + - python-version: '3.12' + gdal-version: '3.9.3' steps: - - uses: actions/checkout@v4.1.3 + - uses: actions/checkout@v4 - name: Update run: | @@ -91,11 +95,11 @@ jobs: strategy: fail-fast: true matrix: + os: [macos-13, macos-14] + python-version: ['3.9', '3.10', '3.11', '3.12'] include: - - os: macos-13 - python-version: '3.12' - - os: macos-14 - python-version: '3.12' + - os: ubuntu-latest + python-version: '*' - os: windows-latest python-version: '3.12' steps: @@ -130,7 +134,7 @@ jobs: conda config --set channel_priority strict conda create -n test python=${{ matrix.python-version }} libgdal geos=3.12 cython=3 conda activate test - GDAL_VERSION="3.7" python setup.py build_ext -I"/c/Users/runneradmin/miniconda3/envs/test/Library/include" -lgdal -L"/c/Users/runneradmin/miniconda3/envs/test/Library/lib" install + GDAL_VERSION="3.9" python setup.py build_ext -I"/c/Users/runneradmin/miniconda3/envs/test/Library/include" -lgdal -L"/c/Users/runneradmin/miniconda3/envs/test/Library/lib" install python -m pip install -r requirements-dev.txt - name: Check and Log Environment From 70665f4b183ad2d1f5f304503a77c0e902ab051b Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Sat, 9 Nov 2024 21:02:53 -0700 Subject: [PATCH 02/12] Micromamba! --- .github/workflows/tests.yml | 57 ++++++++++++++----------------------- 1 file changed, 22 insertions(+), 35 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4ace46d2..e4ba914a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -105,55 +105,42 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Conda Setup - uses: conda-incubator/setup-miniconda@v3 + - name: Setup Conda + uses: mamba-org/setup-micromamba@v2 with: - miniforge-variant: Mambaforge - miniforge-version: latest - use-mamba: true - auto-update-conda: true - use-only-tar-bz2: false - python-version: ${{ matrix.python-version }} + init-shell: bash + environment-name: test + create-args: >- + python=${{ matrix.python-version }} + libgdal + geos=3.11 + cython=3 + numpy - - name: Install Env (OSX) - if: matrix.os == 'macos-13' || matrix.os == 'macos-14' + - name: Install Env shell: bash -l {0} run: | - conda config --prepend channels conda-forge - conda config --set channel_priority strict - conda create -n test python=${{ matrix.python-version }} libgdal geos=3.12 cython=3 - conda activate test - python -m pip install -e . || python -m pip install -e . - python -m pip install -r requirements-dev.txt + micromamba run -n test python -m pip install -e . --no-use-pep517 || micromamba run -n test python -m pip install -e . + micromamba run -n test python -m pip install -r requirements-dev.txt - - name: Install Env (Windows) - if: matrix.os == 'windows-latest' + - name: Check and Log Environment shell: bash -l {0} run: | - conda config --prepend channels conda-forge - conda config --set channel_priority strict - conda create -n test python=${{ matrix.python-version }} libgdal geos=3.12 cython=3 - conda activate test - GDAL_VERSION="3.9" python setup.py build_ext -I"/c/Users/runneradmin/miniconda3/envs/test/Library/include" -lgdal -L"/c/Users/runneradmin/miniconda3/envs/test/Library/lib" install - python -m pip install -r requirements-dev.txt + micromamba run -n test python -V + micromamba info - - name: Check and Log Environment + - name: Test with Coverage (Ubuntu) + if: matrix.os == 'ubuntu-latest' shell: bash -l {0} run: | - conda activate test - python -V - conda info - + micromamba run python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing - name: Test with Coverage (Windows) if: matrix.os == 'windows-latest' shell: bash -l {0} run: | - conda activate test - pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing - + micromamba run python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing - name: Test with Coverage (OSX) - if: matrix.os == 'macos-13' + if: "${{matrix.os}} == 'macos-13' || ${{matrix.os}} == 'macos-14'" shell: bash -l {0} run: | - conda activate test - python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing + micromamba run python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing From 536eba49282aec1a9d543591b3c93a0c47276a1e Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Sat, 9 Nov 2024 21:16:06 -0700 Subject: [PATCH 03/12] Come on setup-micromamba! --- .github/workflows/tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e4ba914a..bbdf54bc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -106,9 +106,11 @@ jobs: - uses: actions/checkout@v4 - name: Setup Conda - uses: mamba-org/setup-micromamba@v2 + uses: mamba-org/setup-micromamba@v2.0.0 with: - init-shell: bash + init-shell: >- + bash + powershell environment-name: test create-args: >- python=${{ matrix.python-version }} From 355218a51031f81031f66d2061e58a2a3afb6716 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Sat, 9 Nov 2024 21:19:51 -0700 Subject: [PATCH 04/12] setup-micromamba v1 --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bbdf54bc..b5043220 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -106,8 +106,9 @@ jobs: - uses: actions/checkout@v4 - name: Setup Conda - uses: mamba-org/setup-micromamba@v2.0.0 + uses: mamba-org/setup-micromamba@v1 with: + micromamba-version: '1.5.10-0' init-shell: >- bash powershell From 4921a16c51bff9925600af692ae595187f5bb1f9 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Sat, 9 Nov 2024 21:31:44 -0700 Subject: [PATCH 05/12] Special case for Windows --- .github/workflows/tests.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b5043220..a40d5672 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -121,11 +121,20 @@ jobs: numpy - name: Install Env + if: matrix.os != 'windows-latest' shell: bash -l {0} run: | micromamba run -n test python -m pip install -e . --no-use-pep517 || micromamba run -n test python -m pip install -e . micromamba run -n test python -m pip install -r requirements-dev.txt + - name: Install Env (Windows) + if: matrix.os == 'windows-latest' + shell: bash -l {0} + run: | + GDAL_VERSION="3.7" micromamba run -n test python setup.py build_ext -I"/c/Users/runneradmin/miniconda3/envs/test/Library/include" -lgdal -L"/c/Users/runneradmin/miniconda3/envs/test/Library/lib" install + micromamba run -n test python -m pip install -r requirements-dev.txt + + GDAL_VERSION="3.7" python setup.py build_ext -I"/c/Users/runneradmin/miniconda3/envs/test/Library/include" -lgdal -L"/c/Users/runneradmin/miniconda3/envs/test/Library/lib" install - name: Check and Log Environment shell: bash -l {0} run: | @@ -136,14 +145,14 @@ jobs: if: matrix.os == 'ubuntu-latest' shell: bash -l {0} run: | - micromamba run python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing + micromamba run -n test python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing - name: Test with Coverage (Windows) if: matrix.os == 'windows-latest' shell: bash -l {0} run: | - micromamba run python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing + micromamba run -n test python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing - name: Test with Coverage (OSX) if: "${{matrix.os}} == 'macos-13' || ${{matrix.os}} == 'macos-14'" shell: bash -l {0} run: | - micromamba run python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing + micromamba run -n test python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing From bbd544d2887b18eb54464ab248492069cdeedadf Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Sat, 9 Nov 2024 21:46:37 -0700 Subject: [PATCH 06/12] Use mamba root prefix --- .github/workflows/tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a40d5672..4689c9a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.9', '3.10', '3.11', '3.12'] gdal-version: ['3.9.3'] include: - python-version: '3.8' @@ -131,10 +131,9 @@ jobs: if: matrix.os == 'windows-latest' shell: bash -l {0} run: | - GDAL_VERSION="3.7" micromamba run -n test python setup.py build_ext -I"/c/Users/runneradmin/miniconda3/envs/test/Library/include" -lgdal -L"/c/Users/runneradmin/miniconda3/envs/test/Library/lib" install + ls + GDAL_VERSION="3.7" micromamba run -n test python setup.py build_ext -I"$MAMBA_ROOT_PREFIX/envs/test/Library/include" -lgdal -L"$MAMBA_ROOT_PREFIX/envs/test/Library/lib" install micromamba run -n test python -m pip install -r requirements-dev.txt - - GDAL_VERSION="3.7" python setup.py build_ext -I"/c/Users/runneradmin/miniconda3/envs/test/Library/include" -lgdal -L"/c/Users/runneradmin/miniconda3/envs/test/Library/lib" install - name: Check and Log Environment shell: bash -l {0} run: | From 4b6591eaeba6f2ad8b091739b19ed55320598634 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Sun, 10 Nov 2024 08:17:23 -0700 Subject: [PATCH 07/12] Delete fiona directory before running tests We won't have to do this when we move to src --- .github/workflows/tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4689c9a3..2b4b1b4d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -131,9 +131,10 @@ jobs: if: matrix.os == 'windows-latest' shell: bash -l {0} run: | - ls - GDAL_VERSION="3.7" micromamba run -n test python setup.py build_ext -I"$MAMBA_ROOT_PREFIX/envs/test/Library/include" -lgdal -L"$MAMBA_ROOT_PREFIX/envs/test/Library/lib" install + GDAL_VERSION="3.9" micromamba run -n test python setup.py build_ext -I"$MAMBA_ROOT_PREFIX/envs/test/Library/include" -lgdal -L"$MAMBA_ROOT_PREFIX/envs/test/Library/lib" install micromamba run -n test python -m pip install -r requirements-dev.txt + rm -rf fiona + - name: Check and Log Environment shell: bash -l {0} run: | From 34204aa55339b624e460aa8da992d0c9d2b7b81a Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Sun, 10 Nov 2024 08:32:00 -0700 Subject: [PATCH 08/12] Debugging --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2b4b1b4d..ae9951b3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -140,17 +140,20 @@ jobs: run: | micromamba run -n test python -V micromamba info + micromamba list -n test - name: Test with Coverage (Ubuntu) if: matrix.os == 'ubuntu-latest' shell: bash -l {0} run: | micromamba run -n test python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing + - name: Test with Coverage (Windows) if: matrix.os == 'windows-latest' shell: bash -l {0} run: | micromamba run -n test python -m pytest -v -m "not wheel" -rxXs --cov fiona --cov-report term-missing + - name: Test with Coverage (OSX) if: "${{matrix.os}} == 'macos-13' || ${{matrix.os}} == 'macos-14'" shell: bash -l {0} From e574ed08031e425a254b3c85f9d25b18f6baed0c Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Sun, 10 Nov 2024 08:50:06 -0700 Subject: [PATCH 09/12] Try to solve VSIRemovePluginHandler missing symbol --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ae9951b3..0b7fe0ee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -115,7 +115,7 @@ jobs: environment-name: test create-args: >- python=${{ matrix.python-version }} - libgdal + libgdal=3.9 geos=3.11 cython=3 numpy @@ -131,7 +131,7 @@ jobs: if: matrix.os == 'windows-latest' shell: bash -l {0} run: | - GDAL_VERSION="3.9" micromamba run -n test python setup.py build_ext -I"$MAMBA_ROOT_PREFIX/envs/test/Library/include" -lgdal -L"$MAMBA_ROOT_PREFIX/envs/test/Library/lib" install + GDAL_VERSION="3.9.3" micromamba run -n test python setup.py build_ext -I"$MAMBA_ROOT_PREFIX/envs/test/Library/include" -lgdal -L"$MAMBA_ROOT_PREFIX/envs/test/Library/lib" install micromamba run -n test python -m pip install -r requirements-dev.txt rm -rf fiona From 8592d1e279c2d1ef399e264758f559897294e8da Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Sun, 10 Nov 2024 08:59:07 -0700 Subject: [PATCH 10/12] Bump geos verion --- .github/workflows/tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0b7fe0ee..2ad82e77 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -116,7 +116,7 @@ jobs: create-args: >- python=${{ matrix.python-version }} libgdal=3.9 - geos=3.11 + geos>=3.12 cython=3 numpy @@ -140,7 +140,6 @@ jobs: run: | micromamba run -n test python -V micromamba info - micromamba list -n test - name: Test with Coverage (Ubuntu) if: matrix.os == 'ubuntu-latest' From 2d7b5e17ded52bc77fea2934e67306eaa68db8ab Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Sun, 10 Nov 2024 09:10:44 -0700 Subject: [PATCH 11/12] Ignore a coverage warning --- pytest.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/pytest.ini b/pytest.ini index 522b93d8..05548342 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,6 +1,7 @@ [pytest] filterwarnings = error + ignore:.*Plugin file tracers (Cython.Coverage.Plugin) aren't supported with PyTracer ignore:.*Sequential read of iterator was interrupted*:RuntimeWarning ignore:.*negative slices or start values other than zero may be slow*:RuntimeWarning ignore:.*negative step size may be slow*:RuntimeWarning From ac00ce70bb33f4ad6cfeb9f857abcecfbf7716a5 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Sun, 10 Nov 2024 09:19:33 -0700 Subject: [PATCH 12/12] Try a best filter expression --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 05548342..373fc095 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,7 +1,7 @@ [pytest] filterwarnings = error - ignore:.*Plugin file tracers (Cython.Coverage.Plugin) aren't supported with PyTracer + ignore:.*Plugin file tracers.* ignore:.*Sequential read of iterator was interrupted*:RuntimeWarning ignore:.*negative slices or start values other than zero may be slow*:RuntimeWarning ignore:.*negative step size may be slow*:RuntimeWarning