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
29 changes: 2 additions & 27 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip"
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-name: "blend-modes"
- dependency-name: "click"
- dependency-name: "croniter"
- dependency-name: "lxml"
- dependency-name: "mapchete[complete]"
- dependency-name: "opencv-python-headless"
- dependency-name: "Pillow"
- dependency-name: "pydantic"
- dependency-name: "pygeofilter"
- dependency-name: "pystac[urllib3]"
- dependency-name: "pystac-client"
- dependency-name: "pytest"
- dependency-name: "pytest-coverage"
- dependency-name: "pytest-lazy-fixtures"
- dependency-name: "retry"
- dependency-name: "rtree"
- dependency-name: "scipy"
- dependency-name: "tqdm"
- dependency-name: "xarray"
interval: "daily"
64 changes: 64 additions & 0 deletions .github/workflows/sync-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: sync-dependencies

on:
schedule:
- cron: '0 0 * * *'
pull_request:
paths:
- "pyproject.toml"
workflow_dispatch:

jobs:
sync-dependencies:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref || github.ref }}

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Sync and Upgrade
run: |
# The "Nuclear" fix: if the lockfile is corrupted (tomli error), nuke and rebuild
uv lock || (rm uv.lock && uv lock)
uv lock --upgrade

- name: Sync Conda Recipe
run: |
uvx pyproject2conda yaml \
-f pyproject.toml \
--output conda/meta.yaml \
--python-include infer

- name: Push to Existing PR
if: github.event_name == 'pull_request'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add uv.lock conda/meta.yaml
git commit -m "chore: sync uv.lock and conda recipe for PR" || echo "No changes to commit"
git push origin HEAD:${{ github.event.pull_request.head.ref }}

- name: Create New Pull Request
if: github.event_name != 'pull_request'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: update uv.lock and conda recipe"
title: "chore(deps): sync uv and conda dependencies"
body: "Automated daily sync of `uv.lock` and `conda/meta.yaml`."
branch: "automated-dependency-sync"
delete-branch: true
assignees: Scartography
reviewers: ungarj
labels: |
dependencies
automated-pr
28 changes: 28 additions & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# This file is autogenerated by pyproject2conda
# with the following command:
#
# $ pyproject2conda yaml -f pyproject.toml --output conda/meta.yaml --python-include infer
#
# You should not manually edit this file.
# Instead edit the corresponding pyproject.toml file.
#
channels:
- conda-forge
dependencies:
- python>=3.10
- Pillow
- click
- croniter
- lxml
- mapchete>=2025.10.0
- opencv-python-headless
- pydantic
- pygeofilter
- pystac-client>=0.7.5
- pystac>=1.12.2
- retry
- rtree
- scipy
- tqdm
- xarray
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build-backend = "hatchling.build"
[project]
name = "mapchete-eo"
dynamic = ["version"]
requires-python = ">=3.10"
description = "mapchete EO data reader"
readme = "README.rst"
license = "MIT"
Expand Down Expand Up @@ -87,4 +88,9 @@ testpaths = ["tests"]
markers = [
"remote: marks tests which require acces to remote resources (deselect with '-m \"not remote\"')",
"use_cdse_test_env: enables CDSE S3 environment access",
]
]

[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" }
Loading
Loading