From f4f96efbf976a45d4b486144d368f817992dbaa2 Mon Sep 17 00:00:00 2001 From: HDash <16350928+HDash@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:44:37 +0000 Subject: [PATCH 1/8] Add `force_install` input to bypass caching --- .../workflows/rworkflows_force_install.yml | 57 +++++++++++++++++++ action.yml | 11 +++- 2 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/rworkflows_force_install.yml diff --git a/.github/workflows/rworkflows_force_install.yml b/.github/workflows/rworkflows_force_install.yml new file mode 100644 index 00000000..0fcc461d --- /dev/null +++ b/.github/workflows/rworkflows_force_install.yml @@ -0,0 +1,57 @@ +name: rworkflows +'on': + push: + branches: + - master + - main + - devel + - RELEASE_** + pull_request: + branches: + - master + - main + - devel + - RELEASE_** +jobs: + rworkflows: + permissions: write-all + runs-on: ${{ matrix.config.os }} + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + container: ${{ matrix.config.cont }} + strategy: + fail-fast: ${{ false }} + matrix: + config: + - os: ubuntu-latest + r: auto + bioc: release + cont: ghcr.io/bioconductor/bioconductor_docker:RELEASE_3_19 + python-version: 3.11 + - os: macOS-latest + r: latest + bioc: release + python-version: 3.11 + - os: windows-latest + r: latest + bioc: release + python-version: 3.11 + steps: + - uses: neurogenomics/rworkflows@master + with: + run_bioccheck: ${{ false }} + run_rcmdcheck: ${{ true }} + as_cran: ${{ true }} + run_vignettes: ${{ true }} + has_testthat: ${{ true }} + run_covr: ${{ false }} + run_pkgdown: ${{ false }} + has_runit: ${{ false }} + # has_latex: ${{ true }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run_docker: ${{ false }} + DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} + runner_os: ${{ runner.os }} + cache_version: cache-v1 + force_install: ${{ true }} + # free_diskspace: ${{ true }} + # miniforge_variant: false diff --git a/action.yml b/action.yml index aca14b7a..5aa3bfdf 100644 --- a/action.yml +++ b/action.yml @@ -169,6 +169,13 @@ inputs: Whether to run the workflow telemetry action: https://github.com/catchpoint/workflow-telemetry-action default: true + force_install: + description: > + Whether to force install packages. If `true`, all packages will be + reinstalled, bypassing the cache. + Recommended to set to `true` when pushing changes without updating R + package version, such as during pre-release phase of developement. + default: false runs: using: 'composite' @@ -342,7 +349,7 @@ runs: install.packages(c("rmarkdown","BiocManager"), dependencies = TRUE) message(paste('****', Sys.time(), 'pass number 1 at installing dependencies****')) repos <- BiocManager::repositories() - remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=FALSE) + remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=${{ inputs.force_install }}) continue-on-error: true shell: Rscript {0} @@ -354,7 +361,7 @@ runs: options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout")) message(paste('****', Sys.time(), 'pass number 2 at installing dependencies****')) repos <- BiocManager::repositories() - remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=FALSE) + remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=${{ inputs.force_install }}) shell: Rscript {0} - name: 🛠 Install RUnit (via BiocGenerics) From 728b74825b4286653f325269748d36b92e28716b Mon Sep 17 00:00:00 2001 From: HDash <16350928+HDash@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:49:38 +0000 Subject: [PATCH 2/8] Add rworkflows to test `force_install` input --- .github/workflows/rworkflows_force_install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rworkflows_force_install.yml b/.github/workflows/rworkflows_force_install.yml index 0fcc461d..023717e4 100644 --- a/.github/workflows/rworkflows_force_install.yml +++ b/.github/workflows/rworkflows_force_install.yml @@ -1,4 +1,4 @@ -name: rworkflows +name: rworkflows_force_install 'on': push: branches: @@ -36,7 +36,7 @@ jobs: bioc: release python-version: 3.11 steps: - - uses: neurogenomics/rworkflows@master + - uses: HDash/rworkflows@force_install with: run_bioccheck: ${{ false }} run_rcmdcheck: ${{ true }} From 89ccb08775d80e33f3d5881cf8cfa5fb1ac12348 Mon Sep 17 00:00:00 2001 From: HDash <16350928+HDash@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:50:58 +0000 Subject: [PATCH 3/8] Update rworkflows branch --- .github/workflows/rworkflows_force_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rworkflows_force_install.yml b/.github/workflows/rworkflows_force_install.yml index 023717e4..640ef348 100644 --- a/.github/workflows/rworkflows_force_install.yml +++ b/.github/workflows/rworkflows_force_install.yml @@ -36,7 +36,7 @@ jobs: bioc: release python-version: 3.11 steps: - - uses: HDash/rworkflows@force_install + - uses: HDash/rworkflows@master with: run_bioccheck: ${{ false }} run_rcmdcheck: ${{ true }} From 30ff831c0445ad8a8a89eb1745c03b9882dafe7f Mon Sep 17 00:00:00 2001 From: HDash <16350928+HDash@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:56:37 +0000 Subject: [PATCH 4/8] Use different strategy for `force_install` --- action.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 5aa3bfdf..3d6483dc 100644 --- a/action.yml +++ b/action.yml @@ -339,6 +339,7 @@ runs: shell: Rscript {0} - name: 🛠 Install dependencies pass 1 + if: inputs.force_install == 'false' env: timeout: ${{ inputs.timeout }} GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} @@ -349,7 +350,23 @@ runs: install.packages(c("rmarkdown","BiocManager"), dependencies = TRUE) message(paste('****', Sys.time(), 'pass number 1 at installing dependencies****')) repos <- BiocManager::repositories() - remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=${{ inputs.force_install }}) + remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=FALSE) + continue-on-error: true + shell: Rscript {0} + + - name: 🛠 Install dependencies pass 1 (Bypass cache) + if: inputs.force_install == 'true' + env: + timeout: ${{ inputs.timeout }} + GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} + run: | + options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout")) + ## For running the checks + message(paste('****', Sys.time(), 'installing rcmdcheck ****')) + install.packages(c("rmarkdown","BiocManager"), dependencies = TRUE) + message(paste('****', Sys.time(), 'pass number 1 at installing dependencies****')) + repos <- BiocManager::repositories() + remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=TRUE) continue-on-error: true shell: Rscript {0} @@ -361,7 +378,7 @@ runs: options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout")) message(paste('****', Sys.time(), 'pass number 2 at installing dependencies****')) repos <- BiocManager::repositories() - remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=${{ inputs.force_install }}) + remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=FALSE) shell: Rscript {0} - name: 🛠 Install RUnit (via BiocGenerics) From 493f8c79c165a6aa555ca66d20214f4d13460db9 Mon Sep 17 00:00:00 2001 From: HDash <16350928+HDash@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:02:19 +0000 Subject: [PATCH 5/8] Update package version --- DESCRIPTION | 2 +- NEWS.md | 7 +++++++ README.md | 44 ++++++++++++++++++++++---------------------- 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8482e316..e8a0b303 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rworkflows Type: Package Title: Test, Document, Containerise, and Deploy R Packages -Version: 1.0.3 +Version: 1.0.4 Authors@R: c(person(given = "Brian", family = "Schilder", diff --git a/NEWS.md b/NEWS.md index d2b9f455..5c371002 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ +# rworkflows 1.0.4 + +## New features + +* New arg `force_install` allows users to bypass cache while installing + dependencies. + # rworkflows 1.0.3 ## New features diff --git a/README.md b/README.md index dad2b3a2..4fe39cde 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ GPL-3](https://img.shields.io/badge/license-GPL--3-blue.svg)](https://cran.r-project.org/web/licenses/GPL-3) [![](https://img.shields.io/badge/doi-https://doi.org/10.5281/zenodo.10048573-blue.svg)](https://doi.org/https://doi.org/10.5281/zenodo.10048573)
-[![](https://img.shields.io/badge/devel%20version-1.0.1-black.svg)](https://github.com/neurogenomics/rworkflows) +[![](https://img.shields.io/badge/devel%20version-1.0.4-black.svg)](https://github.com/neurogenomics/rworkflows) [![](https://img.shields.io/github/languages/code-size/neurogenomics/rworkflows.svg)](https://github.com/neurogenomics/rworkflows) [![](https://img.shields.io/github/last-commit/neurogenomics/rworkflows.svg)](https://github.com/neurogenomics/rworkflows/commits/master)
[![R build @@ -22,7 +22,7 @@ status](https://github.com/neurogenomics/rworkflows/workflows/rworkflows_dev/bad Authors: Brian Schilder, Alan Murphy, Nathan Skene

-README updated: Feb-01-2024 +README updated: Nov-05-2024

[![CRAN @@ -287,13 +287,13 @@ GitHub Action to setup Miniconda and conda environments. utils::sessionInfo() ``` - ## R version 4.3.1 (2023-06-16) - ## Platform: aarch64-apple-darwin20 (64-bit) - ## Running under: macOS Sonoma 14.3 + ## R version 4.4.1 (2024-06-14) + ## Platform: aarch64-apple-darwin20 + ## Running under: macOS 15.1 ## ## Matrix products: default - ## BLAS: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib - ## LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0 + ## BLAS: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib + ## LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0 ## ## locale: ## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 @@ -305,21 +305,21 @@ utils::sessionInfo() ## [1] stats graphics grDevices utils datasets methods base ## ## loaded via a namespace (and not attached): - ## [1] gtable_0.3.4 jsonlite_1.8.8 renv_1.0.3 - ## [4] dplyr_1.1.4 compiler_4.3.1 BiocManager_1.30.22 - ## [7] tidyselect_1.2.0 rvcheck_0.2.1 scales_1.3.0 - ## [10] yaml_2.3.8 fastmap_1.1.1 here_1.0.1 - ## [13] ggplot2_3.4.4 R6_2.5.1 generics_0.1.3 - ## [16] knitr_1.45 yulab.utils_0.1.3 tibble_3.2.1 + ## [1] gtable_0.3.6 jsonlite_1.8.9 renv_1.0.11 + ## [4] dplyr_1.1.4 compiler_4.4.1 BiocManager_1.30.25 + ## [7] tidyselect_1.2.1 rvcheck_0.2.1 scales_1.3.0 + ## [10] yaml_2.3.10 fastmap_1.2.0 here_1.0.1 + ## [13] ggplot2_3.5.1 R6_2.5.1 generics_0.1.3 + ## [16] knitr_1.48 yulab.utils_0.1.7 tibble_3.2.1 ## [19] desc_1.4.3 dlstats_0.1.7 rprojroot_2.0.4 - ## [22] munsell_0.5.0 pillar_1.9.0 RColorBrewer_1.1-3 - ## [25] rlang_1.1.3 utf8_1.2.4 cachem_1.0.8 - ## [28] badger_0.2.3 xfun_0.41 fs_1.6.3 - ## [31] memoise_2.0.1.9000 cli_3.6.2 magrittr_2.0.3 - ## [34] rworkflows_1.0.1 digest_0.6.34 grid_4.3.1 - ## [37] rstudioapi_0.15.0 lifecycle_1.0.4 vctrs_0.6.5 - ## [40] data.table_1.14.10 evaluate_0.23 glue_1.7.0 - ## [43] fansi_1.0.6 colorspace_2.1-0 rmarkdown_2.25 - ## [46] tools_4.3.1 pkgconfig_2.0.3 htmltools_0.5.7 + ## [22] munsell_0.5.1 pillar_1.9.0 RColorBrewer_1.1-3 + ## [25] rlang_1.1.4 utf8_1.2.4 badger_0.2.4 + ## [28] xfun_0.49 fs_1.6.5 cli_3.6.3 + ## [31] magrittr_2.0.3 rworkflows_1.0.4 digest_0.6.37 + ## [34] grid_4.4.1 rstudioapi_0.17.1 lifecycle_1.0.4 + ## [37] vctrs_0.6.5 evaluate_1.0.1 glue_1.8.0 + ## [40] data.table_1.16.2 fansi_1.0.6 colorspace_2.1-1 + ## [43] rmarkdown_2.29 tools_4.4.1 pkgconfig_2.0.3 + ## [46] htmltools_0.5.8.1 From ca341df6ba5c3adaec8c6cc165d33de8befa637a Mon Sep 17 00:00:00 2001 From: HDash <16350928+HDash@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:09:29 +0000 Subject: [PATCH 6/8] Remove rworkflows_force_install (tests complete) --- .../workflows/rworkflows_force_install.yml | 57 ------------------- 1 file changed, 57 deletions(-) delete mode 100644 .github/workflows/rworkflows_force_install.yml diff --git a/.github/workflows/rworkflows_force_install.yml b/.github/workflows/rworkflows_force_install.yml deleted file mode 100644 index 640ef348..00000000 --- a/.github/workflows/rworkflows_force_install.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: rworkflows_force_install -'on': - push: - branches: - - master - - main - - devel - - RELEASE_** - pull_request: - branches: - - master - - main - - devel - - RELEASE_** -jobs: - rworkflows: - permissions: write-all - runs-on: ${{ matrix.config.os }} - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - container: ${{ matrix.config.cont }} - strategy: - fail-fast: ${{ false }} - matrix: - config: - - os: ubuntu-latest - r: auto - bioc: release - cont: ghcr.io/bioconductor/bioconductor_docker:RELEASE_3_19 - python-version: 3.11 - - os: macOS-latest - r: latest - bioc: release - python-version: 3.11 - - os: windows-latest - r: latest - bioc: release - python-version: 3.11 - steps: - - uses: HDash/rworkflows@master - with: - run_bioccheck: ${{ false }} - run_rcmdcheck: ${{ true }} - as_cran: ${{ true }} - run_vignettes: ${{ true }} - has_testthat: ${{ true }} - run_covr: ${{ false }} - run_pkgdown: ${{ false }} - has_runit: ${{ false }} - # has_latex: ${{ true }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run_docker: ${{ false }} - DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} - runner_os: ${{ runner.os }} - cache_version: cache-v1 - force_install: ${{ true }} - # free_diskspace: ${{ true }} - # miniforge_variant: false From 5beace34f30b09446b0d119b0e6993051f7830e7 Mon Sep 17 00:00:00 2001 From: HDash <16350928+HDash@users.noreply.github.com> Date: Wed, 18 Dec 2024 15:09:50 +0000 Subject: [PATCH 7/8] Use environment variable to check for force_install --- action.yml | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/action.yml b/action.yml index 3d6483dc..d2dea2c1 100644 --- a/action.yml +++ b/action.yml @@ -339,10 +339,10 @@ runs: shell: Rscript {0} - name: 🛠 Install dependencies pass 1 - if: inputs.force_install == 'false' env: timeout: ${{ inputs.timeout }} GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} + force_install: ${{ inputs.force_install }} run: | options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout")) ## For running the checks @@ -350,23 +350,7 @@ runs: install.packages(c("rmarkdown","BiocManager"), dependencies = TRUE) message(paste('****', Sys.time(), 'pass number 1 at installing dependencies****')) repos <- BiocManager::repositories() - remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=FALSE) - continue-on-error: true - shell: Rscript {0} - - - name: 🛠 Install dependencies pass 1 (Bypass cache) - if: inputs.force_install == 'true' - env: - timeout: ${{ inputs.timeout }} - GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} - run: | - options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout")) - ## For running the checks - message(paste('****', Sys.time(), 'installing rcmdcheck ****')) - install.packages(c("rmarkdown","BiocManager"), dependencies = TRUE) - message(paste('****', Sys.time(), 'pass number 1 at installing dependencies****')) - repos <- BiocManager::repositories() - remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=TRUE) + remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=Sys.getenv("force_install")) continue-on-error: true shell: Rscript {0} From 16d9d5a75bd0b8a506a528c3e809ff472cc42eb8 Mon Sep 17 00:00:00 2001 From: HDash <16350928+HDash@users.noreply.github.com> Date: Wed, 18 Dec 2024 15:21:48 +0000 Subject: [PATCH 8/8] Update version --- DESCRIPTION | 2 +- NEWS.md | 2 +- README.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e8a0b303..894d883b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rworkflows Type: Package Title: Test, Document, Containerise, and Deploy R Packages -Version: 1.0.4 +Version: 1.0.5 Authors@R: c(person(given = "Brian", family = "Schilder", diff --git a/NEWS.md b/NEWS.md index 5c371002..8b728bd5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# rworkflows 1.0.4 +# rworkflows 1.0.5 ## New features diff --git a/README.md b/README.md index 4fe39cde..4ea0a35a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ GPL-3](https://img.shields.io/badge/license-GPL--3-blue.svg)](https://cran.r-project.org/web/licenses/GPL-3) [![](https://img.shields.io/badge/doi-https://doi.org/10.5281/zenodo.10048573-blue.svg)](https://doi.org/https://doi.org/10.5281/zenodo.10048573)
-[![](https://img.shields.io/badge/devel%20version-1.0.4-black.svg)](https://github.com/neurogenomics/rworkflows) +[![](https://img.shields.io/badge/devel%20version-1.0.5-black.svg)](https://github.com/neurogenomics/rworkflows) [![](https://img.shields.io/github/languages/code-size/neurogenomics/rworkflows.svg)](https://github.com/neurogenomics/rworkflows) [![](https://img.shields.io/github/last-commit/neurogenomics/rworkflows.svg)](https://github.com/neurogenomics/rworkflows/commits/master)
[![R build @@ -22,7 +22,7 @@ status](https://github.com/neurogenomics/rworkflows/workflows/rworkflows_dev/bad Authors: Brian Schilder, Alan Murphy, Nathan Skene

-README updated: Nov-05-2024 +README updated: Dec-18-2024

[![CRAN