Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install System Dependencies (GDAL)
run: |
sudo apt-get update
sudo apt-get install -y libgdal-dev g++

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
run: uv python install
Expand All @@ -48,7 +49,7 @@ jobs:
uv run sphinx-build -b html docs/source docs/build/html

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v4
with:
path: ./docs/build/html

Expand All @@ -62,4 +63,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
94 changes: 37 additions & 57 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,49 +24,22 @@ jobs:
name: "📝 Pre-commit / Code Quality"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ⚡ Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- uses: actions/checkout@v6
- name: ⚡ Setup uv
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
github-token: ${{ secrets.GITHUB_TOKEN }}
cache-suffix: ${{ github.job }}
- name: 🏃 Run Pre-commit
run: |
uv tool install pre-commit
uv tool run pre-commit run --show-diff-on-failure --all-files

setup:
name: "🏗️ Build Py${{ matrix.python-version }}"
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
container: ghcr.io/osgeo/gdal:ubuntu-small-latest
steps:
- uses: actions/checkout@v4

- name: 📥 Apply Dependency Overrides
if: "${{ inputs.override-deps-artifact != '' && inputs.override-deps-artifact != 'null' }}"
uses: actions/download-artifact@v4
with:
name: ${{ inputs.override-deps-artifact }}

- name: ⚡ Install uv
run: |
apt-get update && apt-get install -y curl
curl -LsSf https://astral.sh/uv/install.sh | BINDIR=/usr/local/bin sh

- name: 📝 Export Locked Requirements
run: |
uv export --frozen --all-extras --format requirements-txt > requirements.txt

- name: 📤 Upload Requirements
uses: actions/upload-artifact@v4
with:
name: frozen-reqs-${{ matrix.python-version }}
path: requirements.txt
retention-days: 1
- name: 🧹 Cache Prune
run: uv cache prune --ci

test:
needs: setup
needs: lint
name: "🧪 py${{ matrix.python-version }} [${{ matrix.split }}/4]"
runs-on: ubuntu-latest
strategy:
Expand All @@ -84,24 +57,24 @@ jobs:
# Fix "Dubious Ownership" error (Required for containerized Git)
git config --global --add safe.directory '*'

- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: 📥 Download Requirements
uses: actions/download-artifact@v4
- name: 📥 Apply Dependency Overrides
if: "${{ inputs.override-deps-artifact != '' && inputs.override-deps-artifact != 'null' }}"
uses: actions/download-artifact@v8
with:
name: frozen-reqs-${{ matrix.python-version }}
name: ${{ inputs.override-deps-artifact }}

- name: ⚡ Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="/usr/local/bin" sh

uv --version
- name: ⚡ Setup uv
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
github-token: ${{ secrets.GITHUB_TOKEN }}
cache-suffix: ${{ matrix.python-version }}-${{ matrix.split }}

- name: 🏗️ Restore Native Env
- name: 🏗️ Sync Environment
run: |
uv venv --python ${{ matrix.python-version }}
uv pip install -r requirements.txt
uv pip install -e ".[test]" --no-deps
uv sync --frozen --all-extras --python ${{ matrix.python-version }}

- name: 🧪 Run Tests (Split ${{ matrix.split }}/4)
env:
Expand Down Expand Up @@ -131,7 +104,7 @@ jobs:

- name: 📤 Upload Coverage Chunk (Latest Only)
if: matrix.python-version == '3.13'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: coverage-chunk-${{ matrix.split }}
path: .coverage.python.${{ matrix.python-version }}.test.split.${{ matrix.split }}
Expand All @@ -140,25 +113,32 @@ jobs:

- name: 📤 Archive JUnit Results
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: results-${{ matrix.python-version }}-${{ matrix.split }}
path: pytest-${{ matrix.python-version }}-${{ matrix.split }}.xml
retention-days: 1

- name: 🧹 Cache Prune
run: uv cache prune --ci

summary:
name: "📊 Final Summary & Coverage"
needs: test
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # Needed for coverage to see source files
- uses: actions/checkout@v6 # Needed for coverage to see source files

- name: ⚡ Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: ⚡ Setup uv
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
github-token: ${{ secrets.GITHUB_TOKEN }}
cache-suffix: ${{ github.job }}

- name: 📥 Download Artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: all-results
pattern: "*-*"
Expand Down Expand Up @@ -226,4 +206,4 @@ jobs:
else
echo "✅ **Coverage Passed:** 80% coverage achieved (Py3.13)." >> $GITHUB_STEP_SUMMARY
exit 0
fi
fi
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/sync-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,28 @@ jobs:
outputs:
sync_needed: ${{ steps.check.outputs.changed }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}

- name: ⚡ Setup uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
github-token: ${{ secrets.GITHUB_TOKEN }}


- name: 🛠️ Upgrade & Sync
run: |
# Robust repair: if the lockfile is out of sync/corrupted, fix it, then upgrade everything
uv lock || (rm uv.lock && uv lock)
# Upgrade lockfile
uv lock --upgrade

# Sync the conda recipe
uvx pyproject2conda yaml -f pyproject.toml --output conda/meta.yaml --python-include infer
uvx pyproject2conda yaml --pyproject pyproject.toml --output conda/meta.yaml --python-include infer

- name: 🧹 Cache Prune
run: uv cache prune --ci

- name: 📋 Check for Changes
id: check
Expand Down Expand Up @@ -84,7 +90,7 @@ jobs:

- name: 📤 Upload Updated Deps
if: steps.check.outputs.changed == 'true'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: updated-deps
retention-days: 1
Expand All @@ -111,14 +117,14 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
token: ${{ secrets.MAPCHETE_PAT_CONTAINER_IMAGES_TOKEN }}

- name: 📥 Download Verified Artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: updated-deps

Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ Changelog
#########


Unreleased
----------

* CI/CD

* modernize workflows for `uv 0.5+`
* upgrade all GitHub Actions to May 2026 versions (utilizing Node.js 24)
* standardized on `astral-sh/setup-uv@v8.1.0` (immutable release)
* fix GitHub API rate limit issues by providing `GITHUB_TOKEN` to `setup-uv`
* fix CI cache reservation collisions in parallel test matrix using `cache-suffix`
* use `uv sync --frozen` for test environment management
* enable `uv` caching and add `uv cache prune --ci` steps


2026.3.0 - 2026-03-06
---------------------

Expand Down
6 changes: 3 additions & 3 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pyproject2conda
# with the following command:
#
# $ pyproject2conda yaml -f pyproject.toml --output conda/meta.yaml --python-include infer
# $ pyproject2conda yaml --pyproject pyproject.toml --output conda/meta.yaml --python-include infer
#
# You should not manually edit this file.
# Instead edit the corresponding pyproject.toml file.
Expand All @@ -11,12 +11,12 @@ channels:
- conda-forge
dependencies:
- python>=3.10
- Pillow
- click
- croniter
- lxml
- mapchete>=2025.10.0
- opencv-python-headless
- opencv
- pillow
- pydantic
- pygeofilter
- pystac-client>=0.7.5
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,6 @@ markers = [

[tool.pyproject2conda]
channels = ["conda-forge"]
# Maps PyPI names to Conda-Forge names if they differ
map_deps = { "opencv-python-headless" = "opencv", "pystac-client" = "python-pystac-client" }

[tool.pyproject2conda.dependencies]
opencv-python-headless = { skip = true, packages = "opencv" }
Loading
Loading