Skip to content

Enhance GDAL runtime installation and CI/CD workflows - #21

Merged
jimbrig merged 6 commits into
mainfrom
develop
Jul 3, 2026
Merged

jimbrig merged 6 commits into
mainfrom
develop

Conversation

@jimbrig

@jimbrig jimbrig commented Jul 3, 2026

Copy link
Copy Markdown
Owner

No description provided.

jimbrig and others added 2 commits July 3, 2026 14:56
install_gdal_runtime(tag = "latest") previously trusted GitHub's single
/releases/latest pointer, which broke the default install path whenever
an R package release (v*, no bundle zip) was marked as the repo's latest
release. "latest" now lists releases and selects the newest non-draft,
non-prerelease release carrying an asset that matches asset_pattern, so
the package release track and the GDAL bundle release track stay fully
decoupled. Package releases may also attach the paired bundle zip (as
v0.3.0 does) and are then picked up directly.

Adds unit tests for the selection logic, documents the new "latest"
semantics on install_gdal_runtime(), and bumps to dev version
0.3.0.9000 with a NEWS entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ow (#20)

build.yml gains a schedule-only job that compares the latest OSGeo/gdal release against our newest published gdal-v* bundle and opens a labeled tracking issue when a newer GDAL exists - it never builds or publishes on its own. New e2e.yml proves the full documented user workflow on a clean windows-latest runner (install runtime, source-build gdalraster against it, verify the algorithm registry, and verify the .Rprofile startup hook in a fresh session), consuming only exported package functions per the AGENTS.md responsibility split, which is updated accordingly.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimbrig
jimbrig requested a review from Copilot July 3, 2026 19:12
@jimbrig jimbrig self-assigned this Jul 3, 2026
@jimbrig jimbrig added feature New feature or enhancement refactor Code change that neither fixes a bug nor adds a feature maintenance Maintenance related tasks cicd CI/CD related tasks labels Jul 3, 2026
…constants.R

Single source of truth for the bundle repo, gdalraster source repo, bundle asset regex, and dll name pattern/fallback; function signatures now reference the constants and roxygen docs state the concrete defaults. Test fixtures for release selection use deliberately fake v9.x versions via fixture helpers so they cannot be mistaken for real release tags, and build.yml marks its duplicated version defaults with keep-in-sync comments.

Co-authored-by: Cursor <cursoragent@cursor.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request decouples the R package release track from the GDAL bundle release track by updating install_gdal_runtime(tag = "latest") to scan the release list and select the newest non-draft, non-prerelease release that publishes a matching runtime bundle asset, rather than relying on GitHub's "latest release" pointer. This is implemented via a new select_release_asset helper and corresponding unit tests. Feedback suggests adding support for GitHub authentication tokens to prevent API rate-limiting, and implementing defensive checks when extracting asset names to handle potential NULL values robustly.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread R/utils_pkg.R Resolved
Comment thread R/utils_pkg.R Resolved
Comment thread R/utils_pkg.R Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves how gdalraster.windows discovers and installs the “latest” GDAL runtime bundle from GitHub releases, and expands CI/CD to validate the full user workflow end-to-end while also adding an upstream GDAL release tracking check.

Changes:

  • Update “latest” runtime resolution to scan releases for the newest non-draft, non-prerelease bundle asset (rather than relying on GitHub’s single “latest release” pointer).
  • Add unit tests for the new release-asset selection behavior.
  • Add a Windows end-to-end workflow and a scheduled upstream GDAL release check that opens a tracking issue when a newer upstream release exists.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/testthat/test-gdal-runtime.R Adds tests covering release asset selection and error behavior.
R/utils_pkg.R Implements github_api_json() + select_release_asset() and updates “latest” release resolution logic.
R/gdal_runtime.R Clarifies install_gdal_runtime(tag = "latest") behavior in roxygen docs.
NEWS.md Documents the behavior change for “latest” runtime installation.
man/install_gdal_runtime.Rd Updates rendered docs to match the new “latest” selection behavior.
DESCRIPTION Bumps to development version 0.3.0.9000.
AGENTS.md Updates responsibility split documentation and references the new e2e workflow.
.github/workflows/e2e.yml Adds a clean-runner Windows workflow to verify runtime install + gdalraster source build + startup hook behavior.
.github/workflows/build.yml Adds a scheduled “upstream check only” job to open an issue when OSGeo/gdal publishes a newer release.
Files not reviewed (2)
  • man/install_gdal_runtime.Rd: Generated file
  • man/install_gdalraster.Rd: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md Resolved
jimbrig and others added 2 commits July 3, 2026 15:18
Follows the LandRise package layout (aaa.R for shared package resources) with dot-prefixed internal constants instead of accessor functions.

Co-authored-by: Cursor <cursoragent@cursor.com>
…review)

github_api_json() gains a pat argument defaulting to github_pat(), which resolves a token from the git credential store (gitcreds) then the GITHUB_PAT and GITHUB_TOKEN env vars, avoiding anonymous rate limits. Release-asset selection tolerates assets missing a name field in both the latest-scan and explicit-tag paths. Adds gitcreds to Imports, explicit @importFrom statements for httr2/gitcreds/rlang in the package doc, tests for the PAT fallback order and nameless assets, and fixes the AGENTS.md wording flagged by Copilot.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimbrig

jimbrig commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

All four review comments addressed in c661683: GitHub API requests now authenticate via a PAT resolved from the git credential store (gitcreds) then GITHUB_PAT/GITHUB_TOKEN env vars (gitcreds added to Imports, explicit @importFrom statements added for httr2/gitcreds/rlang); release-asset selection tolerates assets with a missing name field in both selection paths (with tests); and the AGENTS.md wording is fixed. Tests: 33 passing, plus a live verification that authenticated latest-resolution returns the v3.13.1 bundle asset.

Package doc keeps only the shared rlang %||% import; httr2, gitcreds, withr, and rlang try_fetch imports now live on their consuming functions. Synced via attachment::att_amend_desc().

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimbrig
jimbrig merged commit 13fd02d into main Jul 3, 2026
5 checks passed
@devactivity-app

Copy link
Copy Markdown

Pull Request Summary by devActivity

Metrics

Cycle Time: 46m Coding Time: 30m Pickup Time: 2m Review Time: 13m Comments: 1

Achievements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cicd CI/CD related tasks feature New feature or enhancement maintenance Maintenance related tasks refactor Code change that neither fixes a bug nor adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants