(v3.1.0.9030) Fix the CI check on R-oldrel-5 by letting pak ignore ggplot2 and tidymodels on R versions older than 4.2, since current ggplot2 requires S7 which requires R 4.2, and by not building the vignettes there

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
dr. M.S. (Matthijs) BerendsandClaude Opus 5 committed 2026-11-22 09:57:16 +01:00
1 parent 55817bea44
commit 96511f756e
3 files changed
+15 -7

No files matched your search

+12 -4
View File
@@ -58,11 +58,12 @@ jobs:
# - "interactive": true, in a real interactive R session, so that code behind interactive() is also tested # - "interactive": true, in a real interactive R session, so that code behind interactive() is also tested
# - "scenario", the user environment set up with .github/scripts/setup_test_scenario.R # - "scenario", the user environment set up with .github/scripts/setup_test_scenario.R
# - "lang", the LANG environment variable # - "lang", the LANG environment variable
# - "no_vignettes": true, to build and check the package without its vignettes (see the comment at check-r-package below)
run: | run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then if [ "${{ github.event_name }}" = "pull_request" ]; then
echo 'matrix={"config":[{"os":"ubuntu-latest","r":"release","allowfail":false},{"os":"ubuntu-latest","r":"release","allowfail":false,"tests":true,"label":"interactive","interactive":true}]}' >> "$GITHUB_OUTPUT" echo 'matrix={"config":[{"os":"ubuntu-latest","r":"release","allowfail":false},{"os":"ubuntu-latest","r":"release","allowfail":false,"tests":true,"label":"interactive","interactive":true}]}' >> "$GITHUB_OUTPUT"
else else
echo 'matrix={"config":[{"os":"windows-latest","r":"devel","allowfail":false},{"os":"ubuntu-latest","r":"devel","allowfail":false,"http-user-agent":"release"},{"os":"macOS-latest","r":"release","allowfail":true},{"os":"windows-latest","r":"release","allowfail":false},{"os":"ubuntu-latest","r":"release","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-1","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-2","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-3","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-4","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-5","allowfail":false},{"os":"ubuntu-latest","r":"release","allowfail":false,"tests":true,"label":"interactive","interactive":true},{"os":"ubuntu-latest","r":"release","allowfail":false,"tests":true,"label":"interactive, user setup","interactive":true,"scenario":"user"},{"os":"ubuntu-latest","r":"release","allowfail":false,"tests":true,"label":"Dutch locale","lang":"nl_NL.UTF-8"},{"os":"ubuntu-latest","r":"release","allowfail":false,"tests":true,"label":"CLSI as default guideline","scenario":"clsi"}]}' >> "$GITHUB_OUTPUT" echo 'matrix={"config":[{"os":"windows-latest","r":"devel","allowfail":false},{"os":"ubuntu-latest","r":"devel","allowfail":false,"http-user-agent":"release"},{"os":"macOS-latest","r":"release","allowfail":true},{"os":"windows-latest","r":"release","allowfail":false},{"os":"ubuntu-latest","r":"release","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-1","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-2","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-3","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-4","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-5","allowfail":false,"no_vignettes":true},{"os":"ubuntu-latest","r":"release","allowfail":false,"tests":true,"label":"interactive","interactive":true},{"os":"ubuntu-latest","r":"release","allowfail":false,"tests":true,"label":"interactive, user setup","interactive":true,"scenario":"user"},{"os":"ubuntu-latest","r":"release","allowfail":false,"tests":true,"label":"Dutch locale","lang":"nl_NL.UTF-8"},{"os":"ubuntu-latest","r":"release","allowfail":false,"tests":true,"label":"CLSI as default guideline","scenario":"clsi"}]}' >> "$GITHUB_OUTPUT"
fi fi
R-code-check: R-code-check:
@@ -97,8 +98,13 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2 - uses: r-lib/actions/setup-r-dependencies@v2
with: with:
# pak solves all suggested packages as one set and fails as a whole if one of them requires a newer R, so such packages are ignored on older R versions (with `pkg=?ignore-before-r=x.y.z`) and the checks run without them # pak solves all suggested packages as one set and fails as a whole if one of them requires a newer R, so such packages are ignored on older R versions (with `pkg=?ignore-before-r=x.y.z`) and the checks run without them.
extra-packages: ${{ matrix.config.tests && 'any::pkgload' || 'any::rcmdcheck' }} readxl=?ignore-before-r=4.2.0 # ggplot2 (>= 4.0.0) imports S7, which requires R >= 4.2.0, and tidymodels requires that ggplot2 version, so both are ignored on R 4.1 (oldrel-5). The unit tests that need them are skipped by AMR:::pkg_is_available(), their examples by require("ggplot2"), and their vignettes are not built (see check-r-package below).
extra-packages: >-
${{ matrix.config.tests && 'any::pkgload' || 'any::rcmdcheck' }}
readxl=?ignore-before-r=4.2.0
ggplot2=?ignore-before-r=4.2.0
tidymodels=?ignore-before-r=4.2.0
needs: check needs: check
upgrade: 'TRUE' upgrade: 'TRUE'
@@ -126,4 +132,6 @@ jobs:
_R_CHECK_FORCE_SUGGESTS_: false _R_CHECK_FORCE_SUGGESTS_: false
with: with:
upload-snapshots: true upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' # the vignettes load ggplot2 and tidymodels unconditionally, so they are not built nor checked on R versions where those packages are ignored (see above)
build_args: ${{ matrix.config.no_vignettes && 'c("--no-manual","--no-build-vignettes")' || 'c("--no-manual","--compact-vignettes=gs+qpdf")' }}
args: ${{ matrix.config.no_vignettes && 'c("--no-manual","--as-cran","--ignore-vignettes")' || 'c("--no-manual","--as-cran")' }}
+2 -2
View File
@@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 3.1.0.9026 Version: 3.1.0.9030
Date: 2026-11-16 Date: 2026-11-22
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR) Description: Functions to simplify and standardise antimicrobial resistance (AMR)
data analysis and to work with microbial and antimicrobial properties by data analysis and to work with microbial and antimicrobial properties by
+1 -1
View File
@@ -1,4 +1,4 @@
# AMR 3.1.0.9026 # AMR 3.1.0.9030
This version fixes a critical bug in WISCA that biased all coverage estimates of `wisca()` and `antibiogram(..., wisca = TRUE)` downwards since AMR 3.0.0. Users are strongly advised to re-run their WISCA analyses. This version fixes a critical bug in WISCA that biased all coverage estimates of `wisca()` and `antibiogram(..., wisca = TRUE)` downwards since AMR 3.0.0. Users are strongly advised to re-run their WISCA analyses.