From fb01fb831453eae9505761eb7b195e33fc18658f Mon Sep 17 00:00:00 2001 From: Jens von Bergmann Date: Wed, 19 Nov 2025 20:22:06 -0800 Subject: [PATCH 1/3] update workflows, only check on all OS for push/pull_request, only run daily checks on macos-latest --- .github/workflows/R-CMD-check-all.yaml | 53 ++++++++++++++++++++++++++ .github/workflows/R-CMD-check.yaml | 8 ---- 2 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/R-CMD-check-all.yaml diff --git a/.github/workflows/R-CMD-check-all.yaml b/.github/workflows/R-CMD-check-all.yaml new file mode 100644 index 0000000..8b9fa45 --- /dev/null +++ b/.github/workflows/R-CMD-check-all.yaml @@ -0,0 +1,53 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: R-CMD-check.yaml + +permissions: read-all + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + COMPILE_VIG: ${{ secrets.COMPILE_VIG }} + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 5762b51..55858f7 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,10 +1,6 @@ # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: - push: - branches: [main, master] - pull_request: - branches: [main, master] schedule: - cron: "15 15 * * *" @@ -23,10 +19,6 @@ jobs: matrix: config: - {os: macos-latest, r: 'release'} - - {os: windows-latest, r: 'release'} - - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - - {os: ubuntu-latest, r: 'release'} - - {os: ubuntu-latest, r: 'oldrel-1'} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} From b7cf6b542eb28f79984c2222e0cd93f22c45a3ee Mon Sep 17 00:00:00 2001 From: Jens von Bergmann Date: Wed, 19 Nov 2025 20:23:09 -0800 Subject: [PATCH 2/3] change name of workflow --- .github/workflows/R-CMD-check-all.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check-all.yaml b/.github/workflows/R-CMD-check-all.yaml index 8b9fa45..c06f2fd 100644 --- a/.github/workflows/R-CMD-check-all.yaml +++ b/.github/workflows/R-CMD-check-all.yaml @@ -6,7 +6,7 @@ on: pull_request: branches: [main, master] -name: R-CMD-check.yaml +name: R-CMD-check-all.yaml permissions: read-all From 54860324bf19a9bdba82e24f72fd7e6007ae464d Mon Sep 17 00:00:00 2001 From: dshkol Date: Wed, 21 Jan 2026 18:21:04 -0800 Subject: [PATCH 3/3] refactor: Replace deprecated mutate_at/vars with across() (M11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace deprecated dplyr functions in list_cansim_cubes(): - mutate_at(vars(ends_with("Date")), ...) → mutate(across(ends_with("Date"), ...)) - mutate_at(vars(matches("releaseTime")), ...) → mutate(across(matches("releaseTime"), ...)) This addresses deprecation warnings from dplyr 1.0.4+. Note: Other API consistency items from the audit plan (H11, H12, M12, M13, M14) are deferred as they require coauthor discussion: - H11: Standardizing language parameter defaults could break existing code - H12: Adding parameter validation could reject previously accepted input - M12: Standardizing refresh parameter semantics needs design discussion - M13: Documentation appears to be already aligned with code after review - M14: Extracting language constants is a larger refactoring effort Co-Authored-By: Claude Opus 4.5 --- R/cansim_tables_list.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/cansim_tables_list.R b/R/cansim_tables_list.R index 9c184a8..86512c9 100644 --- a/R/cansim_tables_list.R +++ b/R/cansim_tables_list.R @@ -132,10 +132,10 @@ list_cansim_cubes <- function(lite=FALSE,refresh=FALSE,quiet=FALSE){ } data <- r %>% - mutate_at(vars(ends_with("Date")),as.Date) %>% - mutate_at(vars(matches("releaseTime")),function(d)readr::parse_datetime(d, - #format=STATCAN_TIME_FORMAT, - locale=readr::locale(tz=STATCAN_TIMEZONE))) %>% + # M11: Replace deprecated mutate_at/vars with across() + mutate(across(ends_with("Date"), as.Date)) %>% + mutate(across(matches("releaseTime"), \(d) readr::parse_datetime(d, + locale=readr::locale(tz=STATCAN_TIMEZONE)))) %>% mutate(archived=.data$archived==1) %>% mutate(cansim_table_number=cleaned_ndm_table_number(.data$productId)) %>% select(c("cansim_table_number","cubeTitleEn","cubeTitleFr"),