From 48d35ef2036a1802ac0c8e86bac60359cc263283 Mon Sep 17 00:00:00 2001 From: Fernando Alarid-Escudero Date: Fri, 13 Nov 2026 17:01:39 -0800 Subject: [PATCH 1/4] CI: also run the minimum-dependency check on the minimum R version in DESCRIPTION DESCRIPTION declares R (>= 4.1.0), but no job ran R 4.1: oldrel-1 and the min-deps job use current R. The min-deps job now has a matrix entry that reads the R bound from DESCRIPTION and checks the package on that version with the minimum package versions. --- .github/workflows/check-min-deps.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-min-deps.yaml b/.github/workflows/check-min-deps.yaml index ccb5581..08b438e 100644 --- a/.github/workflows/check-min-deps.yaml +++ b/.github/workflows/check-min-deps.yaml @@ -3,6 +3,8 @@ # Runs R CMD check with the *minimum* versions of the dependencies declared in DESCRIPTION # (for example ggplot2 (>= 3.5.0) installs ggplot2 3.5.0), so that a lower bound that is too low # fails CI instead of failing for users with older packages (as with #198). +# It runs twice: on the current R release, and on the minimum R version in DESCRIPTION +# (`R (>= x.y)`), so that the R bound is tested too. on: push: branches: [main] @@ -20,7 +22,11 @@ concurrency: jobs: min-deps: runs-on: ubuntu-latest - name: minimum dependency versions + name: minimum dependency versions (R ${{ matrix.r }}) + strategy: + fail-fast: false + matrix: + r: ['release', 'minimum'] env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes @@ -29,8 +35,20 @@ jobs: - uses: r-lib/actions/setup-pandoc@v2 + - name: Resolve the R version + id: rver + run: | + if [ "${{ matrix.r }}" = "minimum" ]; then + v=$(grep -oE 'R \(>= *[0-9.]+\)' DESCRIPTION | grep -oE '[0-9.]+') + else + v=release + fi + echo "R version: $v" + echo "version=$v" >> "$GITHUB_OUTPUT" + - uses: r-lib/actions/setup-r@v2 with: + r-version: ${{ steps.rver.outputs.version }} use-public-rspm: true - uses: r-lib/actions/setup-r-dependencies@v2 From fa407d8f1444b731e6299ed89f762729f3a07a9d Mon Sep 17 00:00:00 2001 From: Fernando Alarid-Escudero Date: Fri, 13 Nov 2026 17:12:57 -0800 Subject: [PATCH 2/4] CI min-deps: run the minimum-R job on Ubuntu 24.04 without Bioconductor repositories R 4.1 on ubuntu-latest (Ubuntu 26) failed while resolving dependencies: the Bioconductor 3.14 repositories pak adds for R 4.1 are unreachable, and the package manager has no R 4.1 binaries for Ubuntu 26. dampack uses no Bioconductor packages. --- .github/workflows/check-min-deps.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-min-deps.yaml b/.github/workflows/check-min-deps.yaml index 08b438e..f095174 100644 --- a/.github/workflows/check-min-deps.yaml +++ b/.github/workflows/check-min-deps.yaml @@ -21,15 +21,20 @@ concurrency: jobs: min-deps: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} name: minimum dependency versions (R ${{ matrix.r }}) strategy: fail-fast: false matrix: - r: ['release', 'minimum'] + include: + - {r: 'release', os: ubuntu-latest} + # An old R needs an Ubuntu release that the package manager still builds binaries + # for, and the Bioconductor mirrors of that era are gone (dampack uses none). + - {r: 'minimum', os: ubuntu-24.04} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes + PKG_USE_BIOCONDUCTOR: false steps: - uses: actions/checkout@v6 From 0bb2e245557123d4f7c447e31f605f6dd30cfb00 Mon Sep 17 00:00:00 2001 From: Fernando Alarid-Escudero Date: Fri, 13 Nov 2026 17:35:47 -0800 Subject: [PATCH 3/4] Require R (>= 4.1.3): current triangle needs it The new minimum-R CI job could not install the dependencies on R 4.1.0: 'triangle: Needs R >= 4.1.3'. Raise the declared bound to what installs from CRAN, and let the job confirm that nothing else needs a newer R. --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index bd0dad3..c984ac6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -47,7 +47,7 @@ BugReports: https://github.com/DARTH-git/dampack/issues Encoding: UTF-8 Language: en-US Depends: - R (>= 4.1.0), + R (>= 4.1.3), ggplot2 (>= 3.5.0) Imports: ellipse, diff --git a/NEWS.md b/NEWS.md index 8098708..842fe60 100644 --- a/NEWS.md +++ b/NEWS.md @@ -17,7 +17,7 @@ - Strategy names are now kept exactly as provided in `make_psa_obj()`, `create_dsa_oneway()`, `create_dsa_twoway()`, and the objects built from them, so names such as "Standard of care" appear unchanged in tables and plot legends. Previously they were converted with `make.names()` (to `Standard.of.care`) with a warning. Code that refers to the converted names must use the original ones, for example `psa$cost[["Standard of care"]]` instead of `psa$cost$Standard.of.care`. Strategy names must be unique and not missing or empty, and a wrong number of names now gives an informative error (#208). - `summary.ceac()` renames its third output column from `cost_eff_strat` to `optimal_strategy`. Code that refers to the old column name with `$cost_eff_strat` must be updated (#173). -- dampack now requires R 4.1.0 or later, the minimum required by current versions of ggplot2. +- dampack now requires R 4.1.3 or later, the minimum required by current versions of its dependencies (triangle needs R 4.1.3, ggplot2 needs R 4.1). - dampack now requires ggplot2 3.5.0 or later and scales 1.3.0 or later, for ggplot2's `transform` argument and `scales::new_transform()` (#211). ## Bug fixes From 477a390346ef24a1dab7792f614f9b1189b1d05b Mon Sep 17 00:00:00 2001 From: Fernando Alarid-Escudero Date: Fri, 13 Nov 2026 17:45:24 -0800 Subject: [PATCH 4/4] Require R (>= 4.2.0) instead of 4.1.3 R CMD check warns 'Dependence on R version 4.1.3 not with patchlevel 0', which CRAN does not accept. On R 4.1.3 every other check passed. --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c984ac6..36657e8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -47,7 +47,7 @@ BugReports: https://github.com/DARTH-git/dampack/issues Encoding: UTF-8 Language: en-US Depends: - R (>= 4.1.3), + R (>= 4.2.0), ggplot2 (>= 3.5.0) Imports: ellipse, diff --git a/NEWS.md b/NEWS.md index 842fe60..dc7d086 100644 --- a/NEWS.md +++ b/NEWS.md @@ -17,7 +17,7 @@ - Strategy names are now kept exactly as provided in `make_psa_obj()`, `create_dsa_oneway()`, `create_dsa_twoway()`, and the objects built from them, so names such as "Standard of care" appear unchanged in tables and plot legends. Previously they were converted with `make.names()` (to `Standard.of.care`) with a warning. Code that refers to the converted names must use the original ones, for example `psa$cost[["Standard of care"]]` instead of `psa$cost$Standard.of.care`. Strategy names must be unique and not missing or empty, and a wrong number of names now gives an informative error (#208). - `summary.ceac()` renames its third output column from `cost_eff_strat` to `optimal_strategy`. Code that refers to the old column name with `$cost_eff_strat` must be updated (#173). -- dampack now requires R 4.1.3 or later, the minimum required by current versions of its dependencies (triangle needs R 4.1.3, ggplot2 needs R 4.1). +- dampack now requires R 4.2.0 or later. Current versions of its dependencies need at least R 4.1.3 (triangle), and CRAN only accepts R bounds of the form x.y.0. - dampack now requires ggplot2 3.5.0 or later and scales 1.3.0 or later, for ggplot2's `transform` argument and `scales::new_transform()` (#211). ## Bug fixes