diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 227ab51..3726972 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,9 +1,3 @@ -# NOTE: This workflow is overkill for most R packages -# check-standard.yaml is likely a better choice -# usethis::use_github_action("check-standard") will install it. -# -# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. -# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions on: push: branches: @@ -26,9 +20,13 @@ jobs: fail-fast: false matrix: config: - - {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} + - {os: windows-latest, r: 'release'} + - {os: macOS-latest, r: 'release'} + - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "R/4.1.0 (ubuntu-20.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" } env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true RSPM: ${{ matrix.config.rspm }} GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} @@ -36,64 +34,50 @@ jobs: - uses: actions/checkout@v2 - uses: r-lib/actions/setup-r@v1 - id: install-r with: r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - uses: r-lib/actions/setup-pandoc@v1 - - name: Install pak and query dependencies + - name: Query dependencies run: | - install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") - saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds") + install.packages('remotes', repos = "http://cran.us.r-project.org") + saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) + writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") shell: Rscript {0} - name: Restore R package cache uses: actions/cache@v2 with: - path: | - ${{ env.R_LIBS_USER }} - !${{ env.R_LIBS_USER }}/pak - key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }} - restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1- + path: ${{ env.R_LIBS_USER }} + key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- - name: Install system dependencies if: runner.os == 'Linux' run: | - pak::local_system_requirements(execute = TRUE) - pak::pkg_system_requirements("rcmdcheck", execute = TRUE) - shell: Rscript {0} + while read -r cmd + do + eval sudo $cmd + done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') - name: Install dependencies run: | - pak::local_install_dev_deps(upgrade = TRUE) - pak::pkg_install("rcmdcheck") - shell: Rscript {0} - - - name: Session info - run: | - options(width = 100) - pkgs <- installed.packages()[, "Package"] - sessioninfo::session_info(pkgs, include_base = TRUE) + remotes::install_deps(dependencies = TRUE) + remotes::install_cran("rcmdcheck") shell: Rscript {0} - name: Check env: - _R_CHECK_CRAN_INCOMING_: false + _R_CHECK_CRAN_INCOMING_REMOTE_: false run: | options(crayon.enabled = TRUE) rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") shell: Rscript {0} - - name: Show testthat output - if: always() - run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true - shell: bash - - name: Upload check results if: failure() uses: actions/upload-artifact@main with: - name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-results + name: ${{ runner.os }}-r${{ matrix.config.r }}-results path: check diff --git a/DESCRIPTION b/DESCRIPTION index 57b5c24..85e1789 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: iatlas.modules2 Title: iAatlas Modules2 Type: Package -Version: 0.2.2 +Version: 0.2.3 Date: 2021-1-30 Author: Andrew Lamb Maintainer: Andrew Lamb diff --git a/R/cohort_group_selection_server.R b/R/cohort_group_selection_server.R index cf45af7..b4c6df2 100644 --- a/R/cohort_group_selection_server.R +++ b/R/cohort_group_selection_server.R @@ -144,7 +144,7 @@ cohort_group_selection_server <- function( } else { group_object$group_display <- group_choice() %>% iatlas.api.client::query_tags(tags = .) %>% - dplyr::pull("short_display") + dplyr::pull("tag_short_display") group_object$group_type <- "tag" } diff --git a/R/driver_associations_univariate_server.R b/R/driver_associations_univariate_server.R index b91a101..90912b9 100644 --- a/R/driver_associations_univariate_server.R +++ b/R/driver_associations_univariate_server.R @@ -42,7 +42,7 @@ univariate_driver_server <- function(id, cohort_obj) { cohorts = cohort_obj()$dataset, parent_tags = cohort_obj()$group_name ) %>% - dplyr::pull("name") + dplyr::pull("tag_name") }) volcano_plot_tbl <- shiny::reactive({ diff --git a/R/elements_functions.R b/R/elements_functions.R index 9ee334c..1ffcc09 100644 --- a/R/elements_functions.R +++ b/R/elements_functions.R @@ -4,5 +4,5 @@ build_tag_filter_list <- function(parent_tag_name, dataset){ cohorts = dataset, parent_tags = parent_tag_name ) %>% - dplyr::pull("name") + dplyr::pull("tag_name") } diff --git a/renv.lock b/renv.lock index 244d788..e3866ba 100644 --- a/renv.lock +++ b/renv.lock @@ -9,13 +9,6 @@ ] }, "Packages": { - "BH": { - "Package": "BH", - "Version": "1.75.0-0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "e4c04affc2cac20c8fec18385cd14691" - }, "DT": { "Package": "DT", "Version": "0.18", @@ -65,6 +58,13 @@ "Repository": "CRAN", "Hash": "e8a22846fff485f0be3770c2da758713" }, + "assertthat": { + "Package": "assertthat", + "Version": "0.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "50c838a310445e954bc13f26f26a6ecf" + }, "base64enc": { "Package": "base64enc", "Version": "0.1-3", @@ -72,6 +72,20 @@ "Repository": "CRAN", "Hash": "543776ae6848fde2f48ff3816d0628bc" }, + "bit": { + "Package": "bit", + "Version": "4.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f36715f14d94678eea9933af927bc15d" + }, + "bit64": { + "Package": "bit64", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9fe98599ca456d6552421db0d6772d8f" + }, "brew": { "Package": "brew", "Version": "1.0-6", @@ -109,10 +123,10 @@ }, "cli": { "Package": "cli", - "Version": "3.0.0", + "Version": "3.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "096829b701eec2d2b4538be63de97e75" + "Hash": "e3ae5d68dea0c55a12ea12a9fda02e61" }, "clipr": { "Package": "clipr", @@ -135,6 +149,13 @@ "Repository": "CRAN", "Hash": "0f22be39ec1d141fd03683c06f3a6e67" }, + "covr": { + "Package": "covr", + "Version": "3.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6d80a9fc3c0c8473153b54fa54719dfd" + }, "cpp11": { "Package": "cpp11", "Version": "0.3.1", @@ -151,10 +172,10 @@ }, "credentials": { "Package": "credentials", - "Version": "1.3.0", + "Version": "1.3.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "a96728288c75a814c900af9da84387be" + "Hash": "db9463f8f96444ac790bef2076048699" }, "crosstalk": { "Package": "crosstalk", @@ -389,27 +410,28 @@ }, "iatlas.api.client": { "Package": "iatlas.api.client", - "Version": "0.24.1", + "Version": "0.25.0", "Source": "GitHub", "RemoteType": "github", "RemoteUsername": "CRI-iAtlas", "RemoteRepo": "iatlas.api.client", "RemoteRef": "main", - "RemoteSha": "1852e6b8dfa7e0fcd0f64512f0d5bbc1b2e634f0", + "RemoteSha": "67d5991b34e7707522fa231dd9b79010a64bfe1d", "RemoteHost": "api.github.com", - "Hash": "178b53a51e9984d12a294f337c71e426" + "Hash": "2291c14659c686152fae0da51cef4728" }, "iatlas.modules": { "Package": "iatlas.modules", - "Version": "0.4.3", + "Version": "0.5.5", "Source": "GitHub", "RemoteType": "github", "RemoteUsername": "CRI-iAtlas", "RemoteRepo": "iatlas.modules", "RemoteRef": "master", - "RemoteSha": "83c9edd63b074e378ed7216a505000e334509df6", + "RemoteSha": "284cd01dc0cc7fc793f092a162f2d511eeb57f2b", "RemoteHost": "api.github.com", - "Hash": "b7110fd84ee286fda47f74ca6817fd3c" + "Remotes": "CRI-iAtlas/iatlas.api.client@main", + "Hash": "fd4f2c89e47796e65f0ea48a115d4374" }, "ini": { "Package": "ini", @@ -539,10 +561,10 @@ }, "pillar": { "Package": "pillar", - "Version": "1.6.1", + "Version": "1.6.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "8672ae02bd20f6479bce2d06c7ff1401" + "Hash": "43f228eb4b49093d1c8a5c93cae9efe9" }, "pkgbuild": { "Package": "pkgbuild", @@ -551,6 +573,13 @@ "Repository": "CRAN", "Hash": "725fcc30222d4d11ec68efb8ff11a9af" }, + "pkgcond": { + "Package": "pkgcond", + "Version": "0.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "47924126c6dbd0fdd0065c65eef65288" + }, "pkgconfig": { "Package": "pkgconfig", "Version": "2.0.3", @@ -593,6 +622,13 @@ "Repository": "CRAN", "Hash": "0cbca2bc4d16525d009c4dbba156b37c" }, + "progress": { + "Package": "progress", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061" + }, "promises": { "Package": "promises", "Version": "1.2.0.1", @@ -630,10 +666,10 @@ }, "readr": { "Package": "readr", - "Version": "1.4.0", + "Version": "2.0.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "2639976851f71f330264a9c9c3d43a61" + "Hash": "849038f0839134ab35e719a9820005a6" }, "rematch2": { "Package": "rematch2", @@ -651,10 +687,17 @@ }, "renv": { "Package": "renv", - "Version": "0.13.2", + "Version": "0.14.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "30e5eba91b67f7f4d75d31de14bbfbdc" + }, + "rex": { + "Package": "rex", + "Version": "1.2.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "079cb1f03ff972b30401ed05623cbe92" + "Hash": "093584b944440c5cd07a696b3c8e0e4c" }, "rlang": { "Package": "rlang", @@ -749,10 +792,10 @@ }, "stringi": { "Package": "stringi", - "Version": "1.7.2", + "Version": "1.7.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "45c84ccfd359febce4c7545fee3d36cb" + "Hash": "7943cfae120c77a255025e5f63856532" }, "stringr": { "Package": "stringr", @@ -777,10 +820,10 @@ }, "tibble": { "Package": "tibble", - "Version": "3.1.2", + "Version": "3.1.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "349b40a9f144516d537c875e786ec8b8" + "Hash": "038455513fde65e79c25e724e0c84ca2" }, "tidyr": { "Package": "tidyr", @@ -803,6 +846,13 @@ "Repository": "CRAN", "Hash": "847a9d113b78baca4a9a8639609ea228" }, + "tzdb": { + "Package": "tzdb", + "Version": "0.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fb2b801053decce71295bb8cb04d438b" + }, "urltools": { "Package": "urltools", "Version": "1.7.3", @@ -819,10 +869,10 @@ }, "utf8": { "Package": "utf8", - "Version": "1.2.1", + "Version": "1.2.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "c3ad47dc6da0751f18ed53c4613e3ac7" + "Hash": "c9c462b759a5cc844ae25b5942654d13" }, "vctrs": { "Package": "vctrs", @@ -845,6 +895,13 @@ "Repository": "CRAN", "Hash": "55e157e2aa88161bdb0754218470d204" }, + "vroom": { + "Package": "vroom", + "Version": "1.5.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1a23013f39e67bb57cbda6f4ddde5470" + }, "waldo": { "Package": "waldo", "Version": "0.2.5", @@ -868,10 +925,10 @@ }, "xfun": { "Package": "xfun", - "Version": "0.24", + "Version": "0.25", "Source": "Repository", "Repository": "CRAN", - "Hash": "88cdb9779a657ad80ad942245fffba31" + "Hash": "853d45ffff0a9af1e0af017cd359f75e" }, "xml2": { "Package": "xml2", diff --git a/renv/activate.R b/renv/activate.R index b852628..304fd90 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,13 +2,27 @@ local({ # the requested version of renv - version <- "0.13.2" + version <- "0.14.0" # the project directory project <- getwd() + # allow environment variable to control activation + activate <- Sys.getenv("RENV_ACTIVATE_PROJECT") + if (!nzchar(activate)) { + + # don't auto-activate when R CMD INSTALL is running + if (nzchar(Sys.getenv("R_INSTALL_PKG"))) + return(FALSE) + + } + + # bail if activation was explicitly disabled + if (tolower(activate) %in% c("false", "f", "0")) + return(FALSE) + # avoid recursion - if (!is.na(Sys.getenv("RENV_R_INITIALIZING", unset = NA))) + if (nzchar(Sys.getenv("RENV_R_INITIALIZING"))) return(invisible(TRUE)) # signal that we're loading renv during R startup