Skip to content

Commit

Permalink
Merge pull request #416 from davemfish/task/415-python-gdal-upgrades
Browse files Browse the repository at this point in the history
test and build against Python 3.13 and GDAL 3.9
  • Loading branch information
emlys authored Oct 29, 2024
2 parents 7d24459 + 53898d3 commit adbc80c
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-py-dists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.13

- name: Install dependencies
run: python -m pip install build
Expand Down
28 changes: 8 additions & 20 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
gdal: ["3.2.2", "3.3.0", "3.4.3", "3.5", "3.6", "3.7", "3.8"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
gdal: ["3.6", "3.7", "3.8", "3.9"]
os: [ubuntu-latest, windows-latest, macos-latest]
exclude:
- gdal: "3.2.2"
python-version: 3.10
- gdal: "3.2.2"
python-version: 3.11
- gdal: "3.2.2"
python-version: 3.12
- gdal: "3.3.0"
python-version: 3.10
- gdal: "3.3.0"
python-version: 3.11
- gdal: "3.3.0"
python-version: 3.12
- gdal: "3.4.3"
python-version: 3.11
- gdal: "3.4.3"
python-version: 3.12
- gdal: "3.5"
python-version: 3.12
- gdal: "3.6"
python-version: 3.13
- gdal: "3.7"
python-version: 3.13
- gdal: "3.8"
python-version: 3.13

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Release History

.. Unreleased Changes
* Dropped support for Python 3.8. Added support for Python 3.13 and GDAL 3.9.
https://github.com/natcap/pygeoprocessing/issues/415

2.4.6 (2024-10-15)
------------------
* Removing the ``numpy<2`` constraint for requirements.txt that should have
Expand Down
15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,18 @@ API Documentation
=================

API documentation is available at https://pygeoprocessing.readthedocs.io/en/latest/

Test Matrix Policy
==================

Python
------
We test against all currently supported (security & bugfix)
Python versions.
https://devguide.python.org/versions/

GDAL
----
We test against the latest GDAL release of each minor version starting
with the version included in Debian Stable.
https://packages.debian.org/stable/science/gdal-bin
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ classifiers = [
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering :: GIS',
'License :: OSI Approved :: BSD License'
Expand Down
8 changes: 6 additions & 2 deletions tests/test_geoprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4069,7 +4069,9 @@ def test_get_raster_info_error_handling(self):
not_a_raster_file.write("this is not a raster.\n")
with self.assertRaises(RuntimeError) as cm:
pygeoprocessing.get_raster_info(not_a_raster_path)
self.assertIn('not recognized as a supported file format', str(cm.exception))
self.assertRegex(
str(cm.exception),
r'not recognized as [a-z ]* supported file format')

def test_get_vector_info_error_handling(self):
"""PGP: test that bad data raise good errors in get_vector_info."""
Expand All @@ -4086,7 +4088,9 @@ def test_get_vector_info_error_handling(self):
not_a_vector_file.write("this is not a vector.\n")
with self.assertRaises(RuntimeError) as cm:
pygeoprocessing.get_vector_info(not_a_vector_path)
self.assertIn('not recognized as a supported file format', str(cm.exception))
self.assertRegex(
str(cm.exception),
r'not recognized as [a-z ]* supported file format')

def test_merge_bounding_box_list(self):
"""PGP: test merge_bounding_box_list."""
Expand Down

0 comments on commit adbc80c

Please sign in to comment.