diff --git a/.github/workflows/check-min-deps.yaml b/.github/workflows/check-min-deps.yaml index ccb5581..f095174 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] @@ -19,18 +21,39 @@ concurrency: jobs: min-deps: - runs-on: ubuntu-latest - name: minimum dependency versions + runs-on: ${{ matrix.os }} + name: minimum dependency versions (R ${{ matrix.r }}) + strategy: + fail-fast: false + matrix: + 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 - 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 diff --git a/DESCRIPTION b/DESCRIPTION index bd0dad3..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.0), + R (>= 4.2.0), ggplot2 (>= 3.5.0) Imports: ellipse, diff --git a/NEWS.md b/NEWS.md index 8098708..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.0 or later, the minimum required by current versions of ggplot2. +- 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