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
47 changes: 30 additions & 17 deletions .github/actions/setup-r/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@ name: "Setup R + ggplot2"
description: >-
Installs R, the system libraries needed for headless plot rendering, and the
package set used by anyplot's R implementations (ggplot2 + tidyverse helpers
+ ragg device + dataset packages). Packages are restored from renv.lock at
the repository root so versions stay pinned.
+ ragg device + dataset packages). Packages are installed from a pinned
Posit Package Manager snapshot for reproducibility; transitive dependencies
are resolved by R's installer so the package set stays self-consistent.
inputs:
r-version:
description: "R version to install"
required: false
default: "4.4.1"
working-directory:
description: "Directory containing renv.lock (defaults to the repo root)"
required: false
default: "."

runs:
using: "composite"
Expand Down Expand Up @@ -45,17 +42,33 @@ runs:
libharfbuzz-dev \
libfribidi-dev

- name: Install R packages from renv.lock
uses: r-lib/actions/setup-renv@v2
with:
working-directory: ${{ inputs.working-directory }}
env:
# renv refuses to restore when per-package `Hash` fields are missing.
# The lockfile here is hand-written and intentionally omits hashes —
# reproducibility comes from the pinned Posit RSPM snapshot URL in
# renv.lock instead. Once a successful CI run populates hashes via
# renv::snapshot(), this flag can be dropped.
RENV_CONFIG_INSTALL_HASHES: "FALSE"
- name: Install R packages
# install.packages auto-resolves transitive dependencies that a hand-written
# renv.lock used to miss (munsell, gtable, colorspace, R6, RColorBrewer, ...).
# Pinning to a dated Posit Package Manager snapshot keeps versions
# reproducible without needing a fully-populated lockfile. The `noble` URL
# matches the current ubuntu-latest runner image — update if GitHub moves
# the runner OS, and bump the snapshot date deliberately.
#
# dependencies is restricted to required types (Depends/Imports/LinkingTo);
# the default `NA` is identical but explicit is clearer. `TRUE` would also
# pull in Suggests (sf, Hmisc, maps, quantreg, ...) — none of which the
# implementations need, and several of which require apt packages we
# don't install.
shell: bash
run: |
Rscript -e '
options(
repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/noble/2025-01-15"),
Ncpus = parallel::detectCores()
)
install.packages(
c("ggplot2", "ragg", "tidyr", "dplyr", "viridis",
"palmerpenguins", "gapminder", "tibble", "scales",
"systemfonts", "textshaping"),
dependencies = c("Depends", "Imports", "LinkingTo")
)
'

- name: Smoke-test ggplot2 renders a PNG
shell: bash
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/impl-generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,6 @@ jobs:
ts = '$TIMESTAMP'
run_id = ${{ github.run_id }}
issue = int('$ISSUE' or '0')
py_ver = '$PYTHON_VERSION'
lang_ver = '$LANGUAGE_VERSION'
lib_ver = '$LIBRARY_VERSION'
has_html = '$HAS_HTML' == 'true'
Expand Down Expand Up @@ -575,7 +574,10 @@ jobs:
'generated_by': f'claude-{model}',
'workflow_run': run_id,
'issue': issue,
'python_version': py_ver,
# language_version is the runtime of the implementation's own language
# (Python for matplotlib/seaborn/..., R for ggplot2). The pipeline's own
# Python interpreter is no longer written here — workflow_run is enough
# for audit, and python_version on an R artifact was misleading.
'language_version': lang_ver,
'library_version': lib_ver,
# Theme-aware preview URLs (Phase C). Both PNG variants are always emitted.
Expand Down
170 changes: 0 additions & 170 deletions renv.lock

This file was deleted.

Loading