diff --git a/.Rbuildignore b/.Rbuildignore index ffa547b..5371d75 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -24,3 +24,4 @@ ^data-raw$ ^CRAN-SUBMISSION$ ^cran-comments\.md$ +^.devcontainer$ diff --git a/.Rprofile b/.Rprofile index 77ae067..d059c2f 100644 --- a/.Rprofile +++ b/.Rprofile @@ -1,15 +1,48 @@ # Set renv profile base on R version. -if ((Sys.getenv("GITHUB_ACTIONS") == "") && (Sys.getenv("DOCKER_CONTAINER_CONTEXT") == "")) { - renv_profile <- paste(R.version$major, substr(R.version$minor, 1, 1), sep = ".") - if (file.exists("./renv/profile")) { - message("Using renv profile from `renv/profile` file.") - } else if (renv_profile %in% c("4.1", "4.2", "4.3")) { - message("Set renv profile to `", renv_profile, "`") - Sys.setenv("RENV_PROFILE" = renv_profile) +.get_dependencies <- function(project_dir) { + + admdev_loc <- find.package("admiraldev", lib.loc = .libPaths(), quiet = TRUE) + adm_dev_suggests <- if(length(admdev_loc) != 0) { + renv:::renv_dependencies_discover_description(admdev_loc, fields = c("Depends", "Imports", "LinkingTo", "Suggests")) + } else { + data.frame(Packages = character(0)) + } + suggests_packages <- renv:::renv_dependencies_discover_description(project_dir, fields = "Suggests") + + packages <- names( + renv:::renv_package_dependencies( + unique(c( + project_dir, + adm_dev_suggests[["Package"]], + suggests_packages[["Package"]], + c("staged.dependencies", "renv", "styler") + )) + ) + ) + packages[!(packages %in% c("admiral", "admiraldev", "admiralci", "admiral.test", "pharmaversesdtm", getwd()))] +} + +options(renv.snapshot.filter = .get_dependencies) + +.renv_profile <- paste(R.version$major, substr(R.version$minor, 1, 1), sep = ".") +if (!file.exists("./renv/profile")) { + if (.renv_profile %in% c("4.1", "4.2", "4.3")) { + message("Set renv profile to `", .renv_profile, "`") + Sys.setenv("RENV_PROFILE" = .renv_profile) } else { message("This repository do not contains the renv profile for your R version.") } - source("renv/activate.R") } else { - options(repos = c(CRAN = "https://cran.rstudio.com")) + message( + "Using renv profile from `renv/profile` file.\n", + "The `", readLines("./renv/profile"), "` profile will be used." + ) +} + +if (Sys.getenv("GITHUB_ACTIONS") != "") { + options(repos = c(CRAN = "https://packagemanager.posit.co/cran/latest")) + Sys.setenv("RENV_AUTOLOADER_ENABLED" = FALSE) } +Sys.setenv("RENV_CONFIG_SANDBOX_ENABLED" = FALSE) +Sys.setenv("RENV_CONFIG_AUTO_SNAPSHOT" = FALSE) +source("renv/activate.R") diff --git a/.devcontainer/4.1/devcontainer.json b/.devcontainer/4.1/devcontainer.json new file mode 100644 index 0000000..1d05f7f --- /dev/null +++ b/.devcontainer/4.1/devcontainer.json @@ -0,0 +1,76 @@ +{ + // https://containers.dev/implementors/json_reference/ + "name": "Admiral R-4.1 (RStudio) container", + "image": "ghcr.io/pharmaverse/admiralci-4.1:latest", + // Install Dev Container Features. More info: https://containers.dev/features + "containerEnv": { + "ROOT": "true", + "PASSWORD": "rstudio", + "DISABLE_AUTH": "true", + "RENV_AUTOLOADER_ENABLED": "false" + }, + "features": { + "ghcr.io/rocker-org/devcontainer-features/r-rig:1": { + "version": "none", + "vscodeRSupport": "full", + "installRadian": true, + "installVscDebugger": true + }, + "ghcr.io/rocker-org/devcontainer-features/renv-cache:latest": {}, + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": true, + "configureZshAsDefaultShell": false, + "installOhMyZsh": true, + "username": "rstudio", + "upgradePackages": false + }, + "ghcr.io/mikaello/devcontainer-features/modern-shell-utils:1": {} + }, + "init": true, + "overrideCommand": false, + + "postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh", + + "postAttachCommand": "$BROWSER \"https://${CODESPACE_NAME}-8787.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}/\"", + + "customizations": { + "vscode": { + "settings": { + "r.rterm.linux": "/usr/local/bin/radian", + "r.bracketedPaste": true, + "editor.bracketPairColorization.enabled": true, + "editor.guides.bracketPairs": "active" + }, + "extensions": [ + "vsls-contrib.codetour", + "GitHub.copilot", + "GitHub.copilot-chat", + // R extensions + "ikuyadeu.r", + "REditorSupport.r-lsp", + // Extra extension + "streetsidesoftware.code-spell-checker", + "eamodio.gitlens", + "cweijan.vscode-office", + "donjayamanne.githistory", + "GitHub.vscode-github-actions", + "GitHub.vscode-pull-request-github", + "GitHub.remotehub", + "alefragnani.Bookmarks", + "vscode-icons-team.vscode-icons" + ] + } + }, + + // RStudio ports + "forwardPorts": [8787], + "portsAttributes": { + "8787": { + "label": "Rstudio", + "requireLocalPort": true, + "onAutoForward": "openBrowser" + } + }, + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root + "remoteUser": "rstudio" +} diff --git a/.devcontainer/4.2/devcontainer.json b/.devcontainer/4.2/devcontainer.json new file mode 100644 index 0000000..f30486e --- /dev/null +++ b/.devcontainer/4.2/devcontainer.json @@ -0,0 +1,76 @@ +{ + // https://containers.dev/implementors/json_reference/ + "name": "Admiral R-4.2 (RStudio) container", + "image": "ghcr.io/pharmaverse/admiralci-4.2:latest", + // Install Dev Container Features. More info: https://containers.dev/features + "containerEnv": { + "ROOT": "true", + "PASSWORD": "rstudio", + "DISABLE_AUTH": "true", + "RENV_AUTOLOADER_ENABLED": "false" + }, + "features": { + "ghcr.io/rocker-org/devcontainer-features/r-rig:1": { + "version": "none", + "vscodeRSupport": "full", + "installRadian": true, + "installVscDebugger": true + }, + "ghcr.io/rocker-org/devcontainer-features/renv-cache:latest": {}, + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": true, + "configureZshAsDefaultShell": false, + "installOhMyZsh": true, + "username": "rstudio", + "upgradePackages": false + }, + "ghcr.io/mikaello/devcontainer-features/modern-shell-utils:1": {} + }, + "init": true, + "overrideCommand": false, + + "postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh", + + "postAttachCommand": "$BROWSER \"https://${CODESPACE_NAME}-8787.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}/\"", + + "customizations": { + "vscode": { + "settings": { + "r.rterm.linux": "/usr/local/bin/radian", + "r.bracketedPaste": true, + "editor.bracketPairColorization.enabled": true, + "editor.guides.bracketPairs": "active" + }, + "extensions": [ + "vsls-contrib.codetour", + "GitHub.copilot", + "GitHub.copilot-chat", + // R extensions + "ikuyadeu.r", + "REditorSupport.r-lsp", + // Extra extension + "streetsidesoftware.code-spell-checker", + "eamodio.gitlens", + "cweijan.vscode-office", + "donjayamanne.githistory", + "GitHub.vscode-github-actions", + "GitHub.vscode-pull-request-github", + "GitHub.remotehub", + "alefragnani.Bookmarks", + "vscode-icons-team.vscode-icons" + ] + } + }, + + // RStudio ports + "forwardPorts": [8787], + "portsAttributes": { + "8787": { + "label": "Rstudio", + "requireLocalPort": true, + "onAutoForward": "openBrowser" + } + }, + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root + "remoteUser": "rstudio" +} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..4f49db8 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,76 @@ +{ + // https://containers.dev/implementors/json_reference/ + "name": "Admiral R-4.3 (RStudio) container", + "image": "ghcr.io/pharmaverse/admiralci-4.3:latest", + // Install Dev Container Features. More info: https://containers.dev/features + "containerEnv": { + "ROOT": "true", + "PASSWORD": "rstudio", + "DISABLE_AUTH": "true", + "RENV_AUTOLOADER_ENABLED": "false" + }, + "features": { + "ghcr.io/rocker-org/devcontainer-features/r-rig:1": { + "version": "none", + "vscodeRSupport": "full", + "installRadian": true, + "installVscDebugger": true + }, + "ghcr.io/rocker-org/devcontainer-features/renv-cache:latest": {}, + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": true, + "configureZshAsDefaultShell": false, + "installOhMyZsh": true, + "username": "rstudio", + "upgradePackages": false + }, + "ghcr.io/mikaello/devcontainer-features/modern-shell-utils:1": {} + }, + "init": true, + "overrideCommand": false, + + "postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh", + + "postAttachCommand": "$BROWSER \"https://${CODESPACE_NAME}-8787.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}/\"", + + "customizations": { + "vscode": { + "settings": { + "r.rterm.linux": "/usr/local/bin/radian", + "r.bracketedPaste": true, + "editor.bracketPairColorization.enabled": true, + "editor.guides.bracketPairs": "active" + }, + "extensions": [ + "vsls-contrib.codetour", + "GitHub.copilot", + "GitHub.copilot-chat", + // R extensions + "ikuyadeu.r", + "REditorSupport.r-lsp", + // Extra extension + "streetsidesoftware.code-spell-checker", + "eamodio.gitlens", + "cweijan.vscode-office", + "donjayamanne.githistory", + "GitHub.vscode-github-actions", + "GitHub.vscode-pull-request-github", + "GitHub.remotehub", + "alefragnani.Bookmarks", + "vscode-icons-team.vscode-icons" + ] + } + }, + + // RStudio ports + "forwardPorts": [8787], + "portsAttributes": { + "8787": { + "label": "Rstudio", + "requireLocalPort": true, + "onAutoForward": "openBrowser" + } + }, + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root + "remoteUser": "rstudio" +} diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100644 index 0000000..9b9db23 --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +R -q -e 'renv::restore(lockfile = file.path("renv", "profiles", paste(R.version$major, substr(R.version$minor, 1, 1), sep = "."), "renv.lock")); staged.dependencies::install_deps(staged.dependencies::dependency_table(project = ".", verbose = 1), verbose = 1);' + +jq --arg folder "$(pwd)/" '. + { "initial_working_directory": $folder }' .devcontainer/rstudio-prefs.json > ~/.config/rstudio/rstudio-prefs.json diff --git a/.devcontainer/rstudio-prefs.json b/.devcontainer/rstudio-prefs.json new file mode 100644 index 0000000..2d5cce8 --- /dev/null +++ b/.devcontainer/rstudio-prefs.json @@ -0,0 +1,8 @@ +{ + "save_workspace": "never", + "always_save_history": false, + "reuse_sessions_for_project_links": true, + "posix_terminal_shell": "bash", + "initial_working_directory": "/workspaces", + "show_hidden_files": true +} diff --git a/renv.lock b/renv.lock index 6617448..5801ed1 100644 --- a/renv.lock +++ b/renv.lock @@ -4,7 +4,7 @@ "Repositories": [ { "Name": "CRAN", - "URL": "https://cloud.r-project.org" + "URL": "https://packagemanager.posit.co/cran/latest" }, { "Name": "RSPM", @@ -179,7 +179,7 @@ "Package": "callr", "Version": "3.7.3", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -188,11 +188,23 @@ ], "Hash": "9b2191ede20fa29828139b9900922e51" }, + "cellranger": { + "Package": "cellranger", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "rematch", + "tibble" + ], + "Hash": "f61dbaec772ccd2e17705c1e872e9e7c" + }, "cli": { "Package": "cli", "Version": "3.4.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "utils" @@ -219,6 +231,13 @@ ], "Hash": "019388fc48e48b3da0d3a76ff94608a8" }, + "collections": { + "Package": "collections", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "92537c684a3d2eaa6bd8f65c28ef97f0" + }, "commonmark": { "Package": "commonmark", "Version": "1.8.0", @@ -250,7 +269,7 @@ "Package": "cpp11", "Version": "0.4.3", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Hash": "ed588261931ee3be2c700d22e94a29ab" }, "crayon": { @@ -320,7 +339,7 @@ "Package": "desc", "Version": "1.4.2", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -423,7 +442,7 @@ "Package": "dplyr", "Version": "1.1.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -704,7 +723,7 @@ "Package": "knitr", "Version": "1.40", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "evaluate", @@ -717,6 +736,30 @@ ], "Hash": "caea8b0f899a0b1738444b9bc47067e7" }, + "languageserver": { + "Package": "languageserver", + "Version": "0.3.12", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "callr", + "collections", + "fs", + "jsonlite", + "lintr", + "parallel", + "roxygen2", + "stringi", + "styler", + "tools", + "utils", + "xml2", + "xmlparsedata" + ], + "Hash": "f62ed8b09fd56cd70291bd077bc52c4b" + }, "later": { "Package": "later", "Version": "1.3.0", @@ -755,7 +798,7 @@ "Package": "lintr", "Version": "3.0.2", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "backports", @@ -841,7 +884,7 @@ "Package": "pillar", "Version": "1.9.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "cli", "fansi", @@ -886,7 +929,7 @@ "Package": "pkgdown", "Version": "2.0.7", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "bslib", @@ -948,7 +991,7 @@ "Package": "processx", "Version": "3.6.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -957,6 +1000,19 @@ ], "Hash": "a11891e28c1f1e5ddd773ba1b8c07cf6" }, + "progress": { + "Package": "progress", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R6", + "crayon", + "hms", + "prettyunits" + ], + "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061" + }, "promises": { "Package": "promises", "Version": "1.2.0.1", @@ -1038,6 +1094,27 @@ ], "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4" }, + "readxl": { + "Package": "readxl", + "Version": "1.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "Rcpp", + "cellranger", + "progress", + "tibble", + "utils" + ], + "Hash": "63537c483c2dbec8d9e3183b3735254a" + }, + "rematch": { + "Package": "rematch", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c66b930d20bb6d858cd18e1cebcfae5c" + }, "rematch2": { "Package": "rematch2", "Version": "2.1.2", @@ -1050,7 +1127,7 @@ }, "remotes": { "Package": "remotes", - "Version": "2.4.2", + "Version": "2.4.2.1", "Source": "Repository", "Repository": "RSPM", "Requirements": [ @@ -1060,17 +1137,17 @@ "tools", "utils" ], - "Hash": "227045be9aee47e6dda9bb38ac870d67" + "Hash": "63d15047eb239f95160112bcadc4fcb9" }, "renv": { "Package": "renv", - "Version": "0.17.0", + "Version": "1.0.0", "Source": "Repository", "Repository": "RSPM", "Requirements": [ "utils" ], - "Hash": "ce3065fc1a0b64a859f55ac3998d6927" + "Hash": "c321cd99d56443dbffd1c9e673c0c1a2" }, "rex": { "Package": "rex", @@ -1086,7 +1163,7 @@ "Package": "rlang", "Version": "1.1.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "utils" @@ -1097,7 +1174,7 @@ "Package": "rmarkdown", "Version": "2.17", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "bslib", @@ -1120,7 +1197,7 @@ "Package": "roxygen2", "Version": "7.2.3", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -1257,14 +1334,14 @@ }, "staged.dependencies": { "Package": "staged.dependencies", - "Version": "0.2.8", + "Version": "0.3.1", "Source": "GitHub", "RemoteType": "github", "RemoteHost": "api.github.com", "RemoteUsername": "openpharma", "RemoteRepo": "staged.dependencies", "RemoteRef": "main", - "RemoteSha": "ce7c112ba3d75cf48e4dd6310b3140ab0ec3b486", + "RemoteSha": "1ab184a029bef8839a57bb6acd1c5c919cf1fd89", "Requirements": [ "desc", "devtools", @@ -1285,7 +1362,7 @@ "withr", "yaml" ], - "Hash": "89f2e1d1009601f58f64b7092abcc0d7" + "Hash": "ea298f9fb221a8c7ca4c9e55e9c29b48" }, "stringi": { "Package": "stringi", @@ -1317,7 +1394,7 @@ "Package": "styler", "Version": "1.9.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R.cache", @@ -1354,7 +1431,7 @@ "Package": "testthat", "Version": "3.1.7", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -1396,7 +1473,7 @@ "Package": "tibble", "Version": "3.2.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "fansi", @@ -1437,7 +1514,7 @@ "Package": "tidyselect", "Version": "1.2.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "cli", @@ -1504,7 +1581,7 @@ "Package": "vctrs", "Version": "0.6.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "cli", @@ -1518,7 +1595,7 @@ "Package": "waldo", "Version": "0.4.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "cli", "diffobj", @@ -1555,7 +1632,7 @@ "Package": "xfun", "Version": "0.34", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "stats", "tools" diff --git a/renv/activate.R b/renv/activate.R index 360dd52..cc742fc 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,7 +2,8 @@ local({ # the requested version of renv - version <- "0.17.0" + version <- "1.0.0" + attr(version, "sha") <- NULL # the project directory project <- getwd() @@ -60,21 +61,75 @@ local({ # load bootstrap tools `%||%` <- function(x, y) { - if (is.environment(x) || length(x)) x else y + if (is.null(x)) y else x + } + + catf <- function(fmt, ..., appendLF = TRUE) { + + quiet <- getOption("renv.bootstrap.quiet", default = FALSE) + if (quiet) + return(invisible()) + + msg <- sprintf(fmt, ...) + cat(msg, file = stdout(), sep = if (appendLF) "\n" else "") + + invisible(msg) + + } + + header <- function(label, + ..., + prefix = "#", + suffix = "-", + n = min(getOption("width"), 78)) + { + label <- sprintf(label, ...) + n <- max(n - nchar(label) - nchar(prefix) - 2L, 8L) + if (n <= 0) + return(paste(prefix, label)) + + tail <- paste(rep.int(suffix, n), collapse = "") + paste0(prefix, " ", label, " ", tail) + + } + + startswith <- function(string, prefix) { + substring(string, 1, nchar(prefix)) == prefix } bootstrap <- function(version, library) { + friendly <- renv_bootstrap_version_friendly(version) + section <- header(sprintf("Bootstrapping renv %s", friendly)) + catf(section) + # attempt to download renv - tarball <- tryCatch(renv_bootstrap_download(version), error = identity) - if (inherits(tarball, "error")) - stop("failed to download renv ", version) + catf("- Downloading renv ... ", appendLF = FALSE) + withCallingHandlers( + tarball <- renv_bootstrap_download(version), + error = function(err) { + catf("FAILED") + stop("failed to download:\n", conditionMessage(err)) + } + ) + catf("OK") + on.exit(unlink(tarball), add = TRUE) # now attempt to install - status <- tryCatch(renv_bootstrap_install(version, tarball, library), error = identity) - if (inherits(status, "error")) - stop("failed to install renv ", version) + catf("- Installing renv ... ", appendLF = FALSE) + withCallingHandlers( + status <- renv_bootstrap_install(version, tarball, library), + error = function(err) { + catf("FAILED") + stop("failed to install:\n", conditionMessage(err)) + } + ) + catf("OK") + + # add empty line to break up bootstrapping from normal output + catf("") + return(invisible()) } renv_bootstrap_tests_running <- function() { @@ -83,31 +138,32 @@ local({ renv_bootstrap_repos <- function() { + # get CRAN repository + cran <- getOption("renv.repos.cran", "https://cloud.r-project.org") + # check for repos override repos <- Sys.getenv("RENV_CONFIG_REPOS_OVERRIDE", unset = NA) - if (!is.na(repos)) + if (!is.na(repos)) { + + # check for RSPM; if set, use a fallback repository for renv + rspm <- Sys.getenv("RSPM", unset = NA) + if (identical(rspm, repos)) + repos <- c(RSPM = rspm, CRAN = cran) + return(repos) + } + # check for lockfile repositories repos <- tryCatch(renv_bootstrap_repos_lockfile(), error = identity) if (!inherits(repos, "error") && length(repos)) return(repos) - # if we're testing, re-use the test repositories - if (renv_bootstrap_tests_running()) { - repos <- getOption("renv.tests.repos") - if (!is.null(repos)) - return(repos) - } - # retrieve current repos repos <- getOption("repos") # ensure @CRAN@ entries are resolved - repos[repos == "@CRAN@"] <- getOption( - "renv.repos.cran", - "https://cloud.r-project.org" - ) + repos[repos == "@CRAN@"] <- cran # add in renv.bootstrap.repos if set default <- c(FALLBACK = "https://cloud.r-project.org") @@ -146,33 +202,34 @@ local({ renv_bootstrap_download <- function(version) { - # if the renv version number has 4 components, assume it must - # be retrieved via github - nv <- numeric_version(version) - components <- unclass(nv)[[1]] - - # if this appears to be a development version of 'renv', we'll - # try to restore from github - dev <- length(components) == 4L - - # begin collecting different methods for finding renv - methods <- c( - renv_bootstrap_download_tarball, - if (dev) - renv_bootstrap_download_github - else c( - renv_bootstrap_download_cran_latest, - renv_bootstrap_download_cran_archive + sha <- attr(version, "sha", exact = TRUE) + + methods <- if (!is.null(sha)) { + + # attempting to bootstrap a development version of renv + c( + function() renv_bootstrap_download_tarball(sha), + function() renv_bootstrap_download_github(sha) ) - ) + + } else { + + # attempting to bootstrap a release version of renv + c( + function() renv_bootstrap_download_tarball(version), + function() renv_bootstrap_download_cran_latest(version), + function() renv_bootstrap_download_cran_archive(version) + ) + + } for (method in methods) { - path <- tryCatch(method(version), error = identity) + path <- tryCatch(method(), error = identity) if (is.character(path) && file.exists(path)) return(path) } - stop("failed to download renv ", version) + stop("All download methods failed") } @@ -236,8 +293,6 @@ local({ type <- spec$type repos <- spec$repos - message("* Downloading renv ", version, " ... ", appendLF = FALSE) - baseurl <- utils::contrib.url(repos = repos, type = type) ext <- if (identical(type, "source")) ".tar.gz" @@ -254,13 +309,10 @@ local({ condition = identity ) - if (inherits(status, "condition")) { - message("FAILED") + if (inherits(status, "condition")) return(FALSE) - } # report success and return - message("OK (downloaded ", type, ")") destfile } @@ -317,8 +369,6 @@ local({ urls <- file.path(repos, "src/contrib/Archive/renv", name) destfile <- file.path(tempdir(), name) - message("* Downloading renv ", version, " ... ", appendLF = FALSE) - for (url in urls) { status <- tryCatch( @@ -326,14 +376,11 @@ local({ condition = identity ) - if (identical(status, 0L)) { - message("OK") + if (identical(status, 0L)) return(destfile) - } } - message("FAILED") return(FALSE) } @@ -356,7 +403,7 @@ local({ if (!file.exists(tarball)) { # let the user know we weren't able to honour their request - fmt <- "* RENV_BOOTSTRAP_TARBALL is set (%s) but does not exist." + fmt <- "- RENV_BOOTSTRAP_TARBALL is set (%s) but does not exist." msg <- sprintf(fmt, tarball) warning(msg) @@ -365,10 +412,7 @@ local({ } - fmt <- "* Bootstrapping with tarball at path '%s'." - msg <- sprintf(fmt, tarball) - message(msg) - + catf("- Using local tarball '%s'.", tarball) tarball } @@ -395,8 +439,6 @@ local({ on.exit(do.call(base::options, saved), add = TRUE) } - message("* Downloading renv ", version, " from GitHub ... ", appendLF = FALSE) - url <- file.path("https://api.github.com/repos/rstudio/renv/tarball", version) name <- sprintf("renv_%s.tar.gz", version) destfile <- file.path(tempdir(), name) @@ -406,26 +448,105 @@ local({ condition = identity ) - if (!identical(status, 0L)) { - message("FAILED") + if (!identical(status, 0L)) return(FALSE) - } - message("OK") + renv_bootstrap_download_augment(destfile) + return(destfile) } + # Add Sha to DESCRIPTION. This is stop gap until #890, after which we + # can use renv::install() to fully capture metadata. + renv_bootstrap_download_augment <- function(destfile) { + sha <- renv_bootstrap_git_extract_sha1_tar(destfile) + if (is.null(sha)) { + return() + } + + # Untar + tempdir <- tempfile("renv-github-") + on.exit(unlink(tempdir, recursive = TRUE), add = TRUE) + untar(destfile, exdir = tempdir) + pkgdir <- dir(tempdir, full.names = TRUE)[[1]] + + # Modify description + desc_path <- file.path(pkgdir, "DESCRIPTION") + desc_lines <- readLines(desc_path) + remotes_fields <- c( + "RemoteType: github", + "RemoteHost: api.github.com", + "RemoteRepo: renv", + "RemoteUsername: rstudio", + "RemotePkgRef: rstudio/renv", + paste("RemoteRef: ", sha), + paste("RemoteSha: ", sha) + ) + writeLines(c(desc_lines[desc_lines != ""], remotes_fields), con = desc_path) + + # Re-tar + local({ + old <- setwd(tempdir) + on.exit(setwd(old), add = TRUE) + + tar(destfile, compression = "gzip") + }) + invisible() + } + + # Extract the commit hash from a git archive. Git archives include the SHA1 + # hash as the comment field of the tarball pax extended header + # (see https://www.kernel.org/pub/software/scm/git/docs/git-archive.html) + # For GitHub archives this should be the first header after the default one + # (512 byte) header. + renv_bootstrap_git_extract_sha1_tar <- function(bundle) { + + # open the bundle for reading + # We use gzcon for everything because (from ?gzcon) + # > Reading from a connection which does not supply a ‘gzip’ magic + # > header is equivalent to reading from the original connection + conn <- gzcon(file(bundle, open = "rb", raw = TRUE)) + on.exit(close(conn)) + + # The default pax header is 512 bytes long and the first pax extended header + # with the comment should be 51 bytes long + # `52 comment=` (11 chars) + 40 byte SHA1 hash + len <- 0x200 + 0x33 + res <- rawToChar(readBin(conn, "raw", n = len)[0x201:len]) + + if (grepl("^52 comment=", res)) { + sub("52 comment=", "", res) + } else { + NULL + } + } + renv_bootstrap_install <- function(version, tarball, library) { # attempt to install it into project library - message("* Installing renv ", version, " ... ", appendLF = FALSE) dir.create(library, showWarnings = FALSE, recursive = TRUE) + output <- renv_bootstrap_install_impl(library, tarball) + + # check for successful install + status <- attr(output, "status") + if (is.null(status) || identical(status, 0L)) + return(status) + + # an error occurred; report it + header <- "installation of renv failed" + lines <- paste(rep.int("=", nchar(header)), collapse = "") + text <- paste(c(header, lines, output), collapse = "\n") + stop(text) + + } + + renv_bootstrap_install_impl <- function(library, tarball) { # invoke using system2 so we can capture and report output bin <- R.home("bin") exe <- if (Sys.info()[["sysname"]] == "Windows") "R.exe" else "R" - r <- file.path(bin, exe) + R <- file.path(bin, exe) args <- c( "--vanilla", "CMD", "INSTALL", "--no-multiarch", @@ -433,19 +554,7 @@ local({ shQuote(path.expand(tarball)) ) - output <- system2(r, args, stdout = TRUE, stderr = TRUE) - message("Done!") - - # check for successful install - status <- attr(output, "status") - if (is.numeric(status) && !identical(status, 0L)) { - header <- "Error installing renv:" - lines <- paste(rep.int("=", nchar(header)), collapse = "") - text <- c(header, lines, output) - writeLines(text, con = stderr()) - } - - status + system2(R, args, stdout = TRUE, stderr = TRUE) } @@ -655,34 +764,60 @@ local({ } - renv_bootstrap_validate_version <- function(version) { + renv_bootstrap_validate_version <- function(version, description = NULL) { - loadedversion <- utils::packageDescription("renv", fields = "Version") - if (version == loadedversion) - return(TRUE) + # resolve description file + description <- description %||% { + path <- getNamespaceInfo("renv", "path") + packageDescription("renv", lib.loc = dirname(path)) + } - # assume four-component versions are from GitHub; - # three-component versions are from CRAN - components <- strsplit(loadedversion, "[.-]")[[1]] - remote <- if (length(components) == 4L) - paste("rstudio/renv", loadedversion, sep = "@") + # check whether requested version 'version' matches loaded version of renv + sha <- attr(version, "sha", exact = TRUE) + valid <- if (!is.null(sha)) + renv_bootstrap_validate_version_dev(sha, description) else - paste("renv", loadedversion, sep = "@") + renv_bootstrap_validate_version_release(version, description) + + if (valid) + return(TRUE) + + # the loaded version of renv doesn't match the requested version; + # give the user instructions on how to proceed + remote <- if (!is.null(description[["RemoteSha"]])) { + paste("rstudio/renv", description[["RemoteSha"]], sep = "@") + } else { + paste("renv", description[["Version"]], sep = "@") + } + + # display both loaded version + sha if available + friendly <- renv_bootstrap_version_friendly( + version = description[["Version"]], + sha = description[["RemoteSha"]] + ) fmt <- paste( "renv %1$s was loaded from project library, but this project is configured to use renv %2$s.", - "Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.", - "Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", + "- Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.", + "- Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", sep = "\n" ) - - msg <- sprintf(fmt, loadedversion, version, remote) - warning(msg, call. = FALSE) + catf(fmt, friendly, renv_bootstrap_version_friendly(version), remote) FALSE } + renv_bootstrap_validate_version_dev <- function(version, description) { + expected <- description[["RemoteSha"]] + is.character(expected) && startswith(expected, version) + } + + renv_bootstrap_validate_version_release <- function(version, description) { + expected <- description[["Version"]] + is.character(expected) && identical(expected, version) + } + renv_bootstrap_hash_text <- function(text) { hashfile <- tempfile("renv-hash-") @@ -847,6 +982,40 @@ local({ } + renv_bootstrap_version_friendly <- function(version, sha = NULL) { + sha <- sha %||% attr(version, "sha", exact = TRUE) + parts <- c(version, sprintf("[sha: %s]", substring(sha, 1L, 7L))) + paste(parts, collapse = " ") + } + + renv_bootstrap_run <- function(version, libpath) { + + # perform bootstrap + bootstrap(version, libpath) + + # exit early if we're just testing bootstrap + if (!is.na(Sys.getenv("RENV_BOOTSTRAP_INSTALL_ONLY", unset = NA))) + return(TRUE) + + # try again to load + if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { + return(renv::load(project = getwd())) + } + + # failed to download or load renv; warn the user + msg <- c( + "Failed to find an renv installation: the project will not be loaded.", + "Use `renv::activate()` to re-initialize the project." + ) + + warning(paste(msg, collapse = "\n"), call. = FALSE) + + } + + + renv_bootstrap_in_rstudio <- function() { + commandArgs()[[1]] == "RStudio" + } renv_json_read <- function(file = NULL, text = NULL) { @@ -990,31 +1159,23 @@ local({ if (renv_bootstrap_load(project, libpath, version)) return(TRUE) - # load failed; inform user we're about to bootstrap - prefix <- paste("# Bootstrapping renv", version) - postfix <- paste(rep.int("-", 77L - nchar(prefix)), collapse = "") - header <- paste(prefix, postfix) - message(header) - - # perform bootstrap - bootstrap(version, libpath) - - # exit early if we're just testing bootstrap - if (!is.na(Sys.getenv("RENV_BOOTSTRAP_INSTALL_ONLY", unset = NA))) - return(TRUE) + if (renv_bootstrap_in_rstudio()) { + setHook("rstudio.sessionInit", function(...) { + renv_bootstrap_run(version, libpath) - # try again to load - if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { - message("* Successfully installed and loaded renv ", version, ".") - return(renv::load()) + # Work around buglet in RStudio if hook uses readline + tryCatch( + { + tools <- as.environment("tools:rstudio") + tools$.rs.api.sendToConsole("", echo = FALSE, focus = FALSE) + }, + error = function(cnd) {} + ) + }) + } else { + renv_bootstrap_run(version, libpath) } - # failed to download or load renv; warn the user - msg <- c( - "Failed to find an renv installation: the project will not be loaded.", - "Use `renv::activate()` to re-initialize the project." - ) - - warning(paste(msg, collapse = "\n"), call. = FALSE) + invisible() }) diff --git a/renv/profiles/4.1/renv.lock b/renv/profiles/4.1/renv.lock index 0f3ac2c..5801ed1 100644 --- a/renv/profiles/4.1/renv.lock +++ b/renv/profiles/4.1/renv.lock @@ -4,7 +4,7 @@ "Repositories": [ { "Name": "CRAN", - "URL": "https://cloud.r-project.org" + "URL": "https://packagemanager.posit.co/cran/latest" }, { "Name": "RSPM", @@ -179,7 +179,7 @@ "Package": "callr", "Version": "3.7.3", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -188,11 +188,23 @@ ], "Hash": "9b2191ede20fa29828139b9900922e51" }, + "cellranger": { + "Package": "cellranger", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "rematch", + "tibble" + ], + "Hash": "f61dbaec772ccd2e17705c1e872e9e7c" + }, "cli": { "Package": "cli", "Version": "3.4.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "utils" @@ -219,6 +231,13 @@ ], "Hash": "019388fc48e48b3da0d3a76ff94608a8" }, + "collections": { + "Package": "collections", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "92537c684a3d2eaa6bd8f65c28ef97f0" + }, "commonmark": { "Package": "commonmark", "Version": "1.8.0", @@ -250,7 +269,7 @@ "Package": "cpp11", "Version": "0.4.3", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Hash": "ed588261931ee3be2c700d22e94a29ab" }, "crayon": { @@ -320,7 +339,7 @@ "Package": "desc", "Version": "1.4.2", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -423,7 +442,7 @@ "Package": "dplyr", "Version": "1.1.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -704,7 +723,7 @@ "Package": "knitr", "Version": "1.40", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "evaluate", @@ -717,6 +736,30 @@ ], "Hash": "caea8b0f899a0b1738444b9bc47067e7" }, + "languageserver": { + "Package": "languageserver", + "Version": "0.3.12", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "callr", + "collections", + "fs", + "jsonlite", + "lintr", + "parallel", + "roxygen2", + "stringi", + "styler", + "tools", + "utils", + "xml2", + "xmlparsedata" + ], + "Hash": "f62ed8b09fd56cd70291bd077bc52c4b" + }, "later": { "Package": "later", "Version": "1.3.0", @@ -742,7 +785,7 @@ "Package": "lifecycle", "Version": "1.0.3", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "cli", @@ -755,7 +798,7 @@ "Package": "lintr", "Version": "3.0.2", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "backports", @@ -841,7 +884,7 @@ "Package": "pillar", "Version": "1.9.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "cli", "fansi", @@ -886,7 +929,7 @@ "Package": "pkgdown", "Version": "2.0.7", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "bslib", @@ -948,7 +991,7 @@ "Package": "processx", "Version": "3.6.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -957,6 +1000,19 @@ ], "Hash": "a11891e28c1f1e5ddd773ba1b8c07cf6" }, + "progress": { + "Package": "progress", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R6", + "crayon", + "hms", + "prettyunits" + ], + "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061" + }, "promises": { "Package": "promises", "Version": "1.2.0.1", @@ -1038,6 +1094,27 @@ ], "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4" }, + "readxl": { + "Package": "readxl", + "Version": "1.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "Rcpp", + "cellranger", + "progress", + "tibble", + "utils" + ], + "Hash": "63537c483c2dbec8d9e3183b3735254a" + }, + "rematch": { + "Package": "rematch", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c66b930d20bb6d858cd18e1cebcfae5c" + }, "rematch2": { "Package": "rematch2", "Version": "2.1.2", @@ -1050,7 +1127,7 @@ }, "remotes": { "Package": "remotes", - "Version": "2.4.2", + "Version": "2.4.2.1", "Source": "Repository", "Repository": "RSPM", "Requirements": [ @@ -1060,17 +1137,17 @@ "tools", "utils" ], - "Hash": "227045be9aee47e6dda9bb38ac870d67" + "Hash": "63d15047eb239f95160112bcadc4fcb9" }, "renv": { "Package": "renv", - "Version": "0.17.0", + "Version": "1.0.0", "Source": "Repository", "Repository": "RSPM", "Requirements": [ "utils" ], - "Hash": "ce3065fc1a0b64a859f55ac3998d6927" + "Hash": "c321cd99d56443dbffd1c9e673c0c1a2" }, "rex": { "Package": "rex", @@ -1086,7 +1163,7 @@ "Package": "rlang", "Version": "1.1.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "utils" @@ -1097,7 +1174,7 @@ "Package": "rmarkdown", "Version": "2.17", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "bslib", @@ -1120,7 +1197,7 @@ "Package": "roxygen2", "Version": "7.2.3", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -1257,14 +1334,14 @@ }, "staged.dependencies": { "Package": "staged.dependencies", - "Version": "0.2.8", + "Version": "0.3.1", "Source": "GitHub", "RemoteType": "github", "RemoteHost": "api.github.com", "RemoteUsername": "openpharma", "RemoteRepo": "staged.dependencies", "RemoteRef": "main", - "RemoteSha": "ce7c112ba3d75cf48e4dd6310b3140ab0ec3b486", + "RemoteSha": "1ab184a029bef8839a57bb6acd1c5c919cf1fd89", "Requirements": [ "desc", "devtools", @@ -1285,7 +1362,7 @@ "withr", "yaml" ], - "Hash": "89f2e1d1009601f58f64b7092abcc0d7" + "Hash": "ea298f9fb221a8c7ca4c9e55e9c29b48" }, "stringi": { "Package": "stringi", @@ -1317,7 +1394,7 @@ "Package": "styler", "Version": "1.9.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R.cache", @@ -1354,7 +1431,7 @@ "Package": "testthat", "Version": "3.1.7", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -1396,7 +1473,7 @@ "Package": "tibble", "Version": "3.2.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "fansi", @@ -1437,7 +1514,7 @@ "Package": "tidyselect", "Version": "1.2.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "cli", @@ -1504,7 +1581,7 @@ "Package": "vctrs", "Version": "0.6.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "cli", @@ -1518,7 +1595,7 @@ "Package": "waldo", "Version": "0.4.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "cli", "diffobj", @@ -1555,7 +1632,7 @@ "Package": "xfun", "Version": "0.34", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "stats", "tools" diff --git a/renv/profiles/4.1/renv/settings.dcf b/renv/profiles/4.1/renv/settings.dcf deleted file mode 100644 index fd205f8..0000000 --- a/renv/profiles/4.1/renv/settings.dcf +++ /dev/null @@ -1,10 +0,0 @@ -bioconductor.version: -external.libraries: -ignored.packages: admiral, admiraldev, admiral.test, admiralci -package.dependency.fields: Imports, Depends, LinkingTo -r.version: -snapshot.type: implicit -use.cache: TRUE -vcs.ignore.cellar: TRUE -vcs.ignore.library: TRUE -vcs.ignore.local: TRUE diff --git a/renv/profiles/4.1/renv/settings.json b/renv/profiles/4.1/renv/settings.json new file mode 100644 index 0000000..4922677 --- /dev/null +++ b/renv/profiles/4.1/renv/settings.json @@ -0,0 +1,25 @@ +{ + "bioconductor.version": null, + "external.libraries": [], + "ignored.packages": [ + "admiral", + "admiraldev", + "admiral.test", + "admiralci", + "pharmaversesdtm" + ], + "package.dependency.fields": [ + "Imports", + "Depends", + "LinkingTo" + ], + "ppm.enabled": null, + "ppm.ignored.urls": [], + "r.version": null, + "snapshot.type": "custom", + "use.cache": true, + "vcs.ignore.cellar": true, + "vcs.ignore.library": true, + "vcs.ignore.local": true, + "vcs.manage.ignores": true +} diff --git a/renv/profiles/4.2/renv.lock b/renv/profiles/4.2/renv.lock index 0bb8fc5..7661270 100644 --- a/renv/profiles/4.2/renv.lock +++ b/renv/profiles/4.2/renv.lock @@ -4,7 +4,7 @@ "Repositories": [ { "Name": "CRAN", - "URL": "https://cloud.r-project.org" + "URL": "https://packagemanager.posit.co/cran/latest" }, { "Name": "RSPM", @@ -192,6 +192,18 @@ ], "Hash": "9b2191ede20fa29828139b9900922e51" }, + "cellranger": { + "Package": "cellranger", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "rematch", + "tibble" + ], + "Hash": "f61dbaec772ccd2e17705c1e872e9e7c" + }, "cli": { "Package": "cli", "Version": "3.6.0", @@ -223,6 +235,13 @@ ], "Hash": "c089a619a7fae175d149d89164f8c7d8" }, + "collections": { + "Package": "collections", + "Version": "0.3.7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "90a0eda114ab0bef170ddbf5ef0cd93f" + }, "commonmark": { "Package": "commonmark", "Version": "1.8.1", @@ -429,7 +448,7 @@ "Package": "dplyr", "Version": "1.1.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -749,6 +768,30 @@ ], "Hash": "8329a9bcc82943c8069104d4be3ee22d" }, + "languageserver": { + "Package": "languageserver", + "Version": "0.3.15", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "callr", + "collections", + "fs", + "jsonlite", + "lintr", + "parallel", + "roxygen2", + "stringi", + "styler", + "tools", + "utils", + "xml2", + "xmlparsedata" + ], + "Hash": "fbea0dd12b4f5dedbe3654e4b9cbbddc" + }, "later": { "Package": "later", "Version": "1.3.0", @@ -876,7 +919,7 @@ "Package": "pillar", "Version": "1.9.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "cli", "fansi", @@ -1007,6 +1050,19 @@ ], "Hash": "e9d21e79848e02e524bea6f5bd53e7e4" }, + "progress": { + "Package": "progress", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R6", + "crayon", + "hms", + "prettyunits" + ], + "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061" + }, "promises": { "Package": "promises", "Version": "1.2.0.1", @@ -1091,6 +1147,28 @@ ], "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4" }, + "readxl": { + "Package": "readxl", + "Version": "1.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cellranger", + "cpp11", + "progress", + "tibble", + "utils" + ], + "Hash": "2e6020b1399d95f947ed867045e9ca17" + }, + "rematch": { + "Package": "rematch", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c66b930d20bb6d858cd18e1cebcfae5c" + }, "rematch2": { "Package": "rematch2", "Version": "2.1.2", @@ -1103,7 +1181,7 @@ }, "remotes": { "Package": "remotes", - "Version": "2.4.2", + "Version": "2.4.2.1", "Source": "Repository", "Repository": "RSPM", "Requirements": [ @@ -1113,17 +1191,17 @@ "tools", "utils" ], - "Hash": "227045be9aee47e6dda9bb38ac870d67" + "Hash": "63d15047eb239f95160112bcadc4fcb9" }, "renv": { "Package": "renv", - "Version": "0.17.0", + "Version": "1.0.0", "Source": "Repository", "Repository": "RSPM", "Requirements": [ "utils" ], - "Hash": "ce3065fc1a0b64a859f55ac3998d6927" + "Hash": "c321cd99d56443dbffd1c9e673c0c1a2" }, "rex": { "Package": "rex", @@ -1173,7 +1251,7 @@ "Package": "roxygen2", "Version": "7.2.3", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -1310,14 +1388,14 @@ }, "staged.dependencies": { "Package": "staged.dependencies", - "Version": "0.2.8", + "Version": "0.3.1", "Source": "GitHub", "RemoteType": "github", "RemoteHost": "api.github.com", "RemoteUsername": "openpharma", "RemoteRepo": "staged.dependencies", "RemoteRef": "main", - "RemoteSha": "ce7c112ba3d75cf48e4dd6310b3140ab0ec3b486", + "RemoteSha": "1ab184a029bef8839a57bb6acd1c5c919cf1fd89", "Requirements": [ "desc", "devtools", @@ -1338,7 +1416,7 @@ "withr", "yaml" ], - "Hash": "89f2e1d1009601f58f64b7092abcc0d7" + "Hash": "ea298f9fb221a8c7ca4c9e55e9c29b48" }, "stringi": { "Package": "stringi", @@ -1587,7 +1665,7 @@ "Package": "vctrs", "Version": "0.6.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "cli", diff --git a/renv/profiles/4.2/renv/settings.dcf b/renv/profiles/4.2/renv/settings.dcf deleted file mode 100644 index fd205f8..0000000 --- a/renv/profiles/4.2/renv/settings.dcf +++ /dev/null @@ -1,10 +0,0 @@ -bioconductor.version: -external.libraries: -ignored.packages: admiral, admiraldev, admiral.test, admiralci -package.dependency.fields: Imports, Depends, LinkingTo -r.version: -snapshot.type: implicit -use.cache: TRUE -vcs.ignore.cellar: TRUE -vcs.ignore.library: TRUE -vcs.ignore.local: TRUE diff --git a/renv/profiles/4.2/renv/settings.json b/renv/profiles/4.2/renv/settings.json new file mode 100644 index 0000000..4922677 --- /dev/null +++ b/renv/profiles/4.2/renv/settings.json @@ -0,0 +1,25 @@ +{ + "bioconductor.version": null, + "external.libraries": [], + "ignored.packages": [ + "admiral", + "admiraldev", + "admiral.test", + "admiralci", + "pharmaversesdtm" + ], + "package.dependency.fields": [ + "Imports", + "Depends", + "LinkingTo" + ], + "ppm.enabled": null, + "ppm.ignored.urls": [], + "r.version": null, + "snapshot.type": "custom", + "use.cache": true, + "vcs.ignore.cellar": true, + "vcs.ignore.library": true, + "vcs.ignore.local": true, + "vcs.manage.ignores": true +} diff --git a/renv/profiles/4.3/renv.lock b/renv/profiles/4.3/renv.lock index b875a5b..1ce40db 100644 --- a/renv/profiles/4.3/renv.lock +++ b/renv/profiles/4.3/renv.lock @@ -1,10 +1,10 @@ { "R": { - "Version": "4.3.0", + "Version": "4.3.1", "Repositories": [ { "Name": "CRAN", - "URL": "https://cloud.r-project.org" + "URL": "https://packagemanager.posit.co/cran/latest" }, { "Name": "RSPM", @@ -192,6 +192,18 @@ ], "Hash": "9b2191ede20fa29828139b9900922e51" }, + "cellranger": { + "Package": "cellranger", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "rematch", + "tibble" + ], + "Hash": "f61dbaec772ccd2e17705c1e872e9e7c" + }, "cli": { "Package": "cli", "Version": "3.6.1", @@ -223,6 +235,13 @@ ], "Hash": "c089a619a7fae175d149d89164f8c7d8" }, + "collections": { + "Package": "collections", + "Version": "0.3.7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "90a0eda114ab0bef170ddbf5ef0cd93f" + }, "commonmark": { "Package": "commonmark", "Version": "1.9.0", @@ -748,6 +767,30 @@ ], "Hash": "8329a9bcc82943c8069104d4be3ee22d" }, + "languageserver": { + "Package": "languageserver", + "Version": "0.3.15", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "callr", + "collections", + "fs", + "jsonlite", + "lintr", + "parallel", + "roxygen2", + "stringi", + "styler", + "tools", + "utils", + "xml2", + "xmlparsedata" + ], + "Hash": "fbea0dd12b4f5dedbe3654e4b9cbbddc" + }, "later": { "Package": "later", "Version": "1.3.0", @@ -1006,6 +1049,19 @@ ], "Hash": "e9d21e79848e02e524bea6f5bd53e7e4" }, + "progress": { + "Package": "progress", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R6", + "crayon", + "hms", + "prettyunits" + ], + "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061" + }, "promises": { "Package": "promises", "Version": "1.2.0.1", @@ -1090,6 +1146,28 @@ ], "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4" }, + "readxl": { + "Package": "readxl", + "Version": "1.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cellranger", + "cpp11", + "progress", + "tibble", + "utils" + ], + "Hash": "2e6020b1399d95f947ed867045e9ca17" + }, + "rematch": { + "Package": "rematch", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c66b930d20bb6d858cd18e1cebcfae5c" + }, "rematch2": { "Package": "rematch2", "Version": "2.1.2", @@ -1102,7 +1180,7 @@ }, "remotes": { "Package": "remotes", - "Version": "2.4.2", + "Version": "2.4.2.1", "Source": "Repository", "Repository": "RSPM", "Requirements": [ @@ -1112,17 +1190,17 @@ "tools", "utils" ], - "Hash": "227045be9aee47e6dda9bb38ac870d67" + "Hash": "63d15047eb239f95160112bcadc4fcb9" }, "renv": { "Package": "renv", - "Version": "0.17.0", + "Version": "1.0.0", "Source": "Repository", "Repository": "RSPM", "Requirements": [ "utils" ], - "Hash": "ce3065fc1a0b64a859f55ac3998d6927" + "Hash": "c321cd99d56443dbffd1c9e673c0c1a2" }, "rex": { "Package": "rex", @@ -1173,7 +1251,7 @@ "Package": "roxygen2", "Version": "7.2.3", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "R6", @@ -1310,14 +1388,14 @@ }, "staged.dependencies": { "Package": "staged.dependencies", - "Version": "0.2.8", + "Version": "0.3.1", "Source": "GitHub", "RemoteType": "github", "RemoteHost": "api.github.com", "RemoteUsername": "openpharma", "RemoteRepo": "staged.dependencies", "RemoteRef": "main", - "RemoteSha": "ce7c112ba3d75cf48e4dd6310b3140ab0ec3b486", + "RemoteSha": "1ab184a029bef8839a57bb6acd1c5c919cf1fd89", "Requirements": [ "desc", "devtools", @@ -1338,7 +1416,7 @@ "withr", "yaml" ], - "Hash": "89f2e1d1009601f58f64b7092abcc0d7" + "Hash": "ea298f9fb221a8c7ca4c9e55e9c29b48" }, "stringi": { "Package": "stringi", diff --git a/renv/profiles/4.3/renv/settings.dcf b/renv/profiles/4.3/renv/settings.dcf deleted file mode 100644 index fd205f8..0000000 --- a/renv/profiles/4.3/renv/settings.dcf +++ /dev/null @@ -1,10 +0,0 @@ -bioconductor.version: -external.libraries: -ignored.packages: admiral, admiraldev, admiral.test, admiralci -package.dependency.fields: Imports, Depends, LinkingTo -r.version: -snapshot.type: implicit -use.cache: TRUE -vcs.ignore.cellar: TRUE -vcs.ignore.library: TRUE -vcs.ignore.local: TRUE diff --git a/renv/profiles/4.3/renv/settings.json b/renv/profiles/4.3/renv/settings.json new file mode 100644 index 0000000..4922677 --- /dev/null +++ b/renv/profiles/4.3/renv/settings.json @@ -0,0 +1,25 @@ +{ + "bioconductor.version": null, + "external.libraries": [], + "ignored.packages": [ + "admiral", + "admiraldev", + "admiral.test", + "admiralci", + "pharmaversesdtm" + ], + "package.dependency.fields": [ + "Imports", + "Depends", + "LinkingTo" + ], + "ppm.enabled": null, + "ppm.ignored.urls": [], + "r.version": null, + "snapshot.type": "custom", + "use.cache": true, + "vcs.ignore.cellar": true, + "vcs.ignore.library": true, + "vcs.ignore.local": true, + "vcs.manage.ignores": true +} diff --git a/renv/settings.dcf b/renv/settings.dcf deleted file mode 100644 index fd205f8..0000000 --- a/renv/settings.dcf +++ /dev/null @@ -1,10 +0,0 @@ -bioconductor.version: -external.libraries: -ignored.packages: admiral, admiraldev, admiral.test, admiralci -package.dependency.fields: Imports, Depends, LinkingTo -r.version: -snapshot.type: implicit -use.cache: TRUE -vcs.ignore.cellar: TRUE -vcs.ignore.library: TRUE -vcs.ignore.local: TRUE diff --git a/renv/settings.json b/renv/settings.json new file mode 100644 index 0000000..3462f3b --- /dev/null +++ b/renv/settings.json @@ -0,0 +1,24 @@ +{ + "bioconductor.version": null, + "external.libraries": [], + "ignored.packages": [ + "admiral", + "admiraldev", + "admiral.test", + "admiralci" + ], + "package.dependency.fields": [ + "Imports", + "Depends", + "LinkingTo" + ], + "ppm.enabled": null, + "ppm.ignored.urls": [], + "r.version": null, + "snapshot.type": "custom", + "use.cache": true, + "vcs.ignore.cellar": true, + "vcs.ignore.library": true, + "vcs.ignore.local": true, + "vcs.manage.ignores": true +}