From 706127425f10a38155cd1d9785641d2790b2f313 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Fri, 11 Oct 2024 11:55:04 +0100 Subject: [PATCH 01/44] * add `renv_lock_pkgs()` function --- `renv_lock_pkgs()` provides the basic functionality of getting the list of R packages present in an renv.lock file. It does NOT handle the versions of those packages or transitive dependencies not directly used in the project. --- NAMESPACE | 1 + R/renv_helpers.R | 32 ++++++++++++++++++++++++++++++ man/renv_lock_pkgs.Rd | 29 +++++++++++++++++++++++++++ tests/testthat/test-renv_helpers.R | 3 +++ 4 files changed, 65 insertions(+) create mode 100644 R/renv_helpers.R create mode 100644 man/renv_lock_pkgs.Rd create mode 100644 tests/testthat/test-renv_helpers.R diff --git a/NAMESPACE b/NAMESPACE index 52022a95..e6c96133 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -3,6 +3,7 @@ export(available_r) export(ga_cachix) export(nix_build) +export(renv_lock_pkgs) export(rix) export(rix_init) export(tar_nix_ga) diff --git a/R/renv_helpers.R b/R/renv_helpers.R new file mode 100644 index 00000000..71cd1dad --- /dev/null +++ b/R/renv_helpers.R @@ -0,0 +1,32 @@ +#' renv_lock_pkgs +#' +#' gets the names of all the packages in an renv.lock file +#' +#' This does NOT get the versions of those packages or handle transitive +#' dependencies in the renv.lock file not directly used in the project. +#' It simply returns a vector of all the package names. +#' +#' @param renv_lock_path location of the renv.lock file from which to get the +#' list of packages, defaults to "renv.lock" +#' +#' @return a character vector of all the package names listed in the renv.lock +#' file proved in renv_lock_path. +#' +#' @export +#' +#' @examples +#' +#' rix(r_pkgs = renv_lock_pkgs()) +#' +renv_lock_pkgs <- function(renv_lock_path = "renv.lock") { + if (!file.exists(renv_lock_path)) { + stop(renv_lock_path," does not exist!") + } + tryCatch( + renv_lock <- jsonlite::read_json(renv_lock_path), + error = function(e) { + stop("Error reading renv.lock file\n", e) + } + ) + names(renv_lock$Packages) +} diff --git a/man/renv_lock_pkgs.Rd b/man/renv_lock_pkgs.Rd new file mode 100644 index 00000000..aca441d0 --- /dev/null +++ b/man/renv_lock_pkgs.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/renv_helpers.R +\name{renv_lock_pkgs} +\alias{renv_lock_pkgs} +\title{renv_lock_pkgs} +\usage{ +renv_lock_pkgs(renv_lock_path = "renv.lock") +} +\arguments{ +\item{renv_lock_path}{location of the renv.lock file from which to get the +list of packages, defaults to "renv.lock"} +} +\value{ +a character vector of all the package names listed in the renv.lock +file proved in renv_lock_path. +} +\description{ +gets the names of all the packages in an renv.lock file +} +\details{ +This does NOT get the versions of those packages or handle transitive +dependencies in the renv.lock file not directly used in the project. +It simply returns a vector of all the package names. +} +\examples{ + +rix(r_pkgs = renv_lock_pkgs()) + +} diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R new file mode 100644 index 00000000..cbb7e9ed --- /dev/null +++ b/tests/testthat/test-renv_helpers.R @@ -0,0 +1,3 @@ +testthat::test_that("Testing `renv_lock_pkgs()`", { + expect_error(renv_lock_pkgs(), "renv.lock does not exist") +}) From 803bfd73d4d151460c88b29c0ecb0ffca7089300 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Fri, 11 Oct 2024 13:18:03 +0100 Subject: [PATCH 02/44] factor out reading renv.lock --- NAMESPACE | 1 + R/renv_helpers.R | 33 ++++++++++++++++++++++++--------- man/renv_lock_r_ver.Rd | 24 ++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 man/renv_lock_r_ver.Rd diff --git a/NAMESPACE b/NAMESPACE index e6c96133..fd1aa927 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -15,6 +15,7 @@ importFrom(curl,handle_reset) importFrom(curl,has_internet) importFrom(curl,new_handle) importFrom(jsonlite,fromJSON) +importFrom(jsonlite,read_json) importFrom(stats,na.omit) importFrom(tools,pskill) importFrom(utils,data) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 71cd1dad..9f7fb3cf 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -1,3 +1,25 @@ +#' read_renv_lock +#' +#' Reads renv.lock if it exists and can be parsed as json. +#' +#' @param renv_lock_path location of the renv.lock file, defaults to "renv.lock" +#' +#' @return the result of reading renv.lock with [jsonlite::read_json] +#' +#' @importFrom jsonlite read_json +read_renv_lock <- function(renv_lock_path = "renv.lock") { + if (!file.exists(renv_lock_path)) { + stop(renv_lock_path," does not exist!") + } + tryCatch( + renv_lock <- jsonlite::read_json(renv_lock_path), + error = function(e) { + stop("Error reading renv.lock file\n", e) + } + ) + renv_lock +} + #' renv_lock_pkgs #' #' gets the names of all the packages in an renv.lock file @@ -19,14 +41,7 @@ #' rix(r_pkgs = renv_lock_pkgs()) #' renv_lock_pkgs <- function(renv_lock_path = "renv.lock") { - if (!file.exists(renv_lock_path)) { - stop(renv_lock_path," does not exist!") - } - tryCatch( - renv_lock <- jsonlite::read_json(renv_lock_path), - error = function(e) { - stop("Error reading renv.lock file\n", e) - } - ) + renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) names(renv_lock$Packages) } + diff --git a/man/renv_lock_r_ver.Rd b/man/renv_lock_r_ver.Rd new file mode 100644 index 00000000..cacf98a8 --- /dev/null +++ b/man/renv_lock_r_ver.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/renv_helpers.R +\name{renv_lock_r_ver} +\alias{renv_lock_r_ver} +\title{renv_lock_r_ver} +\usage{ +renv_lock_r_ver(renv_lock_path = "renv.lock") +} +\arguments{ +\item{renv_lock_path}{location of the renv.lock file from which to get the +R version, defaults to "renv.lock"} +} +\value{ +a length 1 chatacter vector with the version of R recorded in +renv.lock +} +\description{ +renv_lock_r_ver +} +\examples{ + +rix(r_ver = renv_lock_r_ver()) + +} From 8387137f11097cff23e1ba79e75ab229ebc24f99 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Fri, 11 Oct 2024 13:19:35 +0100 Subject: [PATCH 03/44] * add `renv_lock_r_ver()` function --- `renv_lock_r_ver()` retrieves the R version from an renv.lock file. --- NAMESPACE | 1 + R/renv_helpers.R | 19 +++++++++++++++++++ man/read_renv_lock.Rd | 17 +++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 man/read_renv_lock.Rd diff --git a/NAMESPACE b/NAMESPACE index fd1aa927..c321bd26 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,6 +4,7 @@ export(available_r) export(ga_cachix) export(nix_build) export(renv_lock_pkgs) +export(renv_lock_r_ver) export(rix) export(rix_init) export(tar_nix_ga) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 9f7fb3cf..9adad068 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -45,3 +45,22 @@ renv_lock_pkgs <- function(renv_lock_path = "renv.lock") { names(renv_lock$Packages) } +#' renv_lock_r_ver +#' +#' @param renv_lock_path location of the renv.lock file from which to get the +#' R version, defaults to "renv.lock" +#' +#' @return a length 1 chatacter vector with the version of R recorded in +#' renv.lock +#' +#' @export +#' +#' @examples +#' +#' rix(r_ver = renv_lock_r_ver()) +#' +renv_lock_r_ver <- function(renv_lock_path = "renv.lock") { + renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) + renv_lock$R$Version +} + diff --git a/man/read_renv_lock.Rd b/man/read_renv_lock.Rd new file mode 100644 index 00000000..fad33fc9 --- /dev/null +++ b/man/read_renv_lock.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/renv_helpers.R +\name{read_renv_lock} +\alias{read_renv_lock} +\title{read_renv_lock} +\usage{ +read_renv_lock(renv_lock_path = "renv.lock") +} +\arguments{ +\item{renv_lock_path}{location of the renv.lock file, defaults to "renv.lock"} +} +\value{ +the result of reading renv.lock with \link[jsonlite:read_json]{jsonlite::read_json} +} +\description{ +Reads renv.lock if it exists and can be parsed as json. +} From 701eafa53a00de6cc1439e578a37e732fef8ba63 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Fri, 11 Oct 2024 13:54:57 +0100 Subject: [PATCH 04/44] * add simple non-standard repo filtering to `renv_lock_pkgs()` function --- adds the `exclude_other_sources` option to `renv_lock_pkgs()` and defaults it to TRUE. This excludes packages from being returned if the do not have "Repository" as their value for "Source" in renv.lock the and throws a warning listing the excluded packages. This should exclude packages from sources like github which are not presently like to be packaged in nix. --- R/renv_helpers.R | 28 ++++++++++++++++++++++++++-- man/renv_lock_pkgs.Rd | 6 +++++- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 9adad068..b4bf4e05 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -30,6 +30,9 @@ read_renv_lock <- function(renv_lock_path = "renv.lock") { #' #' @param renv_lock_path location of the renv.lock file from which to get the #' list of packages, defaults to "renv.lock" +#' @param exclude_other_sources exclude packages not from Repository sources +#' such as those from github repositories, defaults to TRUE. These are likely +#' to not yet be packaged in nix. #' #' @return a character vector of all the package names listed in the renv.lock #' file proved in renv_lock_path. @@ -40,9 +43,30 @@ read_renv_lock <- function(renv_lock_path = "renv.lock") { #' #' rix(r_pkgs = renv_lock_pkgs()) #' -renv_lock_pkgs <- function(renv_lock_path = "renv.lock") { +renv_lock_pkgs <- function( + renv_lock_path = "renv.lock", exclude_other_sources = TRUE + ) { renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) - names(renv_lock$Packages) + repo_pkgs_lgl <- logical(length = length(renv_lock$Packages)) + for (i in seq_along(renv_lock$Packages)) { + if (renv_lock$Packages[[i]]$Source == "Repository") { + repo_pkgs_lgl[i] <- TRUE + } else { + repo_pkgs_lgl[i] <- FALSE + } + } + if (any(!repo_pkgs_lgl)) { + # note + # When a development version of a package that might be available in + # in other versions in nix in installed from github this approach + # excludes such packages + warning( + "found packages with a Source other than Repository", + ", These will be excluded\nExcluding: ", + paste(names(renv_lock$Packages[!repo_pkgs_lgl]), collapse = ", ") + ) + } + names(renv_lock$Packages[repo_pkgs_lgl]) } #' renv_lock_r_ver diff --git a/man/renv_lock_pkgs.Rd b/man/renv_lock_pkgs.Rd index aca441d0..f745633f 100644 --- a/man/renv_lock_pkgs.Rd +++ b/man/renv_lock_pkgs.Rd @@ -4,11 +4,15 @@ \alias{renv_lock_pkgs} \title{renv_lock_pkgs} \usage{ -renv_lock_pkgs(renv_lock_path = "renv.lock") +renv_lock_pkgs(renv_lock_path = "renv.lock", exclude_other_sources = TRUE) } \arguments{ \item{renv_lock_path}{location of the renv.lock file from which to get the list of packages, defaults to "renv.lock"} + +\item{exclude_other_sources}{exclude packages not from Repository sources +such as those from github repositories, defaults to TRUE. These are likely +to not yet be packaged in nix.} } \value{ a character vector of all the package names listed in the renv.lock From 2e74fcd7c8da5081eea052fe56eda84f980d08d0 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Fri, 11 Oct 2024 19:24:29 +0100 Subject: [PATCH 05/44] * add `renv2nix()` function --- add `renv2nix()` wraps `rix()` and populates `r_ver`, `r_pkgs`, `git_pkgs`, and `local_r_pkgs` based on an `renv.lock` file. --- NAMESPACE | 1 + R/renv_helpers.R | 64 ++++++++++++++++++++++++++++++++++++++++++++++++ man/renv2nix.Rd | 19 ++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 man/renv2nix.Rd diff --git a/NAMESPACE b/NAMESPACE index c321bd26..baf9bd35 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -3,6 +3,7 @@ export(available_r) export(ga_cachix) export(nix_build) +export(renv2nix) export(renv_lock_pkgs) export(renv_lock_r_ver) export(rix) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index b4bf4e05..c6fa7092 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -20,6 +20,70 @@ read_renv_lock <- function(renv_lock_path = "renv.lock") { renv_lock } +#' renv2nix +#' +#' @param renv_lock_path location of the renv.lock file, defaults to "renv.lock" +#' @param ... any other paramters to pass to [rix] +#' +#' @return nothing side effects only +#' @export +#' +renv2nix <- function(renv_lock_path = "renv.lock", ...) { + renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) + repo_pkgs_lgl <- logical(length = length(renv_lock$Packages)) + for (i in seq_along(renv_lock$Packages)) { + if (renv_lock$Packages[[i]]$Source == "Repository") { + repo_pkgs_lgl[i] <- TRUE + } else { + repo_pkgs_lgl[i] <- FALSE + } + } + git_pkgs <- NULL + local_r_pkgs <- NULL + # remotes package supports these types + # github (is assumed) gitlab,bitbucket, git, local, svn, url, version, cran, bioc. + # may need handling for ssh and any other support non https protocols? + if (any(!repo_pkgs_lgl)) { + for (x in renv_lock$Packages[!repo_pkgs_lgl]) { + if (x$RemoteType == "github") { + git_pkgs[[x$Package]] <- list( + package_name = x$Package, + repo_url = paste0( + # RemoteHost is listed as api.github.com for some reason + "https://github.com/", x$RemoteUser, "/", + x$RemoteRepo + ), + commit = x$RemoteSha + ) + # this may work with other git remotes and possibly also bitbucket / svn needs checking + } else if (x$RemoteType == "gitlab") { + git_pkgs[[x$Package]] <- list ( + package_name = x$Package, + repo_url = paste0( + "https://", x$RemoteHost, "/", x$RemoteUser, "/", + x$RemoteRepo + ), + commit = x$RemoteSha + ) + } + # as local_r_pkgs expects an archive not sure how to set type here.. + # else if (x$RemoteType == "local") else { + # local_r_pkgs[[x$Package]] <- c( + # package_name = paste0(x$RemoteUrl, "/", x$Package, ".tar.gz") + # ) + # } + } + } + rix( + r_ver = renv_lock$R$Version, + r_pkgs = names(renv_lock$Packages[repo_pkgs_lgl]), + git_pkgs = git_pkgs, + local_r_pkgs = local_r_pkgs, + ... + ) +} + + #' renv_lock_pkgs #' #' gets the names of all the packages in an renv.lock file diff --git a/man/renv2nix.Rd b/man/renv2nix.Rd new file mode 100644 index 00000000..61bea81c --- /dev/null +++ b/man/renv2nix.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/renv_helpers.R +\name{renv2nix} +\alias{renv2nix} +\title{renv2nix} +\usage{ +renv2nix(renv_lock_path = "renv.lock", ...) +} +\arguments{ +\item{renv_lock_path}{location of the renv.lock file, defaults to "renv.lock"} + +\item{...}{any other paramters to pass to \link{rix}} +} +\value{ +nothing side effects only +} +\description{ +renv2nix +} From 8e4e0a22b547f362b75bb6deb7fd23175d576137 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Fri, 11 Oct 2024 22:43:41 +0100 Subject: [PATCH 06/44] * add `return_rix_call` argument to `renv2nix()` function --- The `return_rix_call` argument allows `renv2rix()` to return the call to the rix function instead of evaluating it, this allows or debugging the call. --- R/renv_helpers.R | 16 +++++++++++++--- man/renv2nix.Rd | 5 ++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index c6fa7092..1de84965 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -23,12 +23,16 @@ read_renv_lock <- function(renv_lock_path = "renv.lock") { #' renv2nix #' #' @param renv_lock_path location of the renv.lock file, defaults to "renv.lock" +#' @param return_rix_call return the generated rix function call instead of +#' evaluating it this is for debugging purposes, defaults to FALSE #' @param ... any other paramters to pass to [rix] #' #' @return nothing side effects only #' @export #' -renv2nix <- function(renv_lock_path = "renv.lock", ...) { +renv2nix <- function( + renv_lock_path = "renv.lock", return_rix_call = FALSE, ... +) { renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) repo_pkgs_lgl <- logical(length = length(renv_lock$Packages)) for (i in seq_along(renv_lock$Packages)) { @@ -74,13 +78,19 @@ renv2nix <- function(renv_lock_path = "renv.lock", ...) { # } } } - rix( + rix_call <- call("rix", r_ver = renv_lock$R$Version, r_pkgs = names(renv_lock$Packages[repo_pkgs_lgl]), git_pkgs = git_pkgs, local_r_pkgs = local_r_pkgs, - ... + list(...) ) + if (return_rix_call) { + # print(rix_call) + # return(deparse(substitute(rix_call))) + return(rix_call) + } + eval(rix_call) } diff --git a/man/renv2nix.Rd b/man/renv2nix.Rd index 61bea81c..48cc5f94 100644 --- a/man/renv2nix.Rd +++ b/man/renv2nix.Rd @@ -4,11 +4,14 @@ \alias{renv2nix} \title{renv2nix} \usage{ -renv2nix(renv_lock_path = "renv.lock", ...) +renv2nix(renv_lock_path = "renv.lock", return_rix_call = FALSE, ...) } \arguments{ \item{renv_lock_path}{location of the renv.lock file, defaults to "renv.lock"} +\item{return_rix_call}{return the generated rix function call instead of +evaluating it this is for debugging purposes, defaults to FALSE} + \item{...}{any other paramters to pass to \link{rix}} } \value{ From 926102f6f0b9f68c553ada70096ee1ac36c6a7de Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Fri, 11 Oct 2024 22:46:28 +0100 Subject: [PATCH 07/44] * remove the now unnecessary `renv_lock_pkgs()` function --- NAMESPACE | 1 - R/renv_helpers.R | 50 ------------------------------------------- man/renv_lock_pkgs.Rd | 33 ---------------------------- 3 files changed, 84 deletions(-) delete mode 100644 man/renv_lock_pkgs.Rd diff --git a/NAMESPACE b/NAMESPACE index baf9bd35..dc02923e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,7 +4,6 @@ export(available_r) export(ga_cachix) export(nix_build) export(renv2nix) -export(renv_lock_pkgs) export(renv_lock_r_ver) export(rix) export(rix_init) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 1de84965..872b4c64 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -93,56 +93,6 @@ renv2nix <- function( eval(rix_call) } - -#' renv_lock_pkgs -#' -#' gets the names of all the packages in an renv.lock file -#' -#' This does NOT get the versions of those packages or handle transitive -#' dependencies in the renv.lock file not directly used in the project. -#' It simply returns a vector of all the package names. -#' -#' @param renv_lock_path location of the renv.lock file from which to get the -#' list of packages, defaults to "renv.lock" -#' @param exclude_other_sources exclude packages not from Repository sources -#' such as those from github repositories, defaults to TRUE. These are likely -#' to not yet be packaged in nix. -#' -#' @return a character vector of all the package names listed in the renv.lock -#' file proved in renv_lock_path. -#' -#' @export -#' -#' @examples -#' -#' rix(r_pkgs = renv_lock_pkgs()) -#' -renv_lock_pkgs <- function( - renv_lock_path = "renv.lock", exclude_other_sources = TRUE - ) { - renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) - repo_pkgs_lgl <- logical(length = length(renv_lock$Packages)) - for (i in seq_along(renv_lock$Packages)) { - if (renv_lock$Packages[[i]]$Source == "Repository") { - repo_pkgs_lgl[i] <- TRUE - } else { - repo_pkgs_lgl[i] <- FALSE - } - } - if (any(!repo_pkgs_lgl)) { - # note - # When a development version of a package that might be available in - # in other versions in nix in installed from github this approach - # excludes such packages - warning( - "found packages with a Source other than Repository", - ", These will be excluded\nExcluding: ", - paste(names(renv_lock$Packages[!repo_pkgs_lgl]), collapse = ", ") - ) - } - names(renv_lock$Packages[repo_pkgs_lgl]) -} - #' renv_lock_r_ver #' #' @param renv_lock_path location of the renv.lock file from which to get the diff --git a/man/renv_lock_pkgs.Rd b/man/renv_lock_pkgs.Rd deleted file mode 100644 index f745633f..00000000 --- a/man/renv_lock_pkgs.Rd +++ /dev/null @@ -1,33 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/renv_helpers.R -\name{renv_lock_pkgs} -\alias{renv_lock_pkgs} -\title{renv_lock_pkgs} -\usage{ -renv_lock_pkgs(renv_lock_path = "renv.lock", exclude_other_sources = TRUE) -} -\arguments{ -\item{renv_lock_path}{location of the renv.lock file from which to get the -list of packages, defaults to "renv.lock"} - -\item{exclude_other_sources}{exclude packages not from Repository sources -such as those from github repositories, defaults to TRUE. These are likely -to not yet be packaged in nix.} -} -\value{ -a character vector of all the package names listed in the renv.lock -file proved in renv_lock_path. -} -\description{ -gets the names of all the packages in an renv.lock file -} -\details{ -This does NOT get the versions of those packages or handle transitive -dependencies in the renv.lock file not directly used in the project. -It simply returns a vector of all the package names. -} -\examples{ - -rix(r_pkgs = renv_lock_pkgs()) - -} From 700e014f7561f307c190394145ebb23d08fac181 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Sat, 12 Oct 2024 12:27:39 +0100 Subject: [PATCH 08/44] bugfix: renv2nix dots not properly epanded when constructing rix call --- R/renv_helpers.R | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 872b4c64..f8922a67 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -32,6 +32,7 @@ read_renv_lock <- function(renv_lock_path = "renv.lock") { #' renv2nix <- function( renv_lock_path = "renv.lock", return_rix_call = FALSE, ... + ) { renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) repo_pkgs_lgl <- logical(length = length(renv_lock$Packages)) @@ -82,9 +83,13 @@ renv2nix <- function( r_ver = renv_lock$R$Version, r_pkgs = names(renv_lock$Packages[repo_pkgs_lgl]), git_pkgs = git_pkgs, - local_r_pkgs = local_r_pkgs, - list(...) + local_r_pkgs = local_r_pkgs ) + dots <- list(...) + for(arg in names(dots)) { + rix_call[[arg]] <- dots[[arg]] + } + if (return_rix_call) { # print(rix_call) # return(deparse(substitute(rix_call))) From eed8e9a033f79714306af747ff6a42fc46b7e16b Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Sat, 12 Oct 2024 15:33:29 +0100 Subject: [PATCH 09/44] * add `renv_remote_pkgs()` function, factors out generating `git_pkgs` information --- The `renv_remote_pkgs()` function takes a single renv.lock package entry as an argument, infers it's remote type and extracts the informaton necesary for `rix()`'s `git_pkgs` argument. This functionality was factored out of the `renv2nix()`, and the `method` argument added `renv2nix()` to allow for a future implementation of exact package version matching. --- R/renv_helpers.R | 152 ++++++++++++++++++++++++---------------- man/renv2nix.Rd | 9 ++- man/renv_remote_pkgs.Rd | 31 ++++++++ 3 files changed, 131 insertions(+), 61 deletions(-) create mode 100644 man/renv_remote_pkgs.Rd diff --git a/R/renv_helpers.R b/R/renv_helpers.R index f8922a67..32698e5d 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -20,82 +20,116 @@ read_renv_lock <- function(renv_lock_path = "renv.lock") { renv_lock } +#' renv_remote_pkgs +#' +#' Construct a list to be passed in a list to the git_pkgs argument of [rix] +#' The list returned contains the information necessary to have nix attempt to +#' build the package from an external repository. +#' +#' @param renv_lock_pkg_info a the list representation of a single package +#' entry from an renv.lock file. +#' @param type the type of remote package, defaults to the RemoteType of the +#' renv entry. +#' currently supported types: 'github' 'gitlab' +#' see [remotes](https://remotes.r-lib.org/) for more. +#' +#' @return a list with three elements named: +#' "package_name", "repo_url", "commit" +#' +#' @examples +#' \dontrun{ +#' renv_remote_pkgs(read_renv_lock()$Packages$renv) +#' } +renv_remote_pkgs <- function( + renv_lock_pkg_info, + type = renv_lock_pkg_info$RemoteType +) { + type <- match.arg(type, c( + "github", "gitlab" + # , "bitbucket", "git", "local", "svn", "url", "version", "cran", "bioc" + )) + pkg_info <- vector(mode = "list", length = 3) + names(pkg_info) <- c("package_name", "repo_url", "commit") + switch (type, + "github" = { + pkg_info[[1]] <- renv_lock_pkg_info$Package + pkg_info[[2]] <- paste0( + # RemoteHost is listed as api.github.com for some reason + "https://github.com/", renv_lock_pkg_info$RemoteUser, "/", + renv_lock_pkg_info$RemoteRepo + ) + pkg_info[[3]] <- renv_lock_pkg_info$RemoteSha + }, + "gitlab" = { + pkg_info[[1]] <- renv_lock_pkg_info$Package + pkg_info[[2]] <- paste0( + "https://", renv_lock_pkg_info$RemoteHost, "/", + renv_lock_pkg_info$RemoteUser, "/", + renv_lock_pkg_info$RemoteRepo + ) + pkg_info[[3]] <- renv_lock_pkg_info$RemoteSha + } + ) + pkg_info +} + #' renv2nix #' #' @param renv_lock_path location of the renv.lock file, defaults to "renv.lock" #' @param return_rix_call return the generated rix function call instead of #' evaluating it this is for debugging purposes, defaults to FALSE -#' @param ... any other paramters to pass to [rix] +#' @param ... any other parameters to pass to [rix] #' #' @return nothing side effects only #' @export #' renv2nix <- function( - renv_lock_path = "renv.lock", return_rix_call = FALSE, ... - + renv_lock_path = "renv.lock", + return_rix_call = FALSE, + method = "fast", + ... ) { + method <- match.arg(method, c("fast", "accurate")) renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) - repo_pkgs_lgl <- logical(length = length(renv_lock$Packages)) - for (i in seq_along(renv_lock$Packages)) { - if (renv_lock$Packages[[i]]$Source == "Repository") { - repo_pkgs_lgl[i] <- TRUE - } else { - repo_pkgs_lgl[i] <- FALSE + if (method == "fast") { + repo_pkgs_lgl <- logical(length = length(renv_lock$Packages)) + for (i in seq_along(renv_lock$Packages)) { + if (renv_lock$Packages[[i]]$Source == "Repository") { + repo_pkgs_lgl[i] <- TRUE + } else { + repo_pkgs_lgl[i] <- FALSE + } } - } - git_pkgs <- NULL - local_r_pkgs <- NULL - # remotes package supports these types - # github (is assumed) gitlab,bitbucket, git, local, svn, url, version, cran, bioc. - # may need handling for ssh and any other support non https protocols? - if (any(!repo_pkgs_lgl)) { - for (x in renv_lock$Packages[!repo_pkgs_lgl]) { - if (x$RemoteType == "github") { - git_pkgs[[x$Package]] <- list( - package_name = x$Package, - repo_url = paste0( - # RemoteHost is listed as api.github.com for some reason - "https://github.com/", x$RemoteUser, "/", - x$RemoteRepo - ), - commit = x$RemoteSha - ) - # this may work with other git remotes and possibly also bitbucket / svn needs checking - } else if (x$RemoteType == "gitlab") { - git_pkgs[[x$Package]] <- list ( - package_name = x$Package, - repo_url = paste0( - "https://", x$RemoteHost, "/", x$RemoteUser, "/", - x$RemoteRepo - ), - commit = x$RemoteSha - ) + git_pkgs <- NULL + # as local_r_pkgs expects an archive not sure how to set type here.. + # local_r_pkgs <- NULL + if (any(!repo_pkgs_lgl)) { + for (x in renv_lock$Packages[!repo_pkgs_lgl]) { + git_pkgs[[x$Package]] <- renv_remote_pkgs(x) } - # as local_r_pkgs expects an archive not sure how to set type here.. - # else if (x$RemoteType == "local") else { - # local_r_pkgs[[x$Package]] <- c( - # package_name = paste0(x$RemoteUrl, "/", x$Package, ".tar.gz") - # ) - # } } - } - rix_call <- call("rix", - r_ver = renv_lock$R$Version, - r_pkgs = names(renv_lock$Packages[repo_pkgs_lgl]), - git_pkgs = git_pkgs, - local_r_pkgs = local_r_pkgs - ) - dots <- list(...) - for(arg in names(dots)) { - rix_call[[arg]] <- dots[[arg]] - } + rix_call <- call("rix", + r_ver = renv_lock$R$Version, + r_pkgs = names(renv_lock$Packages[repo_pkgs_lgl]), + git_pkgs = git_pkgs#, + #local_r_pkgs = local_r_pkgs + ) + dots <- list(...) + for(arg in names(dots)) { + rix_call[[arg]] <- dots[[arg]] + } - if (return_rix_call) { - # print(rix_call) - # return(deparse(substitute(rix_call))) - return(rix_call) + if (return_rix_call) { + # print(rix_call) + return(rix_call) + } + eval(rix_call) + } else { + stop( + "'accurate' renv based environments with package version matching", + " is not yet implemented :(" + ) } - eval(rix_call) } #' renv_lock_r_ver diff --git a/man/renv2nix.Rd b/man/renv2nix.Rd index 48cc5f94..bf2c3063 100644 --- a/man/renv2nix.Rd +++ b/man/renv2nix.Rd @@ -4,7 +4,12 @@ \alias{renv2nix} \title{renv2nix} \usage{ -renv2nix(renv_lock_path = "renv.lock", return_rix_call = FALSE, ...) +renv2nix( + renv_lock_path = "renv.lock", + return_rix_call = FALSE, + method = "fast", + ... +) } \arguments{ \item{renv_lock_path}{location of the renv.lock file, defaults to "renv.lock"} @@ -12,7 +17,7 @@ renv2nix(renv_lock_path = "renv.lock", return_rix_call = FALSE, ...) \item{return_rix_call}{return the generated rix function call instead of evaluating it this is for debugging purposes, defaults to FALSE} -\item{...}{any other paramters to pass to \link{rix}} +\item{...}{any other parameters to pass to \link{rix}} } \value{ nothing side effects only diff --git a/man/renv_remote_pkgs.Rd b/man/renv_remote_pkgs.Rd new file mode 100644 index 00000000..963cdfed --- /dev/null +++ b/man/renv_remote_pkgs.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/renv_helpers.R +\name{renv_remote_pkgs} +\alias{renv_remote_pkgs} +\title{renv_remote_pkgs} +\usage{ +renv_remote_pkgs(renv_lock_pkg_info, type = renv_lock_pkg_info$RemoteType) +} +\arguments{ +\item{renv_lock_pkg_info}{a the list representation of a single package +entry from an renv.lock file.} + +\item{type}{the type of remote package, defaults to the RemoteType of the +renv entry. +currently supported types: 'github' 'gitlab' +see \href{https://remotes.r-lib.org/}{remotes} for more.} +} +\value{ +a list with three elements named: +"package_name", "repo_url", "commit" +} +\description{ +Construct a list to be passed in a list to the git_pkgs argument of \link{rix} +The list returned contains the information necessary to have nix attempt to +build the package from an external repository. +} +\examples{ +\dontrun{ +renv_remote_pkgs(read_renv_lock()$Packages$renv) +} +} From e4b86ef1b2b0377762195ad1c4a77b81a2701f28 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Sat, 12 Oct 2024 15:47:02 +0100 Subject: [PATCH 10/44] * rename `renv_remote_pkgs()` to `renv_remote_pkg()` as it only handles single pkgs --- R/renv_helpers.R | 6 +++--- man/{renv_remote_pkgs.Rd => renv_remote_pkg.Rd} | 8 ++++---- man/rix_init.Rd | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) rename man/{renv_remote_pkgs.Rd => renv_remote_pkg.Rd} (84%) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 32698e5d..654f27d1 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -20,7 +20,7 @@ read_renv_lock <- function(renv_lock_path = "renv.lock") { renv_lock } -#' renv_remote_pkgs +#' renv_remote_pkg #' #' Construct a list to be passed in a list to the git_pkgs argument of [rix] #' The list returned contains the information necessary to have nix attempt to @@ -40,7 +40,7 @@ read_renv_lock <- function(renv_lock_path = "renv.lock") { #' \dontrun{ #' renv_remote_pkgs(read_renv_lock()$Packages$renv) #' } -renv_remote_pkgs <- function( +renv_remote_pkg <- function( renv_lock_pkg_info, type = renv_lock_pkg_info$RemoteType ) { @@ -105,7 +105,7 @@ renv2nix <- function( # local_r_pkgs <- NULL if (any(!repo_pkgs_lgl)) { for (x in renv_lock$Packages[!repo_pkgs_lgl]) { - git_pkgs[[x$Package]] <- renv_remote_pkgs(x) + git_pkgs[[x$Package]] <- renv_remote_pkg(x) } } rix_call <- call("rix", diff --git a/man/renv_remote_pkgs.Rd b/man/renv_remote_pkg.Rd similarity index 84% rename from man/renv_remote_pkgs.Rd rename to man/renv_remote_pkg.Rd index 963cdfed..d8ef597d 100644 --- a/man/renv_remote_pkgs.Rd +++ b/man/renv_remote_pkg.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/renv_helpers.R -\name{renv_remote_pkgs} -\alias{renv_remote_pkgs} -\title{renv_remote_pkgs} +\name{renv_remote_pkg} +\alias{renv_remote_pkg} +\title{renv_remote_pkg} \usage{ -renv_remote_pkgs(renv_lock_pkg_info, type = renv_lock_pkg_info$RemoteType) +renv_remote_pkg(renv_lock_pkg_info, type = renv_lock_pkg_info$RemoteType) } \arguments{ \item{renv_lock_pkg_info}{a the list representation of a single package diff --git a/man/rix_init.Rd b/man/rix_init.Rd index 17325288..bafee124 100644 --- a/man/rix_init.Rd +++ b/man/rix_init.Rd @@ -62,7 +62,7 @@ later R session setup: \enumerate{ \item \strong{Adjusting \code{R_LIBS_USER} path:} By default, the first path of \code{R_LIBS_USER} points to the user library -outside the Nix store (see also \code{\link[base:libPaths]{base::.libPaths()}}). This creates +outside the Nix store (see also \code{\link[base:.libPaths]{base::.libPaths()}}). This creates friction and potential impurity as R packages from the system's R user library are loaded. While this feature can be useful for interactively testing an R package in a Nix environment before adding it to a \code{.nix} From be0ffa2cee917b04d7b12189a453184facde64fb Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Sun, 13 Oct 2024 17:30:39 +0100 Subject: [PATCH 11/44] remove test for old `renv_lock_pkgs()` function --- tests/testthat/test-renv_helpers.R | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index cbb7e9ed..1879a1de 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -1,3 +1 @@ -testthat::test_that("Testing `renv_lock_pkgs()`", { - expect_error(renv_lock_pkgs(), "renv.lock does not exist") }) From 7c108be816013f4e6040c6b46eef394fb6f1a3ee Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Sun, 13 Oct 2024 17:31:15 +0100 Subject: [PATCH 12/44] add simple tests for `renv_read_lock()` --- tests/testthat/test-renv_helpers.R | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 1879a1de..3b185229 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -1 +1,8 @@ +testthat::test_that("Testing `read_renv_lock()`", { + testthat::expect_error(read_renv_lock("nosuchfile"), "nosuchfile does not exist") + tmpf <- tempfile() + cat("not json", file = tmpf) + testthat::expect_error(read_renv_lock(tmpf), "Error reading renv\\.lock file") + unlink(tmpf) }) + From c34d9081cc08d3e8eb2257ddeab7c547400c8632 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Sun, 13 Oct 2024 17:33:14 +0100 Subject: [PATCH 13/44] add simple tests for `renv_remote_pkg()` --- tests/testthat/test-renv_helpers.R | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 3b185229..186a5dd5 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -6,3 +6,40 @@ testthat::test_that("Testing `read_renv_lock()`", { unlink(tmpf) }) +testthat::test_that("Testing `renv_remote_pkg()`", { + synthetic_renv_lock_example <- list( + githubpkg = list( + Package = "githubpkg", + RemoteType = "github", + RemoteUser = "user", + RemoteRepo = "repo", + RemoteSha = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz", + RemoteHost = "api.github.com" + ), + gitlabpkg = list( + Package = "gitlabpkg", + RemoteType = "gitlab", + RemoteUser = "user", + RemoteRepo = "repo", + RemoteSha = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh", + RemoteHost = "gitlab.com" + ) + ) + + expected_git_pkg <- list( + githubpkg = list( + package_name = "githubpkg", + repo_url = "https://github.com/user/repo", + commit = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz" + ), + gitlabpkg = list( + package_name = "gitlabpkg", + repo_url = "https://gitlab.com/user/repo", + commit = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh" + ) + ) + + testthat::expect_equal(renv_remote_pkg(synthetic_renv_lock_example$githubpkg), expected_git_pkg$githubpkg) + testthat::expect_equal(renv_remote_pkg(synthetic_renv_lock_example$gitlabpkg), expected_git_pkg$gitlabpkg) +}) + From d75319db11e632c98f2db163ce565929f79dae83 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Sun, 13 Oct 2024 17:37:16 +0100 Subject: [PATCH 14/44] add simple tests for `renv_lock_r_ver()` --- tests/testthat/test-renv_helpers.R | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 186a5dd5..b5a40709 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -43,3 +43,10 @@ testthat::test_that("Testing `renv_remote_pkg()`", { testthat::expect_equal(renv_remote_pkg(synthetic_renv_lock_example$gitlabpkg), expected_git_pkg$gitlabpkg) }) +testthat::test_that("Testing `renv_lock_r_ver()`", { + tmpf <- tempfile() + synthetic_renv_lock_example <- jsonlite::write_json(list(R = list(Version = "4.4.1")), tmpf, auto_unbox = TRUE) + testthat::expect_equal(renv_lock_r_ver(renv_lock_path = tmpf), "4.4.1") + unlink(tmpf) +}) + From bd52c7d03f8f70be1dfb312ed9f9d65ce04420ba Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Sun, 13 Oct 2024 18:14:13 +0100 Subject: [PATCH 15/44] add simple tests for `renv2nix()` --- tests/testthat/test-renv_helpers.R | 60 ++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index b5a40709..415f5835 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -43,6 +43,66 @@ testthat::test_that("Testing `renv_remote_pkg()`", { testthat::expect_equal(renv_remote_pkg(synthetic_renv_lock_example$gitlabpkg), expected_git_pkg$gitlabpkg) }) +testthat::test_that("Testing `renv2nix()`", { + synthetic_renv_lock_example <- list( + R = list(Version = "4.4.1"), + Packages = list( + MASS = list( + Package = "MASS", + Version = "7.3-56", + Source = "Repository", + Repository = "CRAN", + Hash = "af0e1955cb80bb36b7988cc657db261e", + Requirements = c() + ), + R6 = list( + Package = "R6", + Version = "2.5.1", + Source = "Repository", + Repository = "RSPM", + Hash = "470851b6d5d0ac559e9d01bb352b4021", + Requirements = c() + ), + githubpkg = list( + Package = "githubpkg", + Source = "GitHub", + RemoteType = "github", + RemoteUser = "user", + RemoteRepo = "repo", + RemoteSha = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz", + RemoteHost = "api.github.com" + ), + gitlabpkg = list( + Package = "gitlabpkg", + Source = "GitLab", + RemoteType = "gitlab", + RemoteUser = "user", + RemoteRepo = "repo", + RemoteSha = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh", + RemoteHost = "gitlab.com" + ) + ) + ) + tmpf <- tempfile() + jsonlite::write_json(synthetic_renv_lock_example, tmpf, auto_unbox = TRUE) + test_call <- call( + "rix", r_ver = "4.4.1", r_pkgs = c("MASS", "R6"), git_pkgs = list( + githubpkg = list( + package_name = "githubpkg", + repo_url = "https://github.com/user/repo", + commit = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz" + ), + gitlabpkg = list( + package_name = "gitlabpkg", + repo_url = "https://gitlab.com/user/repo", + commit = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh" + ) + ) + ) + testthat::expect_equal(test_call, renv2nix(tmpf, return_rix_call = TRUE)) + unlink(tmpf) +}) + testthat::test_that("Testing `renv_lock_r_ver()`", { tmpf <- tempfile() synthetic_renv_lock_example <- jsonlite::write_json(list(R = list(Version = "4.4.1")), tmpf, auto_unbox = TRUE) From 72f930e40a7dbff83bb137932b1b0e87e5798ead Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Sun, 13 Oct 2024 18:15:20 +0100 Subject: [PATCH 16/44] remove unnecessary asignment --- tests/testthat/test-renv_helpers.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 415f5835..68012841 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -105,7 +105,7 @@ testthat::test_that("Testing `renv2nix()`", { testthat::test_that("Testing `renv_lock_r_ver()`", { tmpf <- tempfile() - synthetic_renv_lock_example <- jsonlite::write_json(list(R = list(Version = "4.4.1")), tmpf, auto_unbox = TRUE) + jsonlite::write_json(list(R = list(Version = "4.4.1")), tmpf, auto_unbox = TRUE) testthat::expect_equal(renv_lock_r_ver(renv_lock_path = tmpf), "4.4.1") unlink(tmpf) }) From de7dfb2bc3e2c2f853a63f70f69f52d4065a985f Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Sun, 13 Oct 2024 18:53:32 +0100 Subject: [PATCH 17/44] wrap overlong lines --- tests/testthat/test-renv_helpers.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 68012841..bb83e424 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -39,8 +39,12 @@ testthat::test_that("Testing `renv_remote_pkg()`", { ) ) - testthat::expect_equal(renv_remote_pkg(synthetic_renv_lock_example$githubpkg), expected_git_pkg$githubpkg) - testthat::expect_equal(renv_remote_pkg(synthetic_renv_lock_example$gitlabpkg), expected_git_pkg$gitlabpkg) + testthat::expect_equal( + renv_remote_pkg(synthetic_renv_lock_example$githubpkg), expected_git_pkg$githubpkg + ) + testthat::expect_equal( + renv_remote_pkg(synthetic_renv_lock_example$gitlabpkg), expected_git_pkg$gitlabpkg + ) }) testthat::test_that("Testing `renv2nix()`", { From 730bad139b99d757c432154d7d47a66526c45803 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Sun, 13 Oct 2024 19:00:14 +0100 Subject: [PATCH 18/44] styler styling --- R/renv_helpers.R | 161 ++++++++++++----------- tests/testthat/test-renv_helpers.R | 198 ++++++++++++++--------------- 2 files changed, 178 insertions(+), 181 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 654f27d1..260e6227 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -8,16 +8,16 @@ #' #' @importFrom jsonlite read_json read_renv_lock <- function(renv_lock_path = "renv.lock") { - if (!file.exists(renv_lock_path)) { - stop(renv_lock_path," does not exist!") + if (!file.exists(renv_lock_path)) { + stop(renv_lock_path, " does not exist!") + } + tryCatch( + renv_lock <- jsonlite::read_json(renv_lock_path), + error = function(e) { + stop("Error reading renv.lock file\n", e) } - tryCatch( - renv_lock <- jsonlite::read_json(renv_lock_path), - error = function(e) { - stop("Error reading renv.lock file\n", e) - } - ) - renv_lock + ) + renv_lock } #' renv_remote_pkg @@ -42,35 +42,34 @@ read_renv_lock <- function(renv_lock_path = "renv.lock") { #' } renv_remote_pkg <- function( renv_lock_pkg_info, - type = renv_lock_pkg_info$RemoteType -) { - type <- match.arg(type, c( - "github", "gitlab" - # , "bitbucket", "git", "local", "svn", "url", "version", "cran", "bioc" - )) - pkg_info <- vector(mode = "list", length = 3) - names(pkg_info) <- c("package_name", "repo_url", "commit") - switch (type, - "github" = { - pkg_info[[1]] <- renv_lock_pkg_info$Package - pkg_info[[2]] <- paste0( - # RemoteHost is listed as api.github.com for some reason - "https://github.com/", renv_lock_pkg_info$RemoteUser, "/", - renv_lock_pkg_info$RemoteRepo - ) - pkg_info[[3]] <- renv_lock_pkg_info$RemoteSha - }, - "gitlab" = { - pkg_info[[1]] <- renv_lock_pkg_info$Package - pkg_info[[2]] <- paste0( - "https://", renv_lock_pkg_info$RemoteHost, "/", - renv_lock_pkg_info$RemoteUser, "/", - renv_lock_pkg_info$RemoteRepo - ) - pkg_info[[3]] <- renv_lock_pkg_info$RemoteSha - } - ) - pkg_info + type = renv_lock_pkg_info$RemoteType) { + type <- match.arg(type, c( + "github", "gitlab" + # , "bitbucket", "git", "local", "svn", "url", "version", "cran", "bioc" + )) + pkg_info <- vector(mode = "list", length = 3) + names(pkg_info) <- c("package_name", "repo_url", "commit") + switch(type, + "github" = { + pkg_info[[1]] <- renv_lock_pkg_info$Package + pkg_info[[2]] <- paste0( + # RemoteHost is listed as api.github.com for some reason + "https://github.com/", renv_lock_pkg_info$RemoteUser, "/", + renv_lock_pkg_info$RemoteRepo + ) + pkg_info[[3]] <- renv_lock_pkg_info$RemoteSha + }, + "gitlab" = { + pkg_info[[1]] <- renv_lock_pkg_info$Package + pkg_info[[2]] <- paste0( + "https://", renv_lock_pkg_info$RemoteHost, "/", + renv_lock_pkg_info$RemoteUser, "/", + renv_lock_pkg_info$RemoteRepo + ) + pkg_info[[3]] <- renv_lock_pkg_info$RemoteSha + } + ) + pkg_info } #' renv2nix @@ -87,49 +86,48 @@ renv2nix <- function( renv_lock_path = "renv.lock", return_rix_call = FALSE, method = "fast", - ... -) { - method <- match.arg(method, c("fast", "accurate")) - renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) - if (method == "fast") { - repo_pkgs_lgl <- logical(length = length(renv_lock$Packages)) - for (i in seq_along(renv_lock$Packages)) { - if (renv_lock$Packages[[i]]$Source == "Repository") { - repo_pkgs_lgl[i] <- TRUE - } else { - repo_pkgs_lgl[i] <- FALSE - } - } - git_pkgs <- NULL - # as local_r_pkgs expects an archive not sure how to set type here.. - # local_r_pkgs <- NULL - if (any(!repo_pkgs_lgl)) { - for (x in renv_lock$Packages[!repo_pkgs_lgl]) { - git_pkgs[[x$Package]] <- renv_remote_pkg(x) - } - } - rix_call <- call("rix", - r_ver = renv_lock$R$Version, - r_pkgs = names(renv_lock$Packages[repo_pkgs_lgl]), - git_pkgs = git_pkgs#, - #local_r_pkgs = local_r_pkgs - ) - dots <- list(...) - for(arg in names(dots)) { - rix_call[[arg]] <- dots[[arg]] - } + ...) { + method <- match.arg(method, c("fast", "accurate")) + renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) + if (method == "fast") { + repo_pkgs_lgl <- logical(length = length(renv_lock$Packages)) + for (i in seq_along(renv_lock$Packages)) { + if (renv_lock$Packages[[i]]$Source == "Repository") { + repo_pkgs_lgl[i] <- TRUE + } else { + repo_pkgs_lgl[i] <- FALSE + } + } + git_pkgs <- NULL + # as local_r_pkgs expects an archive not sure how to set type here.. + # local_r_pkgs <- NULL + if (any(!repo_pkgs_lgl)) { + for (x in renv_lock$Packages[!repo_pkgs_lgl]) { + git_pkgs[[x$Package]] <- renv_remote_pkg(x) + } + } + rix_call <- call("rix", + r_ver = renv_lock$R$Version, + r_pkgs = names(renv_lock$Packages[repo_pkgs_lgl]), + git_pkgs = git_pkgs # , + # local_r_pkgs = local_r_pkgs + ) + dots <- list(...) + for (arg in names(dots)) { + rix_call[[arg]] <- dots[[arg]] + } - if (return_rix_call) { - # print(rix_call) - return(rix_call) - } - eval(rix_call) - } else { - stop( - "'accurate' renv based environments with package version matching", - " is not yet implemented :(" - ) + if (return_rix_call) { + # print(rix_call) + return(rix_call) } + eval(rix_call) + } else { + stop( + "'accurate' renv based environments with package version matching", + " is not yet implemented :(" + ) + } } #' renv_lock_r_ver @@ -147,7 +145,6 @@ renv2nix <- function( #' rix(r_ver = renv_lock_r_ver()) #' renv_lock_r_ver <- function(renv_lock_path = "renv.lock") { - renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) - renv_lock$R$Version + renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) + renv_lock$R$Version } - diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index bb83e424..a868656c 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -1,116 +1,116 @@ testthat::test_that("Testing `read_renv_lock()`", { - testthat::expect_error(read_renv_lock("nosuchfile"), "nosuchfile does not exist") - tmpf <- tempfile() - cat("not json", file = tmpf) - testthat::expect_error(read_renv_lock(tmpf), "Error reading renv\\.lock file") - unlink(tmpf) + testthat::expect_error(read_renv_lock("nosuchfile"), "nosuchfile does not exist") + tmpf <- tempfile() + cat("not json", file = tmpf) + testthat::expect_error(read_renv_lock(tmpf), "Error reading renv\\.lock file") + unlink(tmpf) }) testthat::test_that("Testing `renv_remote_pkg()`", { - synthetic_renv_lock_example <- list( - githubpkg = list( - Package = "githubpkg", - RemoteType = "github", - RemoteUser = "user", - RemoteRepo = "repo", - RemoteSha = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz", - RemoteHost = "api.github.com" - ), - gitlabpkg = list( - Package = "gitlabpkg", - RemoteType = "gitlab", - RemoteUser = "user", - RemoteRepo = "repo", - RemoteSha = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh", - RemoteHost = "gitlab.com" - ) + synthetic_renv_lock_example <- list( + githubpkg = list( + Package = "githubpkg", + RemoteType = "github", + RemoteUser = "user", + RemoteRepo = "repo", + RemoteSha = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz", + RemoteHost = "api.github.com" + ), + gitlabpkg = list( + Package = "gitlabpkg", + RemoteType = "gitlab", + RemoteUser = "user", + RemoteRepo = "repo", + RemoteSha = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh", + RemoteHost = "gitlab.com" ) + ) - expected_git_pkg <- list( - githubpkg = list( - package_name = "githubpkg", - repo_url = "https://github.com/user/repo", - commit = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz" - ), - gitlabpkg = list( - package_name = "gitlabpkg", - repo_url = "https://gitlab.com/user/repo", - commit = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh" - ) + expected_git_pkg <- list( + githubpkg = list( + package_name = "githubpkg", + repo_url = "https://github.com/user/repo", + commit = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz" + ), + gitlabpkg = list( + package_name = "gitlabpkg", + repo_url = "https://gitlab.com/user/repo", + commit = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh" ) + ) - testthat::expect_equal( - renv_remote_pkg(synthetic_renv_lock_example$githubpkg), expected_git_pkg$githubpkg - ) - testthat::expect_equal( - renv_remote_pkg(synthetic_renv_lock_example$gitlabpkg), expected_git_pkg$gitlabpkg - ) + testthat::expect_equal( + renv_remote_pkg(synthetic_renv_lock_example$githubpkg), expected_git_pkg$githubpkg + ) + testthat::expect_equal( + renv_remote_pkg(synthetic_renv_lock_example$gitlabpkg), expected_git_pkg$gitlabpkg + ) }) testthat::test_that("Testing `renv2nix()`", { - synthetic_renv_lock_example <- list( - R = list(Version = "4.4.1"), - Packages = list( - MASS = list( - Package = "MASS", - Version = "7.3-56", - Source = "Repository", - Repository = "CRAN", - Hash = "af0e1955cb80bb36b7988cc657db261e", - Requirements = c() - ), - R6 = list( - Package = "R6", - Version = "2.5.1", - Source = "Repository", - Repository = "RSPM", - Hash = "470851b6d5d0ac559e9d01bb352b4021", - Requirements = c() - ), - githubpkg = list( - Package = "githubpkg", - Source = "GitHub", - RemoteType = "github", - RemoteUser = "user", - RemoteRepo = "repo", - RemoteSha = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz", - RemoteHost = "api.github.com" - ), - gitlabpkg = list( - Package = "gitlabpkg", - Source = "GitLab", - RemoteType = "gitlab", - RemoteUser = "user", - RemoteRepo = "repo", - RemoteSha = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh", - RemoteHost = "gitlab.com" - ) - ) + synthetic_renv_lock_example <- list( + R = list(Version = "4.4.1"), + Packages = list( + MASS = list( + Package = "MASS", + Version = "7.3-56", + Source = "Repository", + Repository = "CRAN", + Hash = "af0e1955cb80bb36b7988cc657db261e", + Requirements = c() + ), + R6 = list( + Package = "R6", + Version = "2.5.1", + Source = "Repository", + Repository = "RSPM", + Hash = "470851b6d5d0ac559e9d01bb352b4021", + Requirements = c() + ), + githubpkg = list( + Package = "githubpkg", + Source = "GitHub", + RemoteType = "github", + RemoteUser = "user", + RemoteRepo = "repo", + RemoteSha = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz", + RemoteHost = "api.github.com" + ), + gitlabpkg = list( + Package = "gitlabpkg", + Source = "GitLab", + RemoteType = "gitlab", + RemoteUser = "user", + RemoteRepo = "repo", + RemoteSha = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh", + RemoteHost = "gitlab.com" + ) ) - tmpf <- tempfile() - jsonlite::write_json(synthetic_renv_lock_example, tmpf, auto_unbox = TRUE) - test_call <- call( - "rix", r_ver = "4.4.1", r_pkgs = c("MASS", "R6"), git_pkgs = list( - githubpkg = list( - package_name = "githubpkg", - repo_url = "https://github.com/user/repo", - commit = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz" - ), - gitlabpkg = list( - package_name = "gitlabpkg", - repo_url = "https://gitlab.com/user/repo", - commit = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh" - ) - ) + ) + tmpf <- tempfile() + jsonlite::write_json(synthetic_renv_lock_example, tmpf, auto_unbox = TRUE) + test_call <- call( + "rix", + r_ver = "4.4.1", r_pkgs = c("MASS", "R6"), git_pkgs = list( + githubpkg = list( + package_name = "githubpkg", + repo_url = "https://github.com/user/repo", + commit = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz" + ), + gitlabpkg = list( + package_name = "gitlabpkg", + repo_url = "https://gitlab.com/user/repo", + commit = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh" + ) ) - testthat::expect_equal(test_call, renv2nix(tmpf, return_rix_call = TRUE)) - unlink(tmpf) + ) + testthat::expect_equal(test_call, renv2nix(tmpf, return_rix_call = TRUE)) + unlink(tmpf) }) testthat::test_that("Testing `renv_lock_r_ver()`", { - tmpf <- tempfile() - jsonlite::write_json(list(R = list(Version = "4.4.1")), tmpf, auto_unbox = TRUE) - testthat::expect_equal(renv_lock_r_ver(renv_lock_path = tmpf), "4.4.1") - unlink(tmpf) + tmpf <- tempfile() + jsonlite::write_json(list(R = list(Version = "4.4.1")), tmpf, auto_unbox = TRUE) + testthat::expect_equal(renv_lock_r_ver(renv_lock_path = tmpf), "4.4.1") + unlink(tmpf) }) - From e7a5d0841afe5cadcbf4ab9a827c169967673d14 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Mon, 14 Oct 2024 13:53:26 +0100 Subject: [PATCH 19/44] update `renv2nix()` documentation with the return type when `return_rix_call = TRUE` --- R/renv_helpers.R | 3 ++- man/renv2nix.Rd | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 260e6227..117d7f31 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -79,7 +79,8 @@ renv_remote_pkg <- function( #' evaluating it this is for debugging purposes, defaults to FALSE #' @param ... any other parameters to pass to [rix] #' -#' @return nothing side effects only +#' @return nothing side effects only, unless `return_rix_call = TRUE` in which case an unevaluated +#' call to the [rix] function is returned #' @export #' renv2nix <- function( diff --git a/man/renv2nix.Rd b/man/renv2nix.Rd index bf2c3063..73566543 100644 --- a/man/renv2nix.Rd +++ b/man/renv2nix.Rd @@ -20,7 +20,8 @@ evaluating it this is for debugging purposes, defaults to FALSE} \item{...}{any other parameters to pass to \link{rix}} } \value{ -nothing side effects only +nothing side effects only, unless \code{return_rix_call = TRUE} in which case an unevaluated +call to the \link{rix} function is returned } \description{ renv2nix From ebb17b36fe5e4c2586b233958b81288b37675cf4 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Mon, 14 Oct 2024 13:54:21 +0100 Subject: [PATCH 20/44] fix typo in `renv_lock_r_ver()` documentation --- R/renv_helpers.R | 2 +- man/renv_lock_r_ver.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 117d7f31..01c28be6 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -136,7 +136,7 @@ renv2nix <- function( #' @param renv_lock_path location of the renv.lock file from which to get the #' R version, defaults to "renv.lock" #' -#' @return a length 1 chatacter vector with the version of R recorded in +#' @return a length 1 character vector with the version of R recorded in #' renv.lock #' #' @export diff --git a/man/renv_lock_r_ver.Rd b/man/renv_lock_r_ver.Rd index cacf98a8..e4e9b8f4 100644 --- a/man/renv_lock_r_ver.Rd +++ b/man/renv_lock_r_ver.Rd @@ -11,7 +11,7 @@ renv_lock_r_ver(renv_lock_path = "renv.lock") R version, defaults to "renv.lock"} } \value{ -a length 1 chatacter vector with the version of R recorded in +a length 1 character vector with the version of R recorded in renv.lock } \description{ From f717e9a4d134033acbc64fa8e86176eae752f15a Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Mon, 14 Oct 2024 14:06:41 +0100 Subject: [PATCH 21/44] document `renv2nix()` `method` argument and list "accurate" the second option --- R/renv_helpers.R | 10 +++++++++- man/renv2nix.Rd | 11 ++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 01c28be6..0b11bbc2 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -77,6 +77,14 @@ renv_remote_pkg <- function( #' @param renv_lock_path location of the renv.lock file, defaults to "renv.lock" #' @param return_rix_call return the generated rix function call instead of #' evaluating it this is for debugging purposes, defaults to FALSE +#' @param method the method of generating a nix environment from and renv.lock file. +#' "fast" is an inexact conversion which simply extracts the R version and a list of all the +#' packages in an renv.lock file and adds them to the `r_pkgs` argument of [rix], unless they +#' are from external package repositories such as being installed directly from a github +#' repository in which case an attempt is made to handle them and pass them to the +#' `git_pkgs` argument of [rix] +#' +#' Currently defaults to "fast", "accurate" is not yet implemented #' @param ... any other parameters to pass to [rix] #' #' @return nothing side effects only, unless `return_rix_call = TRUE` in which case an unevaluated @@ -86,7 +94,7 @@ renv_remote_pkg <- function( renv2nix <- function( renv_lock_path = "renv.lock", return_rix_call = FALSE, - method = "fast", + method = c("fast", "accurate"), ...) { method <- match.arg(method, c("fast", "accurate")) renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) diff --git a/man/renv2nix.Rd b/man/renv2nix.Rd index 73566543..78880c5c 100644 --- a/man/renv2nix.Rd +++ b/man/renv2nix.Rd @@ -7,7 +7,7 @@ renv2nix( renv_lock_path = "renv.lock", return_rix_call = FALSE, - method = "fast", + method = c("fast", "accurate"), ... ) } @@ -17,6 +17,15 @@ renv2nix( \item{return_rix_call}{return the generated rix function call instead of evaluating it this is for debugging purposes, defaults to FALSE} +\item{method}{the method of generating a nix environment from and renv.lock file. +"fast" is an inexact conversion which simply extracts the R version and a list of all the +packages in an renv.lock file and adds them to the \code{r_pkgs} argument of \link{rix}, unless they +are from external package repositories such as being installed directly from a github +repository in which case an attempt is made to handle them and pass them to the +\code{git_pkgs} argument of \link{rix} + +Currently defaults to "fast", "accurate" is not yet implemented} + \item{...}{any other parameters to pass to \link{rix}} } \value{ From 0f9de7290325be6beedde83ac6fa4c46c3487522 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Tue, 15 Oct 2024 09:45:38 +0100 Subject: [PATCH 22/44] do not export `renv_lock_r_ver()` --- NAMESPACE | 1 - R/renv_helpers.R | 2 -- 2 files changed, 3 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index dc02923e..9b83def7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,7 +4,6 @@ export(available_r) export(ga_cachix) export(nix_build) export(renv2nix) -export(renv_lock_r_ver) export(rix) export(rix_init) export(tar_nix_ga) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 0b11bbc2..2474d9fb 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -147,8 +147,6 @@ renv2nix <- function( #' @return a length 1 character vector with the version of R recorded in #' renv.lock #' -#' @export -#' #' @examples #' #' rix(r_ver = renv_lock_r_ver()) From 68ebf8adcf8f9568942b0552f31558b1a66fcff4 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Tue, 15 Oct 2024 10:35:11 +0100 Subject: [PATCH 23/44] * add `renv_remote_pkgs()` --- Returns a list of package information suitable to supply to the `git_pkgs` argument of `rix()` --- R/renv_helpers.R | 23 ++++++++++++++++++++--- man/renv_remote_pkgs.Rd | 25 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 man/renv_remote_pkgs.Rd diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 2474d9fb..c7a5319d 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -72,6 +72,25 @@ renv_remote_pkg <- function( pkg_info } +#' renv_remote_pkgs +#' +#' Construct a list to be passed the git_pkgs argument of [rix] +#' The list returned contains the information necessary to have nix attempt to +#' build the packages from their external repositories. +#' +#' @param renv_lock_pkgs the list of package information from an renv.lock file. +#' +#' @return a list of lists with three elements named: +#' "package_name", "repo_url", "commit" +#' +#' @examples +#' \dontrun{ +#' renv_remote_pkgs(read_renv_lock()$Packages) +#' } +renv_remote_pkgs <- function(renv_lock_pkgs) { + lapply(renv_lock_pkgs, renv_remote_pkg) +} + #' renv2nix #' #' @param renv_lock_path location of the renv.lock file, defaults to "renv.lock" @@ -111,9 +130,7 @@ renv2nix <- function( # as local_r_pkgs expects an archive not sure how to set type here.. # local_r_pkgs <- NULL if (any(!repo_pkgs_lgl)) { - for (x in renv_lock$Packages[!repo_pkgs_lgl]) { - git_pkgs[[x$Package]] <- renv_remote_pkg(x) - } + git_pkgs <- renv_remote_pkgs(renv_lock$Packages[!repo_pkgs_lgl]) } rix_call <- call("rix", r_ver = renv_lock$R$Version, diff --git a/man/renv_remote_pkgs.Rd b/man/renv_remote_pkgs.Rd new file mode 100644 index 00000000..c4ec0c98 --- /dev/null +++ b/man/renv_remote_pkgs.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/renv_helpers.R +\name{renv_remote_pkgs} +\alias{renv_remote_pkgs} +\title{renv_remote_pkgs} +\usage{ +renv_remote_pkgs(renv_lock_pkgs) +} +\arguments{ +\item{renv_lock_pkgs}{the list of package information from an renv.lock file.} +} +\value{ +a list of lists with three elements named: +"package_name", "repo_url", "commit" +} +\description{ +Construct a list to be passed the git_pkgs argument of \link{rix} +The list returned contains the information necessary to have nix attempt to +build the packages from their external repositories. +} +\examples{ +\dontrun{ +renv_remote_pkgs(read_renv_lock()$Packages) +} +} From 43137b97f9c8f5b4499e0f1406f6a9e6329531e2 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Tue, 15 Oct 2024 13:45:34 +0100 Subject: [PATCH 24/44] add remote type checking and assertion --- R/renv_helpers.R | 18 ++++++++++++++++-- man/renv_remote_pkgs.Rd | 7 ++++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index c7a5319d..4a564f87 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -47,6 +47,12 @@ renv_remote_pkg <- function( "github", "gitlab" # , "bitbucket", "git", "local", "svn", "url", "version", "cran", "bioc" )) + if (type != renv_lock_pkg_info$RemoteType) { + stop( + "Remote type (", renv_lock_pkg_info$RemoteType, + ") does not match the provided type (", type , ")" + ) + } pkg_info <- vector(mode = "list", length = 3) names(pkg_info) <- c("package_name", "repo_url", "commit") switch(type, @@ -79,6 +85,10 @@ renv_remote_pkg <- function( #' build the packages from their external repositories. #' #' @param renv_lock_pkgs the list of package information from an renv.lock file. +#' @param type the type of remote package, defaults to NULL meaning the RemoteType of the +#' renv entry will be used. +#' currently supported types: 'github' 'gitlab' +#' see [remotes](https://remotes.r-lib.org/) for more. #' #' @return a list of lists with three elements named: #' "package_name", "repo_url", "commit" @@ -87,8 +97,12 @@ renv_remote_pkg <- function( #' \dontrun{ #' renv_remote_pkgs(read_renv_lock()$Packages) #' } -renv_remote_pkgs <- function(renv_lock_pkgs) { - lapply(renv_lock_pkgs, renv_remote_pkg) +renv_remote_pkgs <- function(renv_lock_pkgs, type = NULL) { + if (is.null(type)) { + lapply(renv_lock_pkgs, renv_remote_pkg) + } else { + lapply(renv_lock_pkgs, renv_remote_pkg, type) + } } #' renv2nix diff --git a/man/renv_remote_pkgs.Rd b/man/renv_remote_pkgs.Rd index c4ec0c98..14844a1a 100644 --- a/man/renv_remote_pkgs.Rd +++ b/man/renv_remote_pkgs.Rd @@ -4,10 +4,15 @@ \alias{renv_remote_pkgs} \title{renv_remote_pkgs} \usage{ -renv_remote_pkgs(renv_lock_pkgs) +renv_remote_pkgs(renv_lock_pkgs, type = NULL) } \arguments{ \item{renv_lock_pkgs}{the list of package information from an renv.lock file.} + +\item{type}{the type of remote package, defaults to NULL meaning the RemoteType of the +renv entry will be used. +currently supported types: 'github' 'gitlab' +see \href{https://remotes.r-lib.org/}{remotes} for more.} } \value{ a list of lists with three elements named: From 7bd3d50827b6c8005c11e57b3e01110e8fb1423c Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Wed, 16 Oct 2024 11:48:11 +0100 Subject: [PATCH 25/44] skip unsupported remote types in `renv2nix()` with warning --- R/renv_helpers.R | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 4a564f87..bbbdafa2 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -136,15 +136,24 @@ renv2nix <- function( for (i in seq_along(renv_lock$Packages)) { if (renv_lock$Packages[[i]]$Source == "Repository") { repo_pkgs_lgl[i] <- TRUE - } else { + } else if (renv_lock$Packages[[i]]$RemoteType %in% c("github", "gitlab")) { repo_pkgs_lgl[i] <- FALSE + } else { + repo_pkgs_lgl[i] <- NA + warning( + renv_lock$Packages[[i]]$Package, " has the unsupported remote type ", + renv_lock$Packages[[i]]$RemoteType, " and will not be included in the Nix environment.", + "\n Consider manually specifying the git remote or a local package install." + ) } } git_pkgs <- NULL # as local_r_pkgs expects an archive not sure how to set type here.. # local_r_pkgs <- NULL - if (any(!repo_pkgs_lgl)) { - git_pkgs <- renv_remote_pkgs(renv_lock$Packages[!repo_pkgs_lgl]) + if (isTRUE(any(!repo_pkgs_lgl))) { + remote_pkgs_lgl <- !repo_pkgs_lgl + remote_pkgs_lgl[is.na(remote_pkgs_lgl)] <- FALSE + git_pkgs <- renv_remote_pkgs(renv_lock$Packages[remote_pkgs_lgl]) } rix_call <- call("rix", r_ver = renv_lock$R$Version, From d24730d4ccc8fe484141d13a90c0490cd2fad075 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Wed, 16 Oct 2024 12:00:42 +0100 Subject: [PATCH 26/44] * remove `renv_remote_pkg()` refactoring into `renv_remote_pkgs()`, with type assertion handling --- Ability to allow remote type inference with error for unsupported types as well as to assert a remote type expected for all pkgs --- R/renv_helpers.R | 117 +++++++++++++++++++--------------------- man/renv_remote_pkg.Rd | 31 ----------- man/renv_remote_pkgs.Rd | 6 +-- 3 files changed, 57 insertions(+), 97 deletions(-) delete mode 100644 man/renv_remote_pkg.Rd diff --git a/R/renv_helpers.R b/R/renv_helpers.R index bbbdafa2..813ee1ff 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -20,64 +20,6 @@ read_renv_lock <- function(renv_lock_path = "renv.lock") { renv_lock } -#' renv_remote_pkg -#' -#' Construct a list to be passed in a list to the git_pkgs argument of [rix] -#' The list returned contains the information necessary to have nix attempt to -#' build the package from an external repository. -#' -#' @param renv_lock_pkg_info a the list representation of a single package -#' entry from an renv.lock file. -#' @param type the type of remote package, defaults to the RemoteType of the -#' renv entry. -#' currently supported types: 'github' 'gitlab' -#' see [remotes](https://remotes.r-lib.org/) for more. -#' -#' @return a list with three elements named: -#' "package_name", "repo_url", "commit" -#' -#' @examples -#' \dontrun{ -#' renv_remote_pkgs(read_renv_lock()$Packages$renv) -#' } -renv_remote_pkg <- function( - renv_lock_pkg_info, - type = renv_lock_pkg_info$RemoteType) { - type <- match.arg(type, c( - "github", "gitlab" - # , "bitbucket", "git", "local", "svn", "url", "version", "cran", "bioc" - )) - if (type != renv_lock_pkg_info$RemoteType) { - stop( - "Remote type (", renv_lock_pkg_info$RemoteType, - ") does not match the provided type (", type , ")" - ) - } - pkg_info <- vector(mode = "list", length = 3) - names(pkg_info) <- c("package_name", "repo_url", "commit") - switch(type, - "github" = { - pkg_info[[1]] <- renv_lock_pkg_info$Package - pkg_info[[2]] <- paste0( - # RemoteHost is listed as api.github.com for some reason - "https://github.com/", renv_lock_pkg_info$RemoteUser, "/", - renv_lock_pkg_info$RemoteRepo - ) - pkg_info[[3]] <- renv_lock_pkg_info$RemoteSha - }, - "gitlab" = { - pkg_info[[1]] <- renv_lock_pkg_info$Package - pkg_info[[2]] <- paste0( - "https://", renv_lock_pkg_info$RemoteHost, "/", - renv_lock_pkg_info$RemoteUser, "/", - renv_lock_pkg_info$RemoteRepo - ) - pkg_info[[3]] <- renv_lock_pkg_info$RemoteSha - } - ) - pkg_info -} - #' renv_remote_pkgs #' #' Construct a list to be passed the git_pkgs argument of [rix] @@ -97,12 +39,61 @@ renv_remote_pkg <- function( #' \dontrun{ #' renv_remote_pkgs(read_renv_lock()$Packages) #' } -renv_remote_pkgs <- function(renv_lock_pkgs, type = NULL) { - if (is.null(type)) { - lapply(renv_lock_pkgs, renv_remote_pkg) - } else { - lapply(renv_lock_pkgs, renv_remote_pkg, type) +renv_remote_pkgs <- function( + renv_lock_remote_pkgs, type = NULL) { + # , "bitbucket", "git", "local", "svn", "url", "version", "cran", "bioc" + if(!(is.null(type) || (type %in% c("github","gitlab")))) { + stop("Unsupported type: ", type) + } + initial_type_state <- type + git_pkgs <- vector(mode = "list", length = length(renv_lock_remote_pkgs)) + names(git_pkgs) <- names(renv_lock_remote_pkgs) + for (i in seq_along(renv_lock_remote_pkgs)) { + renv_lock_pkg_info <- renv_lock_remote_pkgs[[i]] + if(is.null(type)){ + if(is.null(renv_lock_pkg_info$RemoteType)){ + stop( + "Not a package installed from a remote outside of the main package repositories\n", + "renv_remote_pkgs() only handles pkgs where remote type is specified" + ) + } else { + type <- renv_lock_pkg_info$RemoteType + } + } else { + if (type != renv_lock_pkg_info$RemoteType) { + stop( + "Remote type (", renv_lock_pkg_info$RemoteType, + ") does not match the provided type (", type , ")" + ) + } + } + + pkg_info <- vector(mode = "list", length = 3) + names(pkg_info) <- c("package_name", "repo_url", "commit") + switch(type, + "github" = { + pkg_info[[1]] <- renv_lock_pkg_info$Package + pkg_info[[2]] <- paste0( + # RemoteHost is listed as api.github.com for some reason + "https://github.com/", renv_lock_pkg_info$RemoteUser, "/", + renv_lock_pkg_info$RemoteRepo + ) + pkg_info[[3]] <- renv_lock_pkg_info$RemoteSha + }, + "gitlab" = { + pkg_info[[1]] <- renv_lock_pkg_info$Package + pkg_info[[2]] <- paste0( + "https://", renv_lock_pkg_info$RemoteHost, "/", + renv_lock_pkg_info$RemoteUser, "/", + renv_lock_pkg_info$RemoteRepo + ) + pkg_info[[3]] <- renv_lock_pkg_info$RemoteSha + } + ) + type <- initial_type_state + git_pkgs[[i]] <- pkg_info } + git_pkgs } #' renv2nix diff --git a/man/renv_remote_pkg.Rd b/man/renv_remote_pkg.Rd deleted file mode 100644 index d8ef597d..00000000 --- a/man/renv_remote_pkg.Rd +++ /dev/null @@ -1,31 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/renv_helpers.R -\name{renv_remote_pkg} -\alias{renv_remote_pkg} -\title{renv_remote_pkg} -\usage{ -renv_remote_pkg(renv_lock_pkg_info, type = renv_lock_pkg_info$RemoteType) -} -\arguments{ -\item{renv_lock_pkg_info}{a the list representation of a single package -entry from an renv.lock file.} - -\item{type}{the type of remote package, defaults to the RemoteType of the -renv entry. -currently supported types: 'github' 'gitlab' -see \href{https://remotes.r-lib.org/}{remotes} for more.} -} -\value{ -a list with three elements named: -"package_name", "repo_url", "commit" -} -\description{ -Construct a list to be passed in a list to the git_pkgs argument of \link{rix} -The list returned contains the information necessary to have nix attempt to -build the package from an external repository. -} -\examples{ -\dontrun{ -renv_remote_pkgs(read_renv_lock()$Packages$renv) -} -} diff --git a/man/renv_remote_pkgs.Rd b/man/renv_remote_pkgs.Rd index 14844a1a..e43b49bd 100644 --- a/man/renv_remote_pkgs.Rd +++ b/man/renv_remote_pkgs.Rd @@ -4,15 +4,15 @@ \alias{renv_remote_pkgs} \title{renv_remote_pkgs} \usage{ -renv_remote_pkgs(renv_lock_pkgs, type = NULL) +renv_remote_pkgs(renv_lock_remote_pkgs, type = NULL) } \arguments{ -\item{renv_lock_pkgs}{the list of package information from an renv.lock file.} - \item{type}{the type of remote package, defaults to NULL meaning the RemoteType of the renv entry will be used. currently supported types: 'github' 'gitlab' see \href{https://remotes.r-lib.org/}{remotes} for more.} + +\item{renv_lock_pkgs}{the list of package information from an renv.lock file.} } \value{ a list of lists with three elements named: From 753c30b4a15e40ed3cb7abd6b8a9c46ab3bf87d7 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Wed, 23 Oct 2024 13:36:27 +0100 Subject: [PATCH 27/44] nest renv_helper tests to keep example inputs out of the global namespace --- tests/testthat/test-renv_helpers.R | 122 ++++++++++++----------------- 1 file changed, 52 insertions(+), 70 deletions(-) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index a868656c..7186d002 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -1,53 +1,18 @@ -testthat::test_that("Testing `read_renv_lock()`", { - testthat::expect_error(read_renv_lock("nosuchfile"), "nosuchfile does not exist") - tmpf <- tempfile() - cat("not json", file = tmpf) - testthat::expect_error(read_renv_lock(tmpf), "Error reading renv\\.lock file") - unlink(tmpf) -}) +testthat::test_that("testing renv_helpers", { + testthat::expect_true(exists("renv2nix")) + # following as nested test pattern based on: + # https://rpahl.github.io/r-some-blog/posts/2024-10-07-nested-unit-tests-with-testthat/ -testthat::test_that("Testing `renv_remote_pkg()`", { - synthetic_renv_lock_example <- list( - githubpkg = list( - Package = "githubpkg", - RemoteType = "github", - RemoteUser = "user", - RemoteRepo = "repo", - RemoteSha = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz", - RemoteHost = "api.github.com" - ), - gitlabpkg = list( - Package = "gitlabpkg", - RemoteType = "gitlab", - RemoteUser = "user", - RemoteRepo = "repo", - RemoteSha = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh", - RemoteHost = "gitlab.com" - ) - ) + # testthat::skip("skipping remaining renv_helpers tests...") # uncomment to skip subsequent tests - expected_git_pkg <- list( - githubpkg = list( - package_name = "githubpkg", - repo_url = "https://github.com/user/repo", - commit = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz" - ), - gitlabpkg = list( - package_name = "gitlabpkg", - repo_url = "https://gitlab.com/user/repo", - commit = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh" - ) - ) - - testthat::expect_equal( - renv_remote_pkg(synthetic_renv_lock_example$githubpkg), expected_git_pkg$githubpkg - ) - testthat::expect_equal( - renv_remote_pkg(synthetic_renv_lock_example$gitlabpkg), expected_git_pkg$gitlabpkg - ) -}) + testthat::test_that("Testing `read_renv_lock()`", { + testthat::expect_error(read_renv_lock("nosuchfile"), "nosuchfile does not exist") + tmpf <- tempfile() + cat("not json", file = tmpf) + testthat::expect_error(read_renv_lock(tmpf), "Error reading renv\\.lock file") + unlink(tmpf) + }) -testthat::test_that("Testing `renv2nix()`", { synthetic_renv_lock_example <- list( R = list(Version = "4.4.1"), Packages = list( @@ -87,30 +52,47 @@ testthat::test_that("Testing `renv2nix()`", { ) ) ) - tmpf <- tempfile() - jsonlite::write_json(synthetic_renv_lock_example, tmpf, auto_unbox = TRUE) - test_call <- call( - "rix", - r_ver = "4.4.1", r_pkgs = c("MASS", "R6"), git_pkgs = list( - githubpkg = list( - package_name = "githubpkg", - repo_url = "https://github.com/user/repo", - commit = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz" - ), - gitlabpkg = list( - package_name = "gitlabpkg", - repo_url = "https://gitlab.com/user/repo", - commit = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh" - ) + + expected_git_pkg <- list( + githubpkg = list( + package_name = "githubpkg", + repo_url = "https://github.com/user/repo", + commit = "yki8snny7wgpjolz5cq0bwxjshxdd0xv0mcyygoz" + ), + gitlabpkg = list( + package_name = "gitlabpkg", + repo_url = "https://gitlab.com/user/repo", + commit = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh" ) ) - testthat::expect_equal(test_call, renv2nix(tmpf, return_rix_call = TRUE)) - unlink(tmpf) -}) -testthat::test_that("Testing `renv_lock_r_ver()`", { - tmpf <- tempfile() - jsonlite::write_json(list(R = list(Version = "4.4.1")), tmpf, auto_unbox = TRUE) - testthat::expect_equal(renv_lock_r_ver(renv_lock_path = tmpf), "4.4.1") - unlink(tmpf) + testthat::test_that("Testing `renv_remote_pkg()`", { + testthat::expect_equal( + renv_remote_pkgs(synthetic_renv_lock_example$Packages[c("githubpkg","gitlabpkg")]), + expected_git_pkg + ) + testthat::expect_error( + renv_remote_pkgs(synthetic_renv_lock_example$Packages), + "Not a package installed from a remote outside of the main package repositories" + ) + }) + + testthat::test_that("Testing `renv2nix()`", { + tmpf <- tempfile() + jsonlite::write_json(synthetic_renv_lock_example, tmpf, auto_unbox = TRUE) + test_call <- call( + "rix", r_ver = "4.4.1", r_pkgs = c("MASS", "R6"), git_pkgs = expected_git_pkg + ) + testthat::expect_equal(test_call, renv2nix(tmpf, return_rix_call = TRUE)) + unlink(tmpf) + }) + + testthat::test_that("Testing `renv_lock_r_ver()`", { + tmpf <- tempfile() + jsonlite::write_json(list(R = list(Version = "4.4.1")), tmpf, auto_unbox = TRUE) + testthat::expect_equal(renv_lock_r_ver(renv_lock_path = tmpf), "4.4.1") + unlink(tmpf) + }) + }) + From 1fa96f30e82562f509b45fdcc3aa0fc4112ce8f1 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Wed, 23 Oct 2024 14:13:01 +0100 Subject: [PATCH 28/44] switch to building lists of remote and repo packages simpler to work with than using logicals approach and fixes bug with NAs in `r_pkgs` in the previous approach. --- R/renv_helpers.R | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 813ee1ff..a014ca09 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -123,14 +123,17 @@ renv2nix <- function( method <- match.arg(method, c("fast", "accurate")) renv_lock <- read_renv_lock(renv_lock_path = renv_lock_path) if (method == "fast") { - repo_pkgs_lgl <- logical(length = length(renv_lock$Packages)) + repo_pkgs <- list() + remote_pkgs <- list() + # unsupported_pkgs <- list() + renv_lock_pkg_names <- names(renv_lock$Packages) for (i in seq_along(renv_lock$Packages)) { if (renv_lock$Packages[[i]]$Source == "Repository") { - repo_pkgs_lgl[i] <- TRUE + repo_pkgs[[renv_lock_pkg_names[i]]] <- renv_lock$Packages[[i]] } else if (renv_lock$Packages[[i]]$RemoteType %in% c("github", "gitlab")) { - repo_pkgs_lgl[i] <- FALSE + remote_pkgs[[renv_lock_pkg_names[i]]] <- renv_lock$Packages[[i]] } else { - repo_pkgs_lgl[i] <- NA + # unsupported_pkgs[[renv_lock_pkg_names[i]]] <- renv_lock$Packages[[i]] warning( renv_lock$Packages[[i]]$Package, " has the unsupported remote type ", renv_lock$Packages[[i]]$RemoteType, " and will not be included in the Nix environment.", @@ -141,14 +144,12 @@ renv2nix <- function( git_pkgs <- NULL # as local_r_pkgs expects an archive not sure how to set type here.. # local_r_pkgs <- NULL - if (isTRUE(any(!repo_pkgs_lgl))) { - remote_pkgs_lgl <- !repo_pkgs_lgl - remote_pkgs_lgl[is.na(remote_pkgs_lgl)] <- FALSE - git_pkgs <- renv_remote_pkgs(renv_lock$Packages[remote_pkgs_lgl]) + if(length(remote_pkgs) > 0) { + git_pkgs <- renv_remote_pkgs(remote_pkgs) } rix_call <- call("rix", r_ver = renv_lock$R$Version, - r_pkgs = names(renv_lock$Packages[repo_pkgs_lgl]), + r_pkgs = names(repo_pkgs), git_pkgs = git_pkgs # , # local_r_pkgs = local_r_pkgs ) From c8d2cb5cca1734f868535000c47a71626d26ce6e Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Wed, 23 Oct 2024 14:13:51 +0100 Subject: [PATCH 29/44] test for skipping and warning about unsupported remote types --- tests/testthat/test-renv_helpers.R | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 7186d002..8b95c479 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -49,6 +49,15 @@ testthat::test_that("testing renv_helpers", { RemoteRepo = "repo", RemoteSha = "45p9megdp0i5230rtw1lisy6rquc466zb9yxn7eh", RemoteHost = "gitlab.com" + ), + unsupported = list( + Package = "unsupported", + Source = "unsupported", + RemoteType = "unsupported", + RemoteUser = "user", + RemoteRepo = "repo", + RemoteSha = "i52gyxn30rtw1l45p9me7ehdp0rquc466isy6zb9", + RemoteHost = "unsupported.com" ) ) ) @@ -83,7 +92,11 @@ testthat::test_that("testing renv_helpers", { test_call <- call( "rix", r_ver = "4.4.1", r_pkgs = c("MASS", "R6"), git_pkgs = expected_git_pkg ) - testthat::expect_equal(test_call, renv2nix(tmpf, return_rix_call = TRUE)) + warns <- testthat::capture_warnings({ + call <- renv2nix(tmpf, return_rix_call = TRUE) + }) + testthat::expect_equal(call, test_call) + testthat::expect_match(warns, "has the unsupported remote type") unlink(tmpf) }) From d54e044ccfde0d1bd5d4446c5af85bd4bfea629c Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Wed, 23 Oct 2024 14:54:22 +0100 Subject: [PATCH 30/44] add error for unsupported inferred remote types in `renv_remote_pkgs()` --- R/renv_helpers.R | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index a014ca09..841d55b7 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -42,8 +42,9 @@ read_renv_lock <- function(renv_lock_path = "renv.lock") { renv_remote_pkgs <- function( renv_lock_remote_pkgs, type = NULL) { # , "bitbucket", "git", "local", "svn", "url", "version", "cran", "bioc" - if(!(is.null(type) || (type %in% c("github","gitlab")))) { - stop("Unsupported type: ", type) + supported_pkg_types <- c("github","gitlab") + if(!(is.null(type) || (type %in% supported_pkg_types))) { + stop("Unsupported remote type: ", type) } initial_type_state <- type git_pkgs <- vector(mode = "list", length = length(renv_lock_remote_pkgs)) @@ -56,14 +57,20 @@ renv_remote_pkgs <- function( "Not a package installed from a remote outside of the main package repositories\n", "renv_remote_pkgs() only handles pkgs where remote type is specified" ) - } else { + } else if(renv_lock_pkg_info$RemoteType %in% supported_pkg_types) { type <- renv_lock_pkg_info$RemoteType + } else { + stop( + renv_lock_pkg_info$Package, " has unsupported remote type: ", + renv_lock_pkg_info$RemoteType, "\nSupported types are: ", + paste0(supported_pkg_types, collapse = ", ") + ) } } else { if (type != renv_lock_pkg_info$RemoteType) { stop( - "Remote type (", renv_lock_pkg_info$RemoteType, - ") does not match the provided type (", type , ")" + "Remote type (", renv_lock_pkg_info$RemoteType, ") of ", renv_lock_pkg_info$Package, + " does not match the provided type (", type , ")" ) } } From dc168a10c87230ae5e2b9912d0271c846998529a Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Wed, 23 Oct 2024 14:54:50 +0100 Subject: [PATCH 31/44] styling fix --- tests/testthat/test-renv_helpers.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 8b95c479..0eb2d42b 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -77,7 +77,7 @@ testthat::test_that("testing renv_helpers", { testthat::test_that("Testing `renv_remote_pkg()`", { testthat::expect_equal( - renv_remote_pkgs(synthetic_renv_lock_example$Packages[c("githubpkg","gitlabpkg")]), + renv_remote_pkgs(synthetic_renv_lock_example$Packages[c("githubpkg", "gitlabpkg")]), expected_git_pkg ) testthat::expect_error( From d953b4b41b286e05f6c27ba3368ce1d4f8dac171 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Wed, 23 Oct 2024 14:55:19 +0100 Subject: [PATCH 32/44] add tests `renv_remote_pkgs()` errors --- tests/testthat/test-renv_helpers.R | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 0eb2d42b..088b98af 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -84,6 +84,24 @@ testthat::test_that("testing renv_helpers", { renv_remote_pkgs(synthetic_renv_lock_example$Packages), "Not a package installed from a remote outside of the main package repositories" ) + testthat::expect_error( + renv_remote_pkgs(synthetic_renv_lock_example$Packages[ + c("githubpkg", "gitlabpkg", "unsupported") + ], type = "unsupported"), + "Unsupported remote type:" + ) + testthat::expect_error( + renv_remote_pkgs(synthetic_renv_lock_example$Packages[ + c("githubpkg", "gitlabpkg", "unsupported") + ]), + "has unsupported remote type" + ) + testthat::expect_error( + renv_remote_pkgs(synthetic_renv_lock_example$Packages[ + c("githubpkg", "gitlabpkg", "unsupported") + ], type = "github"), + "does not match the provided type" + ) }) testthat::test_that("Testing `renv2nix()`", { From 3bda5eaea4382bf9bafb83fceda7bee45ceb137b Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Wed, 23 Oct 2024 14:56:15 +0100 Subject: [PATCH 33/44] add test for `renv2nix(method="accurate")` error --- tests/testthat/test-renv_helpers.R | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 088b98af..25d8cc4d 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -107,6 +107,7 @@ testthat::test_that("testing renv_helpers", { testthat::test_that("Testing `renv2nix()`", { tmpf <- tempfile() jsonlite::write_json(synthetic_renv_lock_example, tmpf, auto_unbox = TRUE) + expect_error(renv2nix(tmpf, method = "accurate"), "not yet implemented") test_call <- call( "rix", r_ver = "4.4.1", r_pkgs = c("MASS", "R6"), git_pkgs = expected_git_pkg ) From 4ef5f973baf556e68a294d381c043ba7987d6651 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Thu, 24 Oct 2024 10:26:00 +0100 Subject: [PATCH 34/44] add test where an named `rix()` argument is passed via renv2nix()` --- tests/testthat/test-renv_helpers.R | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 25d8cc4d..73efcd4c 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -116,6 +116,14 @@ testthat::test_that("testing renv_helpers", { }) testthat::expect_equal(call, test_call) testthat::expect_match(warns, "has the unsupported remote type") + + warns <- testthat::capture_warnings({ + call <- renv2nix(tmpf, return_rix_call = TRUE, ide = "rstudio") + }) + test_call$ide <- "rstudio" + testthat::expect_equal(call, test_call) + testthat::expect_match(warns, "has the unsupported remote type") + unlink(tmpf) }) From 05cbf6b46fefb4a3fcd34d3dd2f5324d635255bf Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Thu, 24 Oct 2024 14:14:22 +0100 Subject: [PATCH 35/44] use `expect_warning()` instead of `capture_warnings()` --- tests/testthat/test-renv_helpers.R | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 73efcd4c..9a1d7d2b 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -111,18 +111,17 @@ testthat::test_that("testing renv_helpers", { test_call <- call( "rix", r_ver = "4.4.1", r_pkgs = c("MASS", "R6"), git_pkgs = expected_git_pkg ) - warns <- testthat::capture_warnings({ + + testthat::expect_warning({ call <- renv2nix(tmpf, return_rix_call = TRUE) - }) + }, "has the unsupported remote type") testthat::expect_equal(call, test_call) - testthat::expect_match(warns, "has the unsupported remote type") - warns <- testthat::capture_warnings({ + warns <- testthat::expect_warning({ call <- renv2nix(tmpf, return_rix_call = TRUE, ide = "rstudio") - }) + }, "has the unsupported remote type") test_call$ide <- "rstudio" testthat::expect_equal(call, test_call) - testthat::expect_match(warns, "has the unsupported remote type") unlink(tmpf) }) From ff69fe20bf1cdf7c4f553546899d4e02ef9f49bd Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Thu, 24 Oct 2024 23:23:57 +0100 Subject: [PATCH 36/44] inherit dot params documentation from `rix()` in `renv2nix()` --- R/renv_helpers.R | 3 +- man/renv2nix.Rd | 116 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 115 insertions(+), 4 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 841d55b7..4e7c8ccb 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -114,9 +114,8 @@ renv_remote_pkgs <- function( #' are from external package repositories such as being installed directly from a github #' repository in which case an attempt is made to handle them and pass them to the #' `git_pkgs` argument of [rix] -#' #' Currently defaults to "fast", "accurate" is not yet implemented -#' @param ... any other parameters to pass to [rix] +#' @inheritDotParams rix system_pkgs local_r_pkgs tex_pkgs ide project_path overwrite print message_type shell_hook #' #' @return nothing side effects only, unless `return_rix_call = TRUE` in which case an unevaluated #' call to the [rix] function is returned diff --git a/man/renv2nix.Rd b/man/renv2nix.Rd index 78880c5c..a60432c8 100644 --- a/man/renv2nix.Rd +++ b/man/renv2nix.Rd @@ -23,10 +23,122 @@ packages in an renv.lock file and adds them to the \code{r_pkgs} argument of \li are from external package repositories such as being installed directly from a github repository in which case an attempt is made to handle them and pass them to the \code{git_pkgs} argument of \link{rix} - Currently defaults to "fast", "accurate" is not yet implemented} -\item{...}{any other parameters to pass to \link{rix}} +\item{...}{ + Arguments passed on to \code{\link[=rix]{rix}} + \describe{ + \item{\code{system_pkgs}}{Vector of characters. List further software you wish to +install that are not R packages such as command line applications for +example. You can look for available software on the NixOS website +\url{https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=} # nolint} + \item{\code{local_r_pkgs}}{List. A list of local packages to install. These packages +need to be in the \code{.tar.gz} or \code{.zip} formats and must be in the same +folder as the generated "default.nix" file.} + \item{\code{tex_pkgs}}{Vector of characters. A set of TeX packages to install. Use +this if you need to compile \code{.tex} documents, or build PDF documents using +Quarto. If you don't know which package to add, start by adding "amsmath". +See the Vignette "Authoring LaTeX documents" for more details.} + \item{\code{ide}}{Character, defaults to "other". If you wish to use RStudio to work +interactively use "rstudio" or "rserver" for the server version. Use "code" +for Visual Studio Code. You can also use "radian", an interactive REPL. For +other editors, use "other". This has been tested with RStudio, VS Code and +Emacs. If other editors don't work, please open an issue.} + \item{\code{project_path}}{Character. Where to write \code{default.nix}, for example +"/home/path/to/project". The file will thus be written to the file +"/home/path/to/project/default.nix". If the folder does not exist, it will +be created.} + \item{\code{overwrite}}{Logical, defaults to FALSE. If TRUE, overwrite the +\code{default.nix} file in the specified path.} + \item{\code{print}}{Logical, defaults to FALSE. If TRUE, print \code{default.nix} to +console.} + \item{\code{message_type}}{Character. Message type, defaults to \code{"simple"}, which +gives minimal but sufficient feedback. Other values are currently \verb{"quiet}, +which generates the files without message, and \code{"verbose"}, displays all +the messages.} + \item{\code{shell_hook}}{Character of length 1, defaults to \code{NULL}. Commands added +to the \code{shellHook} variable are executed when the Nix shell starts. So by +default, using \verb{nix-shell default.nix} will start a specific program, +possibly with flags (separated by space), and/or do shell actions. You can +for example use \code{shell_hook = R}, if you want to directly enter the declared +Nix R session when dropping into the Nix shell. @details This function will +write a \code{default.nix} and an \code{.Rprofile} in the chosen path. Using the Nix +package manager, it is then possible to build a reproducible development +environment using the \code{nix-build} command in the path. This environment will +contain the chosen version of R and packages, and will not interfere with any +other installed version (via Nix or not) on your machine. Every dependency, +including both R package dependencies but also system dependencies like +compilers will get installed as well in that environment. + +It is possible to use environments built with Nix interactively, either +from the terminal, or using an interface such as RStudio. If you want to +use RStudio, set the \code{ide} argument to \code{"rstudio"}. Please be aware that +RStudio is not available for macOS through Nix. As such, you may want to +use another editor on macOS. To use Visual Studio Code (or Codium), set the +\code{ide} argument to \code{"code"}, which will add the \code{{languageserver}} R package +to the list of R packages to be installed by Nix in that environment. You +can use the version of Visual Studio Code or Codium you already use, or +also install it using Nix (by adding "vscode" or "vscodium" to the list of +\code{system_pkgs}). For non-interactive use, or to use the environment from the +command line, or from another editor (such as Emacs or Vim), set the \code{ide} +argument to \code{"other"}. We recommend reading the +\code{vignette("e-interactive-use")} for more details. + +Packages to install from Github or Gitlab must be provided in a list of 3 +elements: "package_name", "repo_url" and "commit". To install several +packages, provide a list of lists of these 3 elements, one per package to +install. It is also possible to install old versions of packages by +specifying a version. For example, to install the latest version of \code{{AER}} +but an old version of \code{{ggplot2}}, you could write: \code{r_pkgs = c("AER", "ggplot2@2.2.1")}. Note however that doing this could result in dependency +hell, because an older version of a package might need older versions of +its dependencies, but other packages might need more recent versions of the +same dependencies. If instead you want to use an environment as it would +have looked at the time of \code{{ggplot2}}'s version 2.2.1 release, then use +the Nix revision closest to that date, by setting \code{r_ver = "3.1.0"}, which +was the version of R current at the time. This ensures that Nix builds a +completely coherent environment. For security purposes, users that wish to +install packages from Github/Gitlab or from the CRAN archives must provide +a security hash for each package. \code{{rix}} automatically precomputes this +hash for the source directory of R packages from GitHub/Gitlab or from the +CRAN archives, to make sure the expected trusted sources that match the +precomputed hashes in the \code{default.nix} are downloaded. If Nix is +available, then the hash will be computed on the user's machine, however, +if Nix is not available, then the hash gets computed on a server that we +set up for this purposes. This server then returns the security hash as +well as the dependencies of the packages. It is possible to control this +behaviour using \code{options(rix.sri_hash=x)}, where \code{x} is one of "check_nix" +(the default), "locally" (use the local Nix installation) or "api_server" +(use the remote server to compute and return the hash). + +Note that installing packages from Git or old versions using the \code{"@"} +notation or local packages, does not leverage Nix's capabilities for +dependency solving. As such, you might have trouble installing these +packages. If that is the case, open an issue on \code{{rix}}'s Github +repository. + +By default, the Nix shell will be configured with \code{"en_US.UTF-8"} for the +relevant locale variables (\code{LANG}, \code{LC_ALL}, \code{LC_TIME}, \code{LC_MONETARY}, +\code{LC_PAPER}, \code{LC_MEASUREMENT}). This is done to ensure locale +reproducibility by default in Nix environments created with \code{rix()}. If +there are good reasons to not stick to the default, you can set your +preferred locale variables via \verb{options(rix.nix_locale_variables = list(LANG = "de_CH.UTF-8", <...>)} and the aforementioned locale variable +names. + +It is possible to use \verb{"bleeding_edge}" or \verb{"frozen_edge}" as the value for +the \code{r_ver} argument. This will create an environment with the very latest +R packages. \verb{"bleeding_edge}" means that every time you will build the +environment, the packages will get updated. This is especially useful for +environments that need to be constantly updated, for example when +developing a package. In contrast, \verb{"frozen_edge}" will create an +environment that will remain stable at build time. So if you create a +\code{default.nix} file using \verb{"bleeding_edge}", each time you build it using +\code{nix-build} that environment will be up-to-date. With \verb{"frozen_edge}" that +environment will be up-to-date on the date that the \code{default.nix} will be +generated, and then each subsequent call to \code{nix-build} will result in the +same environment. We highly recommend you read the vignette titled +"z - Advanced topic: Understanding the rPackages set release cycle and +using bleeding edge packages".} + }} } \value{ nothing side effects only, unless \code{return_rix_call = TRUE} in which case an unevaluated From 9c1f539d30d7f890a4b79c61eca2657e13fe2342 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Thu, 24 Oct 2024 23:26:51 +0100 Subject: [PATCH 37/44] more succinct inherit dot params --- R/renv_helpers.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index 4e7c8ccb..f633d062 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -115,7 +115,7 @@ renv_remote_pkgs <- function( #' repository in which case an attempt is made to handle them and pass them to the #' `git_pkgs` argument of [rix] #' Currently defaults to "fast", "accurate" is not yet implemented -#' @inheritDotParams rix system_pkgs local_r_pkgs tex_pkgs ide project_path overwrite print message_type shell_hook +#' @inheritDotParams rix system_pkgs local_r_pkgs:shell_hook #' #' @return nothing side effects only, unless `return_rix_call = TRUE` in which case an unevaluated #' call to the [rix] function is returned From 1fb1e4872ec7d66e3005d734bb40e07d4487dc05 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Tue, 29 Oct 2024 10:41:50 +0000 Subject: [PATCH 38/44] add some example 'real world' renv.lock files for use in testing These files come from some random projects of mine sampled from those generated with a few different versions of renv, and one which is a snapshot of the current rix package. --- .../testdata/renv-samples/renv_v0-14-0.lock | 1191 ++++++++++++ .../testdata/renv-samples/renv_v0-15-5.lock | 1503 ++++++++++++++ .../testdata/renv-samples/renv_v0-17-3.lock | 1732 +++++++++++++++++ .../testdata/renv-samples/renv_v1-0-7.lock | 955 +++++++++ 4 files changed, 5381 insertions(+) create mode 100644 tests/testthat/testdata/renv-samples/renv_v0-14-0.lock create mode 100644 tests/testthat/testdata/renv-samples/renv_v0-15-5.lock create mode 100644 tests/testthat/testdata/renv-samples/renv_v0-17-3.lock create mode 100644 tests/testthat/testdata/renv-samples/renv_v1-0-7.lock diff --git a/tests/testthat/testdata/renv-samples/renv_v0-14-0.lock b/tests/testthat/testdata/renv-samples/renv_v0-14-0.lock new file mode 100644 index 00000000..57197b7f --- /dev/null +++ b/tests/testthat/testdata/renv-samples/renv_v0-14-0.lock @@ -0,0 +1,1191 @@ +{ + "R": { + "Version": "4.1.1", + "Repositories": [ + { + "Name": "BioCsoft", + "URL": "https://bioconductor.org/packages/3.14/bioc" + }, + { + "Name": "BioCann", + "URL": "https://bioconductor.org/packages/3.14/data/annotation" + }, + { + "Name": "BioCexp", + "URL": "https://bioconductor.org/packages/3.14/data/experiment" + }, + { + "Name": "BioCworkflows", + "URL": "https://bioconductor.org/packages/3.14/workflows" + }, + { + "Name": "BioCbooks", + "URL": "https://bioconductor.org/packages/3.14/books" + }, + { + "Name": "CRAN", + "URL": "https://packagemanager.rstudio.com/cran/2021-10-29" + } + ] + }, + "Bioconductor": { + "Version": "3.14" + }, + "Packages": { + "BiocGenerics": { + "Package": "BiocGenerics", + "Version": "0.40.0", + "Source": "Bioconductor", + "Hash": "ddc1d29bbe66aaef34b0d17620b61a69" + }, + "BiocManager": { + "Package": "BiocManager", + "Version": "1.30.16", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "2fdca0877debdd4668190832cdee4c31" + }, + "BiocVersion": { + "Package": "BiocVersion", + "Version": "3.14.0", + "Source": "Bioconductor", + "Hash": "e57437f82a5c13263a9cf442b9796ba3" + }, + "ComplexHeatmap": { + "Package": "ComplexHeatmap", + "Version": "2.10.0", + "Source": "Bioconductor", + "Hash": "964941c376127a2eccfb0d89d43442d2" + }, + "GetoptLong": { + "Package": "GetoptLong", + "Version": "1.0.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "61fac01c73abf03ac72e88dc3952c1e3" + }, + "GlobalOptions": { + "Package": "GlobalOptions", + "Version": "0.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c3f7b221e60c28f5f3533d74c6fef024" + }, + "IRanges": { + "Package": "IRanges", + "Version": "2.28.0", + "Source": "Bioconductor", + "Hash": "8299b0f981c924a2b824be548f836e9d" + }, + "MASS": { + "Package": "MASS", + "Version": "7.3-54", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0e59129db205112e3963904db67fd0dc" + }, + "Matrix": { + "Package": "Matrix", + "Version": "1.3-4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4ed05e9c9726267e4a5872e09c04587c" + }, + "R6": { + "Package": "R6", + "Version": "2.5.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "470851b6d5d0ac559e9d01bb352b4021" + }, + "RColorBrewer": { + "Package": "RColorBrewer", + "Version": "1.1-2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "e031418365a7f7a766181ab5a41a5716" + }, + "Rcpp": { + "Package": "Rcpp", + "Version": "1.0.7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "dab19adae4440ae55aa8a9d238b246bb" + }, + "S4Vectors": { + "Package": "S4Vectors", + "Version": "0.32.4", + "Source": "Bioconductor", + "Hash": "a60f752f43d02ebcacd6fdfa02e1d97b" + }, + "askpass": { + "Package": "askpass", + "Version": "1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "e8a22846fff485f0be3770c2da758713" + }, + "assertthat": { + "Package": "assertthat", + "Version": "0.2.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "50c838a310445e954bc13f26f26a6ecf" + }, + "attempt": { + "Package": "attempt", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "d7421bb5dfeb2676b9e4a5a60c2fcfd2" + }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "543776ae6848fde2f48ff3816d0628bc" + }, + "bit": { + "Package": "bit", + "Version": "4.0.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "f36715f14d94678eea9933af927bc15d" + }, + "bit64": { + "Package": "bit64", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "9fe98599ca456d6552421db0d6772d8f" + }, + "brew": { + "Package": "brew", + "Version": "1.0-6", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "92a5f887f9ae3035ac7afde22ba73ee9" + }, + "brio": { + "Package": "brio", + "Version": "1.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "2f01e16ff9571fe70381c7b9ae560dc4" + }, + "bs4Dash": { + "Package": "bs4Dash", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "79acf9184702de996bda53cef9dbf059" + }, + "bslib": { + "Package": "bslib", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "56ae7e1987b340186a8a5a157c2ec358" + }, + "cachem": { + "Package": "cachem", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "648c5b3d71e6a37e3043617489a0a0e9" + }, + "callr": { + "Package": "callr", + "Version": "3.7.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "461aa75a11ce2400245190ef5d3995df" + }, + "circlize": { + "Package": "circlize", + "Version": "0.4.13", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7fe204e42ae9addc35147f8a5a8739fb" + }, + "cli": { + "Package": "cli", + "Version": "3.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "66a3834e54593c89d8beefb312347e58" + }, + "clipr": { + "Package": "clipr", + "Version": "0.7.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ebaa97ac99cc2daf04e77eecc7b781d7" + }, + "clue": { + "Package": "clue", + "Version": "0.3-60", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "402594b0365210ad6df53e8fcda69d8a" + }, + "cluster": { + "Package": "cluster", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ce49bfe5bc0b3ecd43a01fe1b01c2243" + }, + "codetools": { + "Package": "codetools", + "Version": "0.2-18", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "019388fc48e48b3da0d3a76ff94608a8" + }, + "colorspace": { + "Package": "colorspace", + "Version": "2.0-2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6baccb763ee83c0bd313460fdb8b8a84" + }, + "colourScaleR": { + "Package": "colourScaleR", + "Version": "1.1.1", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteUsername": "richardjacton", + "RemoteRepo": "colourScaleR", + "RemoteRef": "master", + "RemoteSha": "b18385cc06998c16300c30f36424187d899bbb02", + "Hash": "d9bb6e8981d20b0b79f6a51231e4817e" + }, + "commonmark": { + "Package": "commonmark", + "Version": "1.7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "0f22be39ec1d141fd03683c06f3a6e67" + }, + "config": { + "Package": "config", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "31d77b09f63550cee9ecb5a08bf76e8f" + }, + "covr": { + "Package": "covr", + "Version": "3.5.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6d80a9fc3c0c8473153b54fa54719dfd" + }, + "cpp11": { + "Package": "cpp11", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "40ba3fd26c8f61d8d14d334bc7761df9" + }, + "crayon": { + "Package": "crayon", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "e75525c55c70e5f4f78c9960a4b402e9" + }, + "credentials": { + "Package": "credentials", + "Version": "1.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "db9463f8f96444ac790bef2076048699" + }, + "curl": { + "Package": "curl", + "Version": "4.3.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "022c42d49c28e95d69ca60446dbabf88" + }, + "desc": { + "Package": "desc", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "28763d08fadd0b733e3cee9dab4e12fe" + }, + "devtools": { + "Package": "devtools", + "Version": "2.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "048d0b914d2cea61f440d35dd3cbddac" + }, + "diffobj": { + "Package": "diffobj", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" + }, + "digest": { + "Package": "digest", + "Version": "0.6.28", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "49b5c6e230bfec487b8917d5a0c77cca" + }, + "doParallel": { + "Package": "doParallel", + "Version": "1.0.16", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "2dc413572eb42475179bfe0afabd2adf" + }, + "dockerfiler": { + "Package": "dockerfiler", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "e96dd3b237b2f38a2955f4bf41e047a1" + }, + "downlit": { + "Package": "downlit", + "Version": "0.2.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "f24f1e44320a978c03050b8403a83793" + }, + "dplyr": { + "Package": "dplyr", + "Version": "1.0.7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "36f1ae62f026c8ba9f9b5c9a08c03297" + }, + "ellipsis": { + "Package": "ellipsis", + "Version": "0.3.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" + }, + "evaluate": { + "Package": "evaluate", + "Version": "0.14", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ec8ca05cffcc70569eaaad8469d2a3a7" + }, + "fansi": { + "Package": "fansi", + "Version": "0.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "d447b40982c576a72b779f0a3b3da227" + }, + "farver": { + "Package": "farver", + "Version": "2.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c98eb5133d9cb9e1622b8691487f11bb" + }, + "fastmap": { + "Package": "fastmap", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "77bd60a6157420d4ffa93b27cf6a58b8" + }, + "fontawesome": { + "Package": "fontawesome", + "Version": "0.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "55624ed409e46c5f358b2c060be87f67" + }, + "foreach": { + "Package": "foreach", + "Version": "1.5.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "e32cfc0973caba11b65b1fa691b4d8c9" + }, + "fresh": { + "Package": "fresh", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "fa54367040deb4537da49b7ac0ee5770" + }, + "fs": { + "Package": "fs", + "Version": "1.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "44594a07a42e5f91fac9f93fda6d0109" + }, + "generics": { + "Package": "generics", + "Version": "0.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "3f6bcfb0ee5d671d9fd1893d2faa79cb" + }, + "gert": { + "Package": "gert", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "8e54ffecc152da9e1e366ff1a4012bb1" + }, + "ggplot2": { + "Package": "ggplot2", + "Version": "3.3.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "d7566c471c7b17e095dd023b9ef155ad" + }, + "gh": { + "Package": "gh", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "38c2580abbda249bd6afeec00d14f531" + }, + "gitcreds": { + "Package": "gitcreds", + "Version": "0.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "f3aefccc1cc50de6338146b62f115de8" + }, + "glue": { + "Package": "glue", + "Version": "1.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6efd734b14c6471cfe443345f3e35e29" + }, + "golem": { + "Package": "golem", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "0eaf594de1dcbcd37c6d79806d57b473" + }, + "gridExtra": { + "Package": "gridExtra", + "Version": "2.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7d7f283939f563670a697165b2cf5560" + }, + "gtable": { + "Package": "gtable", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ac5c6baf7822ce8732b343f14c072c4d" + }, + "here": { + "Package": "here", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "24b224366f9c2e7534d2344d10d59211" + }, + "highr": { + "Package": "highr", + "Version": "0.9", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "8eb36c8125038e648e5d111c0d7b2ed4" + }, + "hms": { + "Package": "hms", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5b8a2dd0fdbe2ab4f6081e6c7be6dfca" + }, + "htmltools": { + "Package": "htmltools", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "526c484233f42522278ab06fb185cb26" + }, + "htmlwidgets": { + "Package": "htmlwidgets", + "Version": "1.5.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "76147821cd3fcd8c4b04e1ef0498e7fb" + }, + "httpuv": { + "Package": "httpuv", + "Version": "1.6.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "65e865802fe6dd1bafef1dae5b80a844" + }, + "httr": { + "Package": "httr", + "Version": "1.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "a525aba14184fec243f9eaec62fbed43" + }, + "ini": { + "Package": "ini", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6154ec2223172bce8162d4153cda21f7" + }, + "isoband": { + "Package": "isoband", + "Version": "0.2.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7ab57a6de7f48a8dc84910d1eca42883" + }, + "iterators": { + "Package": "iterators", + "Version": "1.0.13", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "64778782a89480e9a644f69aad9a2877" + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5aab57a3bd297eee1c1d862735972182" + }, + "jsonlite": { + "Package": "jsonlite", + "Version": "1.7.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "98138e0994d41508c7a6b84a0600cfcb" + }, + "knitr": { + "Package": "knitr", + "Version": "1.36", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "46344b93f8854714cdf476433a59ed10" + }, + "labeling": { + "Package": "labeling", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "3d5108641f47470611a32d0bdf357a72" + }, + "later": { + "Package": "later", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7e7b457d7766bc47f2a5f21cc2984f8e" + }, + "latex2exp": { + "Package": "latex2exp", + "Version": "0.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "f96b4c78546d415fa21c99e83629543a" + }, + "lattice": { + "Package": "lattice", + "Version": "0.20-45", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "b64cdbb2b340437c4ee047a1f4c4377b" + }, + "lazyeval": { + "Package": "lazyeval", + "Version": "0.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "d908914ae53b04d4c0c0fd72ecc35370" + }, + "lifecycle": { + "Package": "lifecycle", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "a6b6d352e3ed897373ab19d8395c98d0" + }, + "magrittr": { + "Package": "magrittr", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "41287f1ac7d28a92f0a286ed507928d3" + }, + "matrixStats": { + "Package": "matrixStats", + "Version": "0.61.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "b8e6221fc11247b12ab1b055a6f66c27" + }, + "memoise": { + "Package": "memoise", + "Version": "2.0.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "a0bc51650201a56d00a4798523cc91b3" + }, + "mgcv": { + "Package": "mgcv", + "Version": "1.8-38", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "be3c61ffbb1e3d3b3df214d192ac5444" + }, + "mime": { + "Package": "mime", + "Version": "0.12", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "18e9c28c1d3ca1560ce30658b22ce104" + }, + "munsell": { + "Package": "munsell", + "Version": "0.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6dfe8bf774944bd5595785e3229d8771" + }, + "nlme": { + "Package": "nlme", + "Version": "3.1-153", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "2d632e0d963a653a0329756ce701ecdd" + }, + "openssl": { + "Package": "openssl", + "Version": "1.4.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5406fd37ef0bf9b88c8a4f264d6ec220" + }, + "packrat": { + "Package": "packrat", + "Version": "0.7.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "95e8c3825efcaad09411799da92c0af9" + }, + "parsedate": { + "Package": "parsedate", + "Version": "1.2.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7ea462fc29a69bd66f0ec4e596373c3d" + }, + "pillar": { + "Package": "pillar", + "Version": "1.6.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "60200b6aa32314ac457d3efbb5ccbd98" + }, + "pkgbuild": { + "Package": "pkgbuild", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "725fcc30222d4d11ec68efb8ff11a9af" + }, + "pkgconfig": { + "Package": "pkgconfig", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "01f28d4278f15c76cddbea05899c5d6f" + }, + "pkgdown": { + "Package": "pkgdown", + "Version": "1.6.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "8896076540d9e9b556a2ec658c81f916" + }, + "pkgload": { + "Package": "pkgload", + "Version": "1.2.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "302276471121c41f47380243b82d5882" + }, + "png": { + "Package": "png", + "Version": "0.1-7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "03b7076c234cb3331288919983326c55" + }, + "praise": { + "Package": "praise", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "a555924add98c99d2f411e37e7d25e9f" + }, + "prettyunits": { + "Package": "prettyunits", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "95ef9167b75dde9d2ccc3c7528393e7e" + }, + "processx": { + "Package": "processx", + "Version": "3.5.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "0cbca2bc4d16525d009c4dbba156b37c" + }, + "progress": { + "Package": "progress", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061" + }, + "promises": { + "Package": "promises", + "Version": "1.2.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "4ab2c43adb4d4699cf3690acd378d75d" + }, + "ps": { + "Package": "ps", + "Version": "1.6.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "32620e2001c1dce1af49c49dccbb9420" + }, + "purrr": { + "Package": "purrr", + "Version": "0.3.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "97def703420c8ab10d8f0e6c72101e02" + }, + "ragg": { + "Package": "ragg", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "663065eff8c6c08eaa9955c6f478ee7a" + }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" + }, + "rcmdcheck": { + "Package": "rcmdcheck", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4" + }, + "reactR": { + "Package": "reactR", + "Version": "0.4.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "75389c8091eb14ee21c6bc87a88b3809" + }, + "reactable": { + "Package": "reactable", + "Version": "0.2.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ac1afe50d1c77470a72971a07fd146b1" + }, + "readr": { + "Package": "readr", + "Version": "2.0.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7cb2c3ecfbc2c6786221d2c0c1f6ed68" + }, + "rematch": { + "Package": "rematch", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c66b930d20bb6d858cd18e1cebcfae5c" + }, + "rematch2": { + "Package": "rematch2", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "76c9e04c712a05848ae7a23d2f170a40" + }, + "remotes": { + "Package": "remotes", + "Version": "2.4.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "feaca31e417db79fd1832e25b51a7717" + }, + "renv": { + "Package": "renv", + "Version": "0.14.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "30e5eba91b67f7f4d75d31de14bbfbdc" + }, + "rex": { + "Package": "rex", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "093584b944440c5cd07a696b3c8e0e4c" + }, + "rhub": { + "Package": "rhub", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "977cce19c029acc6d88a1c861f224819" + }, + "rjson": { + "Package": "rjson", + "Version": "0.2.20", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7d597f982ee6263716b6a2f28efd29fa" + }, + "rlang": { + "Package": "rlang", + "Version": "0.4.12", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "0879f5388fe6e4d56d7ef0b7ccb031e5" + }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.11", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "320017b52d05a943981272b295750388" + }, + "roxygen2": { + "Package": "roxygen2", + "Version": "7.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "eb9849556c4250305106e82edae35b72" + }, + "rprojroot": { + "Package": "rprojroot", + "Version": "2.0.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "249d8cd1e74a8f6a26194a91b47f21d1" + }, + "rsconnect": { + "Package": "rsconnect", + "Version": "0.8.24", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5e21fd77eb844fa1ff1d23cb04e1d753" + }, + "rstudioapi": { + "Package": "rstudioapi", + "Version": "0.13", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "06c85365a03fdaf699966cc1d3cf53ea" + }, + "rversions": { + "Package": "rversions", + "Version": "2.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "f88fab00907b312f8b23ec13e2d437cb" + }, + "sass": { + "Package": "sass", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "50cf822feb64bb3977bda0b7091be623" + }, + "scales": { + "Package": "scales", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6f76f71042411426ec8df6c54f34e6dd" + }, + "scico": { + "Package": "scico", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "8c75fb64420e2aafadbc258e2797c459" + }, + "sessioninfo": { + "Package": "sessioninfo", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "308013098befe37484df72c39cf90d6e" + }, + "shape": { + "Package": "shape", + "Version": "1.4.6", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "9067f962730f58b14d8ae54ca885509f" + }, + "shiny": { + "Package": "shiny", + "Version": "1.7.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "00344c227c7bd0ab5d78052c5d736c44" + }, + "shinyWidgets": { + "Package": "shinyWidgets", + "Version": "0.6.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "9bdabea3a78fd6a0768c2a319d36264e" + }, + "sourcetools": { + "Package": "sourcetools", + "Version": "0.1.7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "947e4e02a79effa5d512473e10f41797" + }, + "stringi": { + "Package": "stringi", + "Version": "1.7.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "cd50dc9b449de3d3b47cdc9976886999" + }, + "stringr": { + "Package": "stringr", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "0759e6b6c0957edb1311028a49a35e76" + }, + "sys": { + "Package": "sys", + "Version": "3.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "b227d13e29222b4574486cfcbde077fa" + }, + "systemfonts": { + "Package": "systemfonts", + "Version": "1.0.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5be9fcf8ef6763e8cb13ab009e273a1d" + }, + "testthat": { + "Package": "testthat", + "Version": "3.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "89e55ebe4f5ddd7f43f0f2bc6d96c950" + }, + "textshaping": { + "Package": "textshaping", + "Version": "0.3.6", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "1ab6223d3670fac7143202cb6a2d43d5" + }, + "tibble": { + "Package": "tibble", + "Version": "3.1.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "36eb05ad4cfdfeaa56f5a9b2a1311efd" + }, + "tidyr": { + "Package": "tidyr", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c8fbdbd9fcac223d6c6fe8e406f368e1" + }, + "tidyselect": { + "Package": "tidyselect", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7243004a708d06d4716717fa1ff5b2fe" + }, + "tinytex": { + "Package": "tinytex", + "Version": "0.34", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "043daa786f4d254f0031534150e28d42" + }, + "tzdb": { + "Package": "tzdb", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5e069fb033daf2317bd628d3100b75c5" + }, + "usethis": { + "Package": "usethis", + "Version": "2.1.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "831aea06a4d6d7e655bfed2536d556fd" + }, + "utf8": { + "Package": "utf8", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c9c462b759a5cc844ae25b5942654d13" + }, + "uuid": { + "Package": "uuid", + "Version": "1.0-2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "a24851e188aeed413d469d7f4f229000" + }, + "vctrs": { + "Package": "vctrs", + "Version": "0.3.8", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ecf749a1b39ea72bd9b51b76292261f1" + }, + "viridis": { + "Package": "viridis", + "Version": "0.6.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ee96aee95a7a563e5496f8991e9fde4b" + }, + "viridisLite": { + "Package": "viridisLite", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "55e157e2aa88161bdb0754218470d204" + }, + "vroom": { + "Package": "vroom", + "Version": "1.5.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "9c3b3a3f947c7936cea7485349247e5b" + }, + "waiter": { + "Package": "waiter", + "Version": "0.2.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ac6ef9ebf3f60eb8f2fe5f0c829e3a08" + }, + "waldo": { + "Package": "waldo", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ad8cfff5694ac5b3c354f8f2044bd976" + }, + "whisker": { + "Package": "whisker", + "Version": "0.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ca970b96d894e90397ed20637a0c1bbe" + }, + "whoami": { + "Package": "whoami", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ef0f4d9b8f2cc2ebeccae1d725b8a023" + }, + "withr": { + "Package": "withr", + "Version": "2.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ad03909b44677f930fa156d47d7a3aeb" + }, + "xfun": { + "Package": "xfun", + "Version": "0.27", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "12b69332f085d350fc1f2ea6cca58397" + }, + "xml2": { + "Package": "xml2", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "d4d71a75dd3ea9eb5fa28cc21f9585e2" + }, + "xopen": { + "Package": "xopen", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6c85f015dee9cc7710ddd20f86881f58" + }, + "xtable": { + "Package": "xtable", + "Version": "1.8-4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" + }, + "yaml": { + "Package": "yaml", + "Version": "2.2.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "2826c5d9efb0a88f657c7a679c7106db" + }, + "zip": { + "Package": "zip", + "Version": "2.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c7eef2996ac270a18c2715c997a727c5" + } + } +} diff --git a/tests/testthat/testdata/renv-samples/renv_v0-15-5.lock b/tests/testthat/testdata/renv-samples/renv_v0-15-5.lock new file mode 100644 index 00000000..57e32909 --- /dev/null +++ b/tests/testthat/testdata/renv-samples/renv_v0-15-5.lock @@ -0,0 +1,1503 @@ +{ + "R": { + "Version": "4.3.1", + "Repositories": [ + { + "Name": "CRAN", + "URL": "https://packagemanager.rstudio.com/cran/2022-06-22" + } + ] + }, + "Packages": { + "AsioHeaders": { + "Package": "AsioHeaders", + "Version": "1.22.1-1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "57ed34bcad0158fafd9cbdd85bd26881", + "Requirements": [] + }, + "DT": { + "Package": "DT", + "Version": "0.23", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "d8f1498dc47763ce4647c8d03214d30b", + "Requirements": [ + "crosstalk", + "htmltools", + "htmlwidgets", + "jquerylib", + "jsonlite", + "magrittr", + "promises" + ] + }, + "GlobalOptions": { + "Package": "GlobalOptions", + "Version": "0.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c3f7b221e60c28f5f3533d74c6fef024", + "Requirements": [] + }, + "MASS": { + "Package": "MASS", + "Version": "7.3-60", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a56a6365b3fa73293ea8d084be0d9bb0", + "Requirements": [] + }, + "Matrix": { + "Package": "Matrix", + "Version": "1.4-1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "699c47c606293bdfbc9fd78a93c9c8fe", + "Requirements": [ + "lattice" + ] + }, + "R6": { + "Package": "R6", + "Version": "2.5.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "470851b6d5d0ac559e9d01bb352b4021", + "Requirements": [] + }, + "RColorBrewer": { + "Package": "RColorBrewer", + "Version": "1.1-3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "45f0398006e83a5b10b72a90663d8d8c", + "Requirements": [] + }, + "Rcpp": { + "Package": "Rcpp", + "Version": "1.0.8.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "32e79b908fda56ee57fe518a8d37b864", + "Requirements": [] + }, + "RcppEigen": { + "Package": "RcppEigen", + "Version": "0.3.3.9.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "4c86baed78388ceb06f88e3e9a1d87f5", + "Requirements": [ + "Matrix", + "Rcpp" + ] + }, + "V8": { + "Package": "V8", + "Version": "4.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ca98390ad1cef2a5a609597b49d3d042", + "Requirements": [ + "Rcpp", + "curl", + "jsonlite" + ] + }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "543776ae6848fde2f48ff3816d0628bc", + "Requirements": [] + }, + "beeswarm": { + "Package": "beeswarm", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "0f4e9d8caa6feaa7e409ae6c30f2ca66", + "Requirements": [] + }, + "bigD": { + "Package": "bigD", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "93637e906f3fe962413912c956eb44db", + "Requirements": [] + }, + "bit": { + "Package": "bit", + "Version": "4.0.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "f36715f14d94678eea9933af927bc15d", + "Requirements": [] + }, + "bit64": { + "Package": "bit64", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "9fe98599ca456d6552421db0d6772d8f", + "Requirements": [ + "bit" + ] + }, + "bitops": { + "Package": "bitops", + "Version": "1.0-7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "b7d8d8ee39869c18d8846a184dd8a1af", + "Requirements": [] + }, + "bslib": { + "Package": "bslib", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "56ae7e1987b340186a8a5a157c2ec358", + "Requirements": [ + "htmltools", + "jquerylib", + "jsonlite", + "rlang", + "sass" + ] + }, + "cachem": { + "Package": "cachem", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "648c5b3d71e6a37e3043617489a0a0e9", + "Requirements": [ + "fastmap", + "rlang" + ] + }, + "callr": { + "Package": "callr", + "Version": "3.7.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "461aa75a11ce2400245190ef5d3995df", + "Requirements": [ + "R6", + "processx" + ] + }, + "chromote": { + "Package": "chromote", + "Version": "0.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "785cfc65cd435cc7f7b0cef04e4cf77c", + "Requirements": [ + "R6", + "curl", + "fastmap", + "jsonlite", + "later", + "magrittr", + "processx", + "promises", + "rlang", + "websocket" + ] + }, + "circlize": { + "Package": "circlize", + "Version": "0.4.15", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "2bb47a2fe6ab009b1dcc5566d8c3a988", + "Requirements": [ + "GlobalOptions", + "colorspace", + "shape" + ] + }, + "cli": { + "Package": "cli", + "Version": "3.6.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "1216ac65ac55ec0058a6f75d7ca0fd52", + "Requirements": [] + }, + "clipr": { + "Package": "clipr", + "Version": "0.8.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "3f038e5ac7f41d4ac41ce658c85e3042", + "Requirements": [] + }, + "colorblindr": { + "Package": "colorblindr", + "Version": "0.1.0", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteUsername": "clauswilke", + "RemoteRepo": "colorblindr", + "RemoteRef": "master", + "RemoteSha": "90d64f8fc50bee7060be577f180ae019a9bbbb84", + "Hash": "f436a46053e07b9eb52aef418967040e", + "Requirements": [ + "colorspace", + "cowplot", + "ggplot2", + "scales", + "shiny" + ] + }, + "colorspace": { + "Package": "colorspace", + "Version": "2.0-3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "bb4341986bc8b914f0f0acf2e4a3f2f7", + "Requirements": [] + }, + "colourScaleR": { + "Package": "colourScaleR", + "Version": "1.1.1", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteUsername": "RichardJActon", + "RemoteRepo": "colourScaleR", + "RemoteRef": "master", + "RemoteSha": "b18385cc06998c16300c30f36424187d899bbb02", + "Hash": "68386f81b30473ef09070cc44bad2897", + "Requirements": [ + "RColorBrewer", + "circlize", + "gridExtra", + "purrr", + "scales", + "scico", + "viridis" + ] + }, + "commonmark": { + "Package": "commonmark", + "Version": "1.9.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5d8225445acb167abf7797de48b2ee3c", + "Requirements": [] + }, + "cowplot": { + "Package": "cowplot", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "b418e8423699d11c7f2087c2bfd07da2", + "Requirements": [ + "ggplot2", + "gtable", + "rlang", + "scales" + ] + }, + "cpp11": { + "Package": "cpp11", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "fa53ce256cd280f468c080a58ea5ba8c", + "Requirements": [] + }, + "crayon": { + "Package": "crayon", + "Version": "1.5.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "8dc45fd8a1ee067a92b85ef274e66d6a", + "Requirements": [] + }, + "crosstalk": { + "Package": "crosstalk", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6aa54f69598c32177e920eb3402e8293", + "Requirements": [ + "R6", + "htmltools", + "jsonlite", + "lazyeval" + ] + }, + "curl": { + "Package": "curl", + "Version": "5.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ce88d13c0b10fe88a37d9c59dba2d7f9", + "Requirements": [] + }, + "data.table": { + "Package": "data.table", + "Version": "1.14.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "36b67b5adf57b292923f5659f5f0c853", + "Requirements": [] + }, + "datasauRus": { + "Package": "datasauRus", + "Version": "0.1.6", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "d272d768e65f7cf7e94ab5f327dabedd", + "Requirements": [] + }, + "digest": { + "Package": "digest", + "Version": "0.6.29", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "cf6b206a045a684728c3267ef7596190", + "Requirements": [] + }, + "dplyr": { + "Package": "dplyr", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "fedd9d00c2944ff00a0e2696ccf048ec", + "Requirements": [ + "R6", + "cli", + "generics", + "glue", + "lifecycle", + "magrittr", + "pillar", + "rlang", + "tibble", + "tidyselect", + "vctrs" + ] + }, + "ellipsis": { + "Package": "ellipsis", + "Version": "0.3.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077", + "Requirements": [ + "rlang" + ] + }, + "evaluate": { + "Package": "evaluate", + "Version": "0.15", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "699a7a93d08c962d9f8950b2d7a227f1", + "Requirements": [] + }, + "fansi": { + "Package": "fansi", + "Version": "1.0.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "83a8afdbe71839506baa9f90eebad7ec", + "Requirements": [] + }, + "farver": { + "Package": "farver", + "Version": "2.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c98eb5133d9cb9e1622b8691487f11bb", + "Requirements": [] + }, + "fastmap": { + "Package": "fastmap", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "77bd60a6157420d4ffa93b27cf6a58b8", + "Requirements": [] + }, + "flextable": { + "Package": "flextable", + "Version": "0.7.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "f2702eb2a89690201c2767161e350189", + "Requirements": [ + "base64enc", + "data.table", + "gdtools", + "htmltools", + "knitr", + "officer", + "rlang", + "rmarkdown", + "uuid", + "xml2" + ] + }, + "fontawesome": { + "Package": "fontawesome", + "Version": "0.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "55624ed409e46c5f358b2c060be87f67", + "Requirements": [ + "htmltools", + "rlang" + ] + }, + "fs": { + "Package": "fs", + "Version": "1.6.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "47b5f30c720c23999b913a1a635cf0bb", + "Requirements": [] + }, + "gdtools": { + "Package": "gdtools", + "Version": "0.2.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "bdfa7431687797edff8c9b0eb9271cc8", + "Requirements": [ + "Rcpp", + "systemfonts" + ] + }, + "generics": { + "Package": "generics", + "Version": "0.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "177475892cf4a55865868527654a7741", + "Requirements": [] + }, + "ggbeeswarm": { + "Package": "ggbeeswarm", + "Version": "0.6.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "dd68b9b215b2d3119603549a794003c3", + "Requirements": [ + "beeswarm", + "ggplot2", + "vipor" + ] + }, + "ggforce": { + "Package": "ggforce", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "4c64a588b497f8c088e1d308ddd40bc6", + "Requirements": [ + "MASS", + "Rcpp", + "RcppEigen", + "ggplot2", + "gtable", + "polyclip", + "rlang", + "scales", + "tidyselect", + "tweenr", + "withr" + ] + }, + "ggplot2": { + "Package": "ggplot2", + "Version": "3.3.6", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "0fb26d0674c82705c6b701d1a61e02ea", + "Requirements": [ + "MASS", + "digest", + "glue", + "gtable", + "isoband", + "mgcv", + "rlang", + "scales", + "tibble", + "withr" + ] + }, + "ggridges": { + "Package": "ggridges", + "Version": "0.5.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "9d028e8f37c84dba356ce3c367a1978e", + "Requirements": [ + "ggplot2", + "plyr", + "scales", + "withr" + ] + }, + "glue": { + "Package": "glue", + "Version": "1.6.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "4f2596dfb05dac67b9dc558e5c6fba2e", + "Requirements": [] + }, + "gridExtra": { + "Package": "gridExtra", + "Version": "2.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7d7f283939f563670a697165b2cf5560", + "Requirements": [ + "gtable" + ] + }, + "gt": { + "Package": "gt", + "Version": "0.10.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "03009c105dfae79460b8eb9d8cf791e4", + "Requirements": [ + "base64enc", + "bigD", + "bitops", + "cli", + "commonmark", + "dplyr", + "fs", + "glue", + "htmltools", + "htmlwidgets", + "juicyjuice", + "magrittr", + "markdown", + "reactable", + "rlang", + "sass", + "scales", + "tidyselect", + "vctrs", + "xml2" + ] + }, + "gtExtras": { + "Package": "gtExtras", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "24aa63092edab43b7b0fc6324329cbb4", + "Requirements": [ + "commonmark", + "dplyr", + "fontawesome", + "ggplot2", + "glue", + "gt", + "htmltools", + "paletteer", + "rlang", + "scales" + ] + }, + "gtable": { + "Package": "gtable", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ac5c6baf7822ce8732b343f14c072c4d", + "Requirements": [] + }, + "highr": { + "Package": "highr", + "Version": "0.9", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "8eb36c8125038e648e5d111c0d7b2ed4", + "Requirements": [ + "xfun" + ] + }, + "hms": { + "Package": "hms", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5b8a2dd0fdbe2ab4f6081e6c7be6dfca", + "Requirements": [ + "ellipsis", + "lifecycle", + "pkgconfig", + "rlang", + "vctrs" + ] + }, + "htmltools": { + "Package": "htmltools", + "Version": "0.5.7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "2d7b3857980e0e0d0a1fd6f11928ab0f", + "Requirements": [ + "base64enc", + "digest", + "ellipsis", + "fastmap", + "rlang" + ] + }, + "htmlwidgets": { + "Package": "htmlwidgets", + "Version": "1.6.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "04291cc45198225444a397606810ac37", + "Requirements": [ + "htmltools", + "jsonlite", + "knitr", + "rmarkdown", + "yaml" + ] + }, + "httpuv": { + "Package": "httpuv", + "Version": "1.6.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "97fe71f0a4a1c9890e6c2128afa04bc0", + "Requirements": [ + "R6", + "Rcpp", + "later", + "promises" + ] + }, + "isoband": { + "Package": "isoband", + "Version": "0.2.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7ab57a6de7f48a8dc84910d1eca42883", + "Requirements": [] + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5aab57a3bd297eee1c1d862735972182", + "Requirements": [ + "htmltools" + ] + }, + "jsonlite": { + "Package": "jsonlite", + "Version": "1.8.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "d07e729b27b372429d42d24d503613a0", + "Requirements": [] + }, + "juicyjuice": { + "Package": "juicyjuice", + "Version": "0.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "3bcd11943da509341838da9399e18bce", + "Requirements": [ + "V8" + ] + }, + "knitr": { + "Package": "knitr", + "Version": "1.39", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "029ab7c4badd3cf8af69016b2ba27493", + "Requirements": [ + "evaluate", + "highr", + "stringr", + "xfun", + "yaml" + ] + }, + "labeling": { + "Package": "labeling", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "3d5108641f47470611a32d0bdf357a72", + "Requirements": [] + }, + "later": { + "Package": "later", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7e7b457d7766bc47f2a5f21cc2984f8e", + "Requirements": [ + "Rcpp", + "rlang" + ] + }, + "lattice": { + "Package": "lattice", + "Version": "0.20-45", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "b64cdbb2b340437c4ee047a1f4c4377b", + "Requirements": [] + }, + "lazyeval": { + "Package": "lazyeval", + "Version": "0.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "d908914ae53b04d4c0c0fd72ecc35370", + "Requirements": [] + }, + "lifecycle": { + "Package": "lifecycle", + "Version": "1.0.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "001cecbeac1cff9301bdc3775ee46a86", + "Requirements": [ + "cli", + "glue", + "rlang" + ] + }, + "magrittr": { + "Package": "magrittr", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7ce2733a9826b3aeb1775d56fd305472", + "Requirements": [] + }, + "markdown": { + "Package": "markdown", + "Version": "1.12", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "765cf53992401b3b6c297b69e1edb8bd", + "Requirements": [ + "commonmark", + "xfun" + ] + }, + "mgcv": { + "Package": "mgcv", + "Version": "1.8-40", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c6b2fdb18cf68ab613bd564363e1ba0d", + "Requirements": [ + "Matrix", + "nlme" + ] + }, + "mime": { + "Package": "mime", + "Version": "0.12", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "18e9c28c1d3ca1560ce30658b22ce104", + "Requirements": [] + }, + "munsell": { + "Package": "munsell", + "Version": "0.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6dfe8bf774944bd5595785e3229d8771", + "Requirements": [ + "colorspace" + ] + }, + "nlme": { + "Package": "nlme", + "Version": "3.1-158", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "9469aeaeddf4f48a7ac70877d0b7ba36", + "Requirements": [ + "lattice" + ] + }, + "officer": { + "Package": "officer", + "Version": "0.4.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "412d0a3a35484ddb3fffd07d5f38fa36", + "Requirements": [ + "R6", + "uuid", + "xml2", + "zip" + ] + }, + "paletteer": { + "Package": "paletteer", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "1ae0f416121f09e4d9007fd13e6fee77", + "Requirements": [ + "prismatic", + "rematch2", + "rlang", + "rstudioapi" + ] + }, + "pillar": { + "Package": "pillar", + "Version": "1.9.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "15da5a8412f317beeee6175fbc76f4bb", + "Requirements": [ + "cli", + "fansi", + "glue", + "lifecycle", + "rlang", + "utf8", + "vctrs" + ] + }, + "pkgconfig": { + "Package": "pkgconfig", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "01f28d4278f15c76cddbea05899c5d6f", + "Requirements": [] + }, + "plyr": { + "Package": "plyr", + "Version": "1.8.7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "9c17c6ee41639ebdc1d7266546d3b627", + "Requirements": [ + "Rcpp" + ] + }, + "polyclip": { + "Package": "polyclip", + "Version": "1.10-0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "cb167f328b3ada4ec5cf67a7df4c900a", + "Requirements": [] + }, + "prettyunits": { + "Package": "prettyunits", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "95ef9167b75dde9d2ccc3c7528393e7e", + "Requirements": [] + }, + "prismatic": { + "Package": "prismatic", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "a08df48bec022eac1ffa77543318bd33", + "Requirements": [ + "farver" + ] + }, + "processx": { + "Package": "processx", + "Version": "3.6.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "a11891e28c1f1e5ddd773ba1b8c07cf6", + "Requirements": [ + "R6", + "ps" + ] + }, + "progress": { + "Package": "progress", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061", + "Requirements": [ + "R6", + "crayon", + "hms", + "prettyunits" + ] + }, + "promises": { + "Package": "promises", + "Version": "1.2.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "4ab2c43adb4d4699cf3690acd378d75d", + "Requirements": [ + "R6", + "Rcpp", + "later", + "magrittr", + "rlang" + ] + }, + "ps": { + "Package": "ps", + "Version": "1.7.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "8b93531308c01ad0e56d9eadcc0c4fcd", + "Requirements": [] + }, + "purrr": { + "Package": "purrr", + "Version": "0.3.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "97def703420c8ab10d8f0e6c72101e02", + "Requirements": [ + "magrittr", + "rlang" + ] + }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5e3c5dc0b071b21fa128676560dbe94d", + "Requirements": [] + }, + "reactR": { + "Package": "reactR", + "Version": "0.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c9014fd1a435b2d790dd506589cb24e5", + "Requirements": [ + "htmltools" + ] + }, + "reactable": { + "Package": "reactable", + "Version": "0.4.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6069eb2a6597963eae0605c1875ff14c", + "Requirements": [ + "digest", + "htmltools", + "htmlwidgets", + "jsonlite", + "reactR" + ] + }, + "reactablefmtr": { + "Package": "reactablefmtr", + "Version": "2.0.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "03265b5334226d0ad25e1fc170ed6c27", + "Requirements": [ + "dplyr", + "htmltools", + "htmlwidgets", + "magrittr", + "purrr", + "reactable", + "sass", + "shiny", + "stringr", + "tippy", + "webshot" + ] + }, + "readr": { + "Package": "readr", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "9c59de1357dc209868b5feb5c9f0fe2f", + "Requirements": [ + "R6", + "cli", + "clipr", + "cpp11", + "crayon", + "hms", + "lifecycle", + "rlang", + "tibble", + "tzdb", + "vroom" + ] + }, + "rematch2": { + "Package": "rematch2", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "76c9e04c712a05848ae7a23d2f170a40", + "Requirements": [ + "tibble" + ] + }, + "renv": { + "Package": "renv", + "Version": "0.15.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6a38294e7d12f5d8e656b08c5bd8ae34", + "Requirements": [] + }, + "rlang": { + "Package": "rlang", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "dc079ccd156cde8647360f473c1fa718", + "Requirements": [] + }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.14", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "31b60a882fabfabf6785b8599ffeb8ba", + "Requirements": [ + "bslib", + "evaluate", + "htmltools", + "jquerylib", + "jsonlite", + "knitr", + "stringr", + "tinytex", + "xfun", + "yaml" + ] + }, + "rstudioapi": { + "Package": "rstudioapi", + "Version": "0.13", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "06c85365a03fdaf699966cc1d3cf53ea", + "Requirements": [] + }, + "sass": { + "Package": "sass", + "Version": "0.4.8", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "168f9353c76d4c4b0a0bbf72e2c2d035", + "Requirements": [ + "R6", + "fs", + "htmltools", + "rappdirs", + "rlang" + ] + }, + "scales": { + "Package": "scales", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c19df082ba346b0ffa6f833e92de34d1", + "Requirements": [ + "R6", + "RColorBrewer", + "cli", + "farver", + "glue", + "labeling", + "lifecycle", + "munsell", + "rlang", + "viridisLite" + ] + }, + "scico": { + "Package": "scico", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5a01105ea6161bd623a2318f7e370271", + "Requirements": [ + "scales" + ] + }, + "shape": { + "Package": "shape", + "Version": "1.4.6", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "9067f962730f58b14d8ae54ca885509f", + "Requirements": [] + }, + "shiny": { + "Package": "shiny", + "Version": "1.7.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "00344c227c7bd0ab5d78052c5d736c44", + "Requirements": [ + "R6", + "bslib", + "cachem", + "commonmark", + "crayon", + "ellipsis", + "fastmap", + "fontawesome", + "glue", + "htmltools", + "httpuv", + "jsonlite", + "later", + "lifecycle", + "mime", + "promises", + "rlang", + "sourcetools", + "withr", + "xtable" + ] + }, + "sourcetools": { + "Package": "sourcetools", + "Version": "0.1.7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "947e4e02a79effa5d512473e10f41797", + "Requirements": [] + }, + "stringi": { + "Package": "stringi", + "Version": "1.7.6", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "bba431031d30789535745a9627ac9271", + "Requirements": [] + }, + "stringr": { + "Package": "stringr", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "0759e6b6c0957edb1311028a49a35e76", + "Requirements": [ + "glue", + "magrittr", + "stringi" + ] + }, + "systemfonts": { + "Package": "systemfonts", + "Version": "1.0.4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "90b28393209827327de889f49935140a", + "Requirements": [ + "cpp11" + ] + }, + "tibble": { + "Package": "tibble", + "Version": "3.2.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "a84e2cc86d07289b3b6f5069df7a004c", + "Requirements": [ + "fansi", + "lifecycle", + "magrittr", + "pillar", + "pkgconfig", + "rlang", + "vctrs" + ] + }, + "tidyr": { + "Package": "tidyr", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "d8b95b7fee945d7da6888cf7eb71a49c", + "Requirements": [ + "cpp11", + "dplyr", + "ellipsis", + "glue", + "lifecycle", + "magrittr", + "purrr", + "rlang", + "tibble", + "tidyselect", + "vctrs" + ] + }, + "tidyselect": { + "Package": "tidyselect", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "79540e5fcd9e0435af547d885f184fd5", + "Requirements": [ + "cli", + "glue", + "lifecycle", + "rlang", + "vctrs", + "withr" + ] + }, + "tinytex": { + "Package": "tinytex", + "Version": "0.40", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "e7b654da5e77bc4e5435a966329cd25f", + "Requirements": [ + "xfun" + ] + }, + "tippy": { + "Package": "tippy", + "Version": "0.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "39b1d69229e30314e7cba023c777f52d", + "Requirements": [ + "htmltools", + "htmlwidgets", + "jsonlite", + "shiny" + ] + }, + "tweenr": { + "Package": "tweenr", + "Version": "1.0.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6cc663f970a529dbf776f11d5bcd1a2e", + "Requirements": [ + "Rcpp", + "farver", + "magrittr", + "rlang" + ] + }, + "tzdb": { + "Package": "tzdb", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "b2e1cbce7c903eaf23ec05c58e59fb5e", + "Requirements": [ + "cpp11" + ] + }, + "utf8": { + "Package": "utf8", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c9c462b759a5cc844ae25b5942654d13", + "Requirements": [] + }, + "uuid": { + "Package": "uuid", + "Version": "1.1-0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "f1cb46c157d080b729159d407be83496", + "Requirements": [] + }, + "vctrs": { + "Package": "vctrs", + "Version": "0.6.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c03fa420630029418f7e6da3667aac4a", + "Requirements": [ + "cli", + "glue", + "lifecycle", + "rlang" + ] + }, + "vipor": { + "Package": "vipor", + "Version": "0.4.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ea85683da7f2bfa63a98dc6416892591", + "Requirements": [] + }, + "viridis": { + "Package": "viridis", + "Version": "0.6.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "ee96aee95a7a563e5496f8991e9fde4b", + "Requirements": [ + "ggplot2", + "gridExtra", + "viridisLite" + ] + }, + "viridisLite": { + "Package": "viridisLite", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "55e157e2aa88161bdb0754218470d204", + "Requirements": [] + }, + "vroom": { + "Package": "vroom", + "Version": "1.5.7", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "976507b5a105bc3bdf6a5a5f29e0684f", + "Requirements": [ + "bit64", + "cli", + "cpp11", + "crayon", + "glue", + "hms", + "lifecycle", + "progress", + "rlang", + "tibble", + "tidyselect", + "tzdb", + "vctrs", + "withr" + ] + }, + "webshot": { + "Package": "webshot", + "Version": "0.5.3", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "7261ab7f98e97c771217e6b87c085d6e", + "Requirements": [ + "callr", + "jsonlite", + "magrittr" + ] + }, + "webshot2": { + "Package": "webshot2", + "Version": "0.1.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "501f4bf937637caf4fc982d264bcc839", + "Requirements": [ + "callr", + "chromote", + "later", + "magrittr", + "promises" + ] + }, + "websocket": { + "Package": "websocket", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "76e0d400757e318cca33def29ccebbc2", + "Requirements": [ + "AsioHeaders", + "R6", + "cpp11", + "later" + ] + }, + "withr": { + "Package": "withr", + "Version": "2.5.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c0e49a9760983e81e55cdd9be92e7182", + "Requirements": [] + }, + "xfun": { + "Package": "xfun", + "Version": "0.38", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "1ed71215d45e85562d3b1b29a068ccec", + "Requirements": [] + }, + "xml2": { + "Package": "xml2", + "Version": "1.3.6", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "1d0336142f4cd25d8d23cd3ba7a8fb61", + "Requirements": [ + "cli", + "rlang" + ] + }, + "xtable": { + "Package": "xtable", + "Version": "1.8-4", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2", + "Requirements": [] + }, + "yaml": { + "Package": "yaml", + "Version": "2.3.5", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "458bb38374d73bf83b1bb85e353da200", + "Requirements": [] + }, + "zip": { + "Package": "zip", + "Version": "2.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c7eef2996ac270a18c2715c997a727c5", + "Requirements": [] + } + } +} diff --git a/tests/testthat/testdata/renv-samples/renv_v0-17-3.lock b/tests/testthat/testdata/renv-samples/renv_v0-17-3.lock new file mode 100644 index 00000000..36c05c51 --- /dev/null +++ b/tests/testthat/testdata/renv-samples/renv_v0-17-3.lock @@ -0,0 +1,1732 @@ +{ + "R": { + "Version": "4.3.1", + "Repositories": [ + { + "Name": "CRAN", + "URL": "https://packagemanager.rstudio.com/cran/2024-02-29" + } + ] + }, + "Packages": { + "BH": { + "Package": "BH", + "Version": "1.84.0-0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "a8235afbcd6316e6e91433ea47661013" + }, + "R6": { + "Package": "R6", + "Version": "2.5.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "470851b6d5d0ac559e9d01bb352b4021" + }, + "RApiSerialize": { + "Package": "RApiSerialize", + "Version": "0.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "d8a79c95f553670ceffbd190815bbfce" + }, + "Rcpp": { + "Package": "Rcpp", + "Version": "1.0.12", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "methods", + "utils" + ], + "Hash": "5ea2700d21e038ace58269ecdbeb9ec0" + }, + "RcppParallel": { + "Package": "RcppParallel", + "Version": "5.1.7", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "a45594a00f5dbb073d5ec9f48592a08a" + }, + "anytime": { + "Package": "anytime", + "Version": "0.3.9", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "BH", + "R", + "Rcpp" + ], + "Hash": "74a64813f17b492da9c6afda6b128e3d" + }, + "askpass": { + "Package": "askpass", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "sys" + ], + "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" + }, + "assertthat": { + "Package": "assertthat", + "Version": "0.2.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "tools" + ], + "Hash": "50c838a310445e954bc13f26f26a6ecf" + }, + "backports": { + "Package": "backports", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "c39fbec8a30d23e721980b8afb31984c" + }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "543776ae6848fde2f48ff3816d0628bc" + }, + "bit": { + "Package": "bit", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "d242abec29412ce988848d0294b208fd" + }, + "bit64": { + "Package": "bit64", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "bit", + "methods", + "stats", + "utils" + ], + "Hash": "9fe98599ca456d6552421db0d6772d8f" + }, + "brew": { + "Package": "brew", + "Version": "1.0-10", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "8f4a384e19dccd8c65356dc096847b76" + }, + "brio": { + "Package": "brio", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "68bd2b066e1fe780bbf62fc8bcc36de3" + }, + "bslib": { + "Package": "bslib", + "Version": "0.6.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "base64enc", + "cachem", + "grDevices", + "htmltools", + "jquerylib", + "jsonlite", + "lifecycle", + "memoise", + "mime", + "rlang", + "sass" + ], + "Hash": "c0d8599494bc7fb408cd206bbdd9cab0" + }, + "cachem": { + "Package": "cachem", + "Version": "1.0.8", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "fastmap", + "rlang" + ], + "Hash": "c35768291560ce302c0a6589f92e837d" + }, + "callr": { + "Package": "callr", + "Version": "3.7.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "processx", + "utils" + ], + "Hash": "9f0e4fae4963ba775a5e5c520838c87b" + }, + "checkmate": { + "Package": "checkmate", + "Version": "2.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "backports", + "utils" + ], + "Hash": "c01cab1cb0f9125211a6fc99d540e315" + }, + "cli": { + "Package": "cli", + "Version": "3.6.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "utils" + ], + "Hash": "1216ac65ac55ec0058a6f75d7ca0fd52" + }, + "clipr": { + "Package": "clipr", + "Version": "0.8.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "utils" + ], + "Hash": "3f038e5ac7f41d4ac41ce658c85e3042" + }, + "commonmark": { + "Package": "commonmark", + "Version": "1.9.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5d8225445acb167abf7797de48b2ee3c" + }, + "cpp11": { + "Package": "cpp11", + "Version": "0.4.7", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "5a295d7d963cc5035284dcdbaf334f4e" + }, + "crayon": { + "Package": "crayon", + "Version": "1.5.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "grDevices", + "methods", + "utils" + ], + "Hash": "e8a1e41acf02548751f45c718d55aa6a" + }, + "credentials": { + "Package": "credentials", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "askpass", + "curl", + "jsonlite", + "openssl", + "sys" + ], + "Hash": "c7844b32098dcbd1c59cbd8dddb4ecc6" + }, + "curl": { + "Package": "curl", + "Version": "5.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "ce88d13c0b10fe88a37d9c59dba2d7f9" + }, + "desc": { + "Package": "desc", + "Version": "1.4.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "cli", + "utils" + ], + "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" + }, + "devtools": { + "Package": "devtools", + "Version": "2.4.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "desc", + "ellipsis", + "fs", + "lifecycle", + "memoise", + "miniUI", + "pkgbuild", + "pkgdown", + "pkgload", + "profvis", + "rcmdcheck", + "remotes", + "rlang", + "roxygen2", + "rversions", + "sessioninfo", + "stats", + "testthat", + "tools", + "urlchecker", + "usethis", + "utils", + "withr" + ], + "Hash": "ea5bc8b4a6a01e4f12d98b58329930bb" + }, + "diffobj": { + "Package": "diffobj", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "crayon", + "methods", + "stats", + "tools", + "utils" + ], + "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" + }, + "digest": { + "Package": "digest", + "Version": "0.6.34", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "utils" + ], + "Hash": "7ede2ee9ea8d3edbf1ca84c1e333ad1a" + }, + "downlit": { + "Package": "downlit", + "Version": "0.4.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "brio", + "desc", + "digest", + "evaluate", + "fansi", + "memoise", + "rlang", + "vctrs", + "withr", + "yaml" + ], + "Hash": "14fa1f248b60ed67e1f5418391a17b14" + }, + "dplyr": { + "Package": "dplyr", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "cli", + "generics", + "glue", + "lifecycle", + "magrittr", + "methods", + "pillar", + "rlang", + "tibble", + "tidyselect", + "utils", + "vctrs" + ], + "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" + }, + "ellipsis": { + "Package": "ellipsis", + "Version": "0.3.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "rlang" + ], + "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" + }, + "emo": { + "Package": "emo", + "Version": "0.0.0.9000", + "Source": "git", + "RemoteType": "git", + "RemoteUrl": "https://github.com/hadley/emo", + "RemoteHost": "api.github.com", + "RemoteUsername": "hadley", + "RemoteRepo": "emo", + "RemoteRef": "master", + "RemoteSha": "3f03b11491ce3d6fc5601e210927eff73bf8e350", + "Requirements": [ + "R", + "assertthat", + "crayon", + "glue", + "lubridate", + "magrittr", + "purrr", + "rlang", + "stringr", + "utils" + ], + "Hash": "eb32b8f0bb50621ad498f5d836b546a4" + }, + "evaluate": { + "Package": "evaluate", + "Version": "0.23", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "methods" + ], + "Hash": "daf4a1246be12c1fa8c7705a0935c1a0" + }, + "fansi": { + "Package": "fansi", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "grDevices", + "utils" + ], + "Hash": "962174cf2aeb5b9eea581522286a911f" + }, + "fastmap": { + "Package": "fastmap", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "f7736a18de97dea803bde0a2daaafb27" + }, + "fontawesome": { + "Package": "fontawesome", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "htmltools", + "rlang" + ], + "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" + }, + "fs": { + "Package": "fs", + "Version": "1.6.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "methods" + ], + "Hash": "47b5f30c720c23999b913a1a635cf0bb" + }, + "generics": { + "Package": "generics", + "Version": "0.1.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "methods" + ], + "Hash": "15e9634c0fcd294799e9b2e929ed1b86" + }, + "gert": { + "Package": "gert", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "askpass", + "credentials", + "openssl", + "rstudioapi", + "sys", + "zip" + ], + "Hash": "f70d3fe2d9e7654213a946963d1591eb" + }, + "getopt": { + "Package": "getopt", + "Version": "1.20.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "stats" + ], + "Hash": "ed33b16c6d24f7ced1d68877ac2509ee" + }, + "gh": { + "Package": "gh", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "gitcreds", + "httr2", + "ini", + "jsonlite", + "rlang" + ], + "Hash": "03533b1c875028233598f848fda44c4c" + }, + "gitcreds": { + "Package": "gitcreds", + "Version": "0.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "ab08ac61f3e1be454ae21911eb8bc2fe" + }, + "glue": { + "Package": "glue", + "Version": "1.7.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "methods" + ], + "Hash": "e0b3a53876554bd45879e596cdb10a52" + }, + "highr": { + "Package": "highr", + "Version": "0.10", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "xfun" + ], + "Hash": "06230136b2d2b9ba5805e1963fa6e890" + }, + "hms": { + "Package": "hms", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "lifecycle", + "methods", + "pkgconfig", + "rlang", + "vctrs" + ], + "Hash": "b59377caa7ed00fa41808342002138f9" + }, + "htmltools": { + "Package": "htmltools", + "Version": "0.5.7", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "base64enc", + "digest", + "ellipsis", + "fastmap", + "grDevices", + "rlang", + "utils" + ], + "Hash": "2d7b3857980e0e0d0a1fd6f11928ab0f" + }, + "htmlwidgets": { + "Package": "htmlwidgets", + "Version": "1.6.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "grDevices", + "htmltools", + "jsonlite", + "knitr", + "rmarkdown", + "yaml" + ], + "Hash": "04291cc45198225444a397606810ac37" + }, + "httpuv": { + "Package": "httpuv", + "Version": "1.6.14", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "Rcpp", + "later", + "promises", + "utils" + ], + "Hash": "16abeb167dbf511f8cc0552efaf05bab" + }, + "httr": { + "Package": "httr", + "Version": "1.4.7", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "curl", + "jsonlite", + "mime", + "openssl" + ], + "Hash": "ac107251d9d9fd72f0ca8049988f1d7f" + }, + "httr2": { + "Package": "httr2", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "cli", + "curl", + "glue", + "lifecycle", + "magrittr", + "openssl", + "rappdirs", + "rlang", + "vctrs", + "withr" + ], + "Hash": "e2b30f1fc039a0bab047dd52bb20ef71" + }, + "ini": { + "Package": "ini", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "6154ec2223172bce8162d4153cda21f7" + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "htmltools" + ], + "Hash": "5aab57a3bd297eee1c1d862735972182" + }, + "jsonlite": { + "Package": "jsonlite", + "Version": "1.8.8", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "methods" + ], + "Hash": "e1b9c55281c5adc4dd113652d9e26768" + }, + "knitr": { + "Package": "knitr", + "Version": "1.45", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "evaluate", + "highr", + "methods", + "tools", + "xfun", + "yaml" + ], + "Hash": "1ec462871063897135c1bcbe0fc8f07d" + }, + "later": { + "Package": "later", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "Rcpp", + "rlang" + ], + "Hash": "a3e051d405326b8b0012377434c62b37" + }, + "lifecycle": { + "Package": "lifecycle", + "Version": "1.0.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "glue", + "rlang" + ], + "Hash": "b8552d117e1b808b09a832f589b79035" + }, + "lubridate": { + "Package": "lubridate", + "Version": "1.9.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "generics", + "methods", + "timechange" + ], + "Hash": "680ad542fbcf801442c83a6ac5a2126c" + }, + "magrittr": { + "Package": "magrittr", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "7ce2733a9826b3aeb1775d56fd305472" + }, + "memoise": { + "Package": "memoise", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "cachem", + "rlang" + ], + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" + }, + "mime": { + "Package": "mime", + "Version": "0.12", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "tools" + ], + "Hash": "18e9c28c1d3ca1560ce30658b22ce104" + }, + "miniUI": { + "Package": "miniUI", + "Version": "0.1.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "htmltools", + "shiny", + "utils" + ], + "Hash": "fec5f52652d60615fdb3957b3d74324a" + }, + "openssl": { + "Package": "openssl", + "Version": "2.1.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "askpass" + ], + "Hash": "2a0dc8c6adfb6f032e4d4af82d258ab5" + }, + "optparse": { + "Package": "optparse", + "Version": "1.7.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "getopt", + "methods" + ], + "Hash": "523cc4a72afdf6748b7aaf2cad607435" + }, + "pillar": { + "Package": "pillar", + "Version": "1.9.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "cli", + "fansi", + "glue", + "lifecycle", + "rlang", + "utf8", + "utils", + "vctrs" + ], + "Hash": "15da5a8412f317beeee6175fbc76f4bb" + }, + "pkgbuild": { + "Package": "pkgbuild", + "Version": "1.4.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "callr", + "cli", + "desc", + "processx" + ], + "Hash": "c0143443203205e6a2760ce553dafc24" + }, + "pkgconfig": { + "Package": "pkgconfig", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "utils" + ], + "Hash": "01f28d4278f15c76cddbea05899c5d6f" + }, + "pkgdown": { + "Package": "pkgdown", + "Version": "2.0.7", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "bslib", + "callr", + "cli", + "desc", + "digest", + "downlit", + "fs", + "httr", + "jsonlite", + "magrittr", + "memoise", + "purrr", + "ragg", + "rlang", + "rmarkdown", + "tibble", + "whisker", + "withr", + "xml2", + "yaml" + ], + "Hash": "16fa15449c930bf3a7761d3c68f8abf9" + }, + "pkgload": { + "Package": "pkgload", + "Version": "1.3.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "crayon", + "desc", + "fs", + "glue", + "methods", + "pkgbuild", + "rlang", + "rprojroot", + "utils", + "withr" + ], + "Hash": "876c618df5ae610be84356d5d7a5d124" + }, + "praise": { + "Package": "praise", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "a555924add98c99d2f411e37e7d25e9f" + }, + "prettyunits": { + "Package": "prettyunits", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7" + }, + "processx": { + "Package": "processx", + "Version": "3.8.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "ps", + "utils" + ], + "Hash": "82d48b1aec56084d9438dbf98087a7e9" + }, + "profvis": { + "Package": "profvis", + "Version": "0.3.8", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "htmlwidgets", + "purrr", + "rlang", + "stringr", + "vctrs" + ], + "Hash": "aa5a3864397ce6ae03458f98618395a1" + }, + "progress": { + "Package": "progress", + "Version": "1.2.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "crayon", + "hms", + "prettyunits" + ], + "Hash": "f4625e061cb2865f111b47ff163a5ca6" + }, + "promises": { + "Package": "promises", + "Version": "1.2.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R6", + "Rcpp", + "fastmap", + "later", + "magrittr", + "rlang", + "stats" + ], + "Hash": "0d8a15c9d000970ada1ab21405387dee" + }, + "ps": { + "Package": "ps", + "Version": "1.7.6", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "utils" + ], + "Hash": "dd2b9319ee0656c8acf45c7f40c59de7" + }, + "purrr": { + "Package": "purrr", + "Version": "1.0.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "lifecycle", + "magrittr", + "rlang", + "vctrs" + ], + "Hash": "1cba04a4e9414bdefc9dcaa99649a8dc" + }, + "qs": { + "Package": "qs", + "Version": "0.25.7", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "RApiSerialize", + "Rcpp", + "stringfish" + ], + "Hash": "f5adb766329cc757980d943ce472e831" + }, + "ragg": { + "Package": "ragg", + "Version": "1.2.7", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "systemfonts", + "textshaping" + ], + "Hash": "90a1b8b7e518d7f90480d56453b4d062" + }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" + }, + "rcmdcheck": { + "Package": "rcmdcheck", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R6", + "callr", + "cli", + "curl", + "desc", + "digest", + "pkgbuild", + "prettyunits", + "rprojroot", + "sessioninfo", + "utils", + "withr", + "xopen" + ], + "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4" + }, + "rdflib": { + "Package": "rdflib", + "Version": "0.2.8", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "dplyr", + "methods", + "readr", + "redland", + "stringi", + "tidyr", + "utils" + ], + "Hash": "7aabe63f0e0a33190643e25ba9dd3774" + }, + "readr": { + "Package": "readr", + "Version": "2.1.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "cli", + "clipr", + "cpp11", + "crayon", + "hms", + "lifecycle", + "methods", + "rlang", + "tibble", + "tzdb", + "utils", + "vroom" + ], + "Hash": "9de96463d2117f6ac49980577939dfb3" + }, + "redland": { + "Package": "redland", + "Version": "1.0.17-18", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "methods", + "roxygen2" + ], + "Hash": "53b07f737964507aa0720f514bdda1c9" + }, + "rematch2": { + "Package": "rematch2", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "tibble" + ], + "Hash": "76c9e04c712a05848ae7a23d2f170a40" + }, + "remotes": { + "Package": "remotes", + "Version": "2.4.2.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "methods", + "stats", + "tools", + "utils" + ], + "Hash": "63d15047eb239f95160112bcadc4fcb9" + }, + "renv": { + "Package": "renv", + "Version": "0.17.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "utils" + ], + "Hash": "4543b8cd233ae25c6aba8548be9e747e" + }, + "rjson": { + "Package": "rjson", + "Version": "0.2.21", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "f9da75e6444e95a1baf8ca24909d63b9" + }, + "rlang": { + "Package": "rlang", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "utils" + ], + "Hash": "42548638fae05fd9a9b5f3f437fbbbe2" + }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.25", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "bslib", + "evaluate", + "fontawesome", + "htmltools", + "jquerylib", + "jsonlite", + "knitr", + "methods", + "stringr", + "tinytex", + "tools", + "utils", + "xfun", + "yaml" + ], + "Hash": "d65e35823c817f09f4de424fcdfa812a" + }, + "roxygen2": { + "Package": "roxygen2", + "Version": "7.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "brew", + "cli", + "commonmark", + "cpp11", + "desc", + "knitr", + "methods", + "pkgload", + "purrr", + "rlang", + "stringi", + "stringr", + "utils", + "withr", + "xml2" + ], + "Hash": "c25fe7b2d8cba73d1b63c947bf7afdb9" + }, + "rprojroot": { + "Package": "rprojroot", + "Version": "2.0.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144" + }, + "rstudioapi": { + "Package": "rstudioapi", + "Version": "0.15.0", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "5564500e25cffad9e22244ced1379887" + }, + "rversions": { + "Package": "rversions", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "curl", + "utils", + "xml2" + ], + "Hash": "a9881dfed103e83f9de151dc17002cd1" + }, + "sass": { + "Package": "sass", + "Version": "0.4.8", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R6", + "fs", + "htmltools", + "rappdirs", + "rlang" + ], + "Hash": "168f9353c76d4c4b0a0bbf72e2c2d035" + }, + "sessioninfo": { + "Package": "sessioninfo", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "tools", + "utils" + ], + "Hash": "3f9796a8d0a0e8c6eb49a4b029359d1f" + }, + "shiny": { + "Package": "shiny", + "Version": "1.8.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "bslib", + "cachem", + "commonmark", + "crayon", + "ellipsis", + "fastmap", + "fontawesome", + "glue", + "grDevices", + "htmltools", + "httpuv", + "jsonlite", + "later", + "lifecycle", + "methods", + "mime", + "promises", + "rlang", + "sourcetools", + "tools", + "utils", + "withr", + "xtable" + ], + "Hash": "3a1f41807d648a908e3c7f0334bf85e6" + }, + "shinyWidgets": { + "Package": "shinyWidgets", + "Version": "0.8.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "anytime", + "bslib", + "grDevices", + "htmltools", + "jsonlite", + "rlang", + "sass", + "shiny" + ], + "Hash": "96bb249d21b7473dbeb0311702ef5288" + }, + "sourcetools": { + "Package": "sourcetools", + "Version": "0.1.7-1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "5f5a7629f956619d519205ec475fe647" + }, + "stringfish": { + "Package": "stringfish", + "Version": "0.16.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "Rcpp", + "RcppParallel" + ], + "Hash": "b7eb79470319ae71d4b5ed9cd7bf7294" + }, + "stringi": { + "Package": "stringi", + "Version": "1.8.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "stats", + "tools", + "utils" + ], + "Hash": "058aebddea264f4c99401515182e656a" + }, + "stringr": { + "Package": "stringr", + "Version": "1.5.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "magrittr", + "rlang", + "stringi", + "vctrs" + ], + "Hash": "960e2ae9e09656611e0b8214ad543207" + }, + "sys": { + "Package": "sys", + "Version": "3.4.2", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "3a1be13d68d47a8cd0bfd74739ca1555" + }, + "systemfonts": { + "Package": "systemfonts", + "Version": "1.0.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cpp11" + ], + "Hash": "15b594369e70b975ba9f064295983499" + }, + "testthat": { + "Package": "testthat", + "Version": "3.2.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "R6", + "brio", + "callr", + "cli", + "desc", + "digest", + "evaluate", + "jsonlite", + "lifecycle", + "magrittr", + "methods", + "pkgload", + "praise", + "processx", + "ps", + "rlang", + "utils", + "waldo", + "withr" + ], + "Hash": "4767a686ebe986e6cb01d075b3f09729" + }, + "textshaping": { + "Package": "textshaping", + "Version": "0.3.7", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cpp11", + "systemfonts" + ], + "Hash": "997aac9ad649e0ef3b97f96cddd5622b" + }, + "tibble": { + "Package": "tibble", + "Version": "3.2.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "fansi", + "lifecycle", + "magrittr", + "methods", + "pillar", + "pkgconfig", + "rlang", + "utils", + "vctrs" + ], + "Hash": "a84e2cc86d07289b3b6f5069df7a004c" + }, + "tidyr": { + "Package": "tidyr", + "Version": "1.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "cpp11", + "dplyr", + "glue", + "lifecycle", + "magrittr", + "purrr", + "rlang", + "stringr", + "tibble", + "tidyselect", + "utils", + "vctrs" + ], + "Hash": "915fb7ce036c22a6a33b5a8adb712eb1" + }, + "tidyselect": { + "Package": "tidyselect", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "rlang", + "vctrs", + "withr" + ], + "Hash": "79540e5fcd9e0435af547d885f184fd5" + }, + "timechange": { + "Package": "timechange", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cpp11" + ], + "Hash": "c5f3c201b931cd6474d17d8700ccb1c8" + }, + "tinytex": { + "Package": "tinytex", + "Version": "0.49", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "xfun" + ], + "Hash": "5ac22900ae0f386e54f1c307eca7d843" + }, + "tzdb": { + "Package": "tzdb", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cpp11" + ], + "Hash": "f561504ec2897f4d46f0c7657e488ae1" + }, + "urlchecker": { + "Package": "urlchecker", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "curl", + "tools", + "xml2" + ], + "Hash": "409328b8e1253c8d729a7836fe7f7a16" + }, + "usethis": { + "Package": "usethis", + "Version": "2.2.3", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "clipr", + "crayon", + "curl", + "desc", + "fs", + "gert", + "gh", + "glue", + "jsonlite", + "lifecycle", + "purrr", + "rappdirs", + "rlang", + "rprojroot", + "rstudioapi", + "stats", + "utils", + "whisker", + "withr", + "yaml" + ], + "Hash": "d524fd42c517035027f866064417d7e6" + }, + "utf8": { + "Package": "utf8", + "Version": "1.2.4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "62b65c52671e6665f803ff02954446e9" + }, + "uuid": { + "Package": "uuid", + "Version": "1.2-0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "303c19bfd970bece872f93a824e323d9" + }, + "vctrs": { + "Package": "vctrs", + "Version": "0.6.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "rlang" + ], + "Hash": "c03fa420630029418f7e6da3667aac4a" + }, + "vroom": { + "Package": "vroom", + "Version": "1.6.5", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "bit64", + "cli", + "cpp11", + "crayon", + "glue", + "hms", + "lifecycle", + "methods", + "progress", + "rlang", + "stats", + "tibble", + "tidyselect", + "tzdb", + "vctrs", + "withr" + ], + "Hash": "390f9315bc0025be03012054103d227c" + }, + "waldo": { + "Package": "waldo", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "diffobj", + "fansi", + "glue", + "methods", + "rematch2", + "rlang", + "tibble" + ], + "Hash": "c7d3fd6d29ab077cbac8f0e2751449e6" + }, + "whisker": { + "Package": "whisker", + "Version": "0.4.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "c6abfa47a46d281a7d5159d0a8891e88" + }, + "withr": { + "Package": "withr", + "Version": "3.0.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "grDevices", + "graphics" + ], + "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" + }, + "xfun": { + "Package": "xfun", + "Version": "0.42", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "grDevices", + "stats", + "tools" + ], + "Hash": "fd1349170df31f7a10bd98b0189e85af" + }, + "xml2": { + "Package": "xml2", + "Version": "1.3.6", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "cli", + "methods", + "rlang" + ], + "Hash": "1d0336142f4cd25d8d23cd3ba7a8fb61" + }, + "xopen": { + "Package": "xopen", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "processx" + ], + "Hash": "6c85f015dee9cc7710ddd20f86881f58" + }, + "xtable": { + "Package": "xtable", + "Version": "1.8-4", + "Source": "Repository", + "Repository": "RSPM", + "Requirements": [ + "R", + "stats", + "utils" + ], + "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" + }, + "yaml": { + "Package": "yaml", + "Version": "2.3.8", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "29240487a071f535f5e5d5a323b7afbd" + }, + "zip": { + "Package": "zip", + "Version": "2.3.1", + "Source": "Repository", + "Repository": "RSPM", + "Hash": "fcc4bd8e6da2d2011eb64a5e5cc685ab" + } + } +} diff --git a/tests/testthat/testdata/renv-samples/renv_v1-0-7.lock b/tests/testthat/testdata/renv-samples/renv_v1-0-7.lock new file mode 100644 index 00000000..3b401c41 --- /dev/null +++ b/tests/testthat/testdata/renv-samples/renv_v1-0-7.lock @@ -0,0 +1,955 @@ +{ + "R": { + "Version": "4.4.1", + "Repositories": [ + { + "Name": "CRAN", + "URL": "https://cran.rstudio.com" + } + ] + }, + "Packages": { + "R6": { + "Package": "R6", + "Version": "2.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "470851b6d5d0ac559e9d01bb352b4021" + }, + "askpass": { + "Package": "askpass", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "sys" + ], + "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" + }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "543776ae6848fde2f48ff3816d0628bc" + }, + "brio": { + "Package": "brio", + "Version": "1.1.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "c1ee497a6d999947c2c224ae46799b1a" + }, + "bslib": { + "Package": "bslib", + "Version": "0.8.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "cachem", + "fastmap", + "grDevices", + "htmltools", + "jquerylib", + "jsonlite", + "lifecycle", + "memoise", + "mime", + "rlang", + "sass" + ], + "Hash": "b299c6741ca9746fb227debcb0f9fb6c" + }, + "cachem": { + "Package": "cachem", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "fastmap", + "rlang" + ], + "Hash": "cd9a672193789068eb5a2aad65a0dedf" + }, + "callr": { + "Package": "callr", + "Version": "3.7.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "processx", + "utils" + ], + "Hash": "d7e13f49c19103ece9e58ad2d83a7354" + }, + "cli": { + "Package": "cli", + "Version": "3.6.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "b21916dd77a27642b447374a5d30ecf3" + }, + "clipr": { + "Package": "clipr", + "Version": "0.8.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "utils" + ], + "Hash": "3f038e5ac7f41d4ac41ce658c85e3042" + }, + "codetools": { + "Package": "codetools", + "Version": "0.2-20", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "61e097f35917d342622f21cdc79c256e" + }, + "cpp11": { + "Package": "cpp11", + "Version": "0.4.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5a295d7d963cc5035284dcdbaf334f4e" + }, + "crayon": { + "Package": "crayon", + "Version": "1.5.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "methods", + "utils" + ], + "Hash": "859d96e65ef198fd43e82b9628d593ef" + }, + "credentials": { + "Package": "credentials", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "askpass", + "curl", + "jsonlite", + "openssl", + "sys" + ], + "Hash": "c7844b32098dcbd1c59cbd8dddb4ecc6" + }, + "curl": { + "Package": "curl", + "Version": "5.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "411ca2c03b1ce5f548345d2fc2685f7a" + }, + "desc": { + "Package": "desc", + "Version": "1.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "utils" + ], + "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" + }, + "diffobj": { + "Package": "diffobj", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "crayon", + "methods", + "stats", + "tools", + "utils" + ], + "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" + }, + "digest": { + "Package": "digest", + "Version": "0.6.36", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "fd6824ad91ede64151e93af67df6376b" + }, + "downlit": { + "Package": "downlit", + "Version": "0.4.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "brio", + "desc", + "digest", + "evaluate", + "fansi", + "memoise", + "rlang", + "vctrs", + "withr", + "yaml" + ], + "Hash": "45a6a596bf0108ee1ff16a040a2df897" + }, + "evaluate": { + "Package": "evaluate", + "Version": "0.24.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "a1066cbc05caee9a4bf6d90f194ff4da" + }, + "fansi": { + "Package": "fansi", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "utils" + ], + "Hash": "962174cf2aeb5b9eea581522286a911f" + }, + "fastmap": { + "Package": "fastmap", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" + }, + "fontawesome": { + "Package": "fontawesome", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmltools", + "rlang" + ], + "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" + }, + "fs": { + "Package": "fs", + "Version": "1.6.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "15aeb8c27f5ea5161f9f6a641fafd93a" + }, + "gert": { + "Package": "gert", + "Version": "2.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "askpass", + "credentials", + "openssl", + "rstudioapi", + "sys", + "zip" + ], + "Hash": "ab2ca7d6bd706ed218d096b7b16d7233" + }, + "gh": { + "Package": "gh", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "gitcreds", + "glue", + "httr2", + "ini", + "jsonlite", + "lifecycle", + "rlang" + ], + "Hash": "fbbbc48eba7a6626a08bb365e44b563b" + }, + "gitcreds": { + "Package": "gitcreds", + "Version": "0.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "ab08ac61f3e1be454ae21911eb8bc2fe" + }, + "glue": { + "Package": "glue", + "Version": "1.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "e0b3a53876554bd45879e596cdb10a52" + }, + "highr": { + "Package": "highr", + "Version": "0.11", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "xfun" + ], + "Hash": "d65ba49117ca223614f71b60d85b8ab7" + }, + "htmltools": { + "Package": "htmltools", + "Version": "0.5.8.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "digest", + "fastmap", + "grDevices", + "rlang", + "utils" + ], + "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" + }, + "httr2": { + "Package": "httr2", + "Version": "1.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "cli", + "curl", + "glue", + "lifecycle", + "magrittr", + "openssl", + "rappdirs", + "rlang", + "vctrs", + "withr" + ], + "Hash": "320c8fe23fcb25a6690ef7bdb6a3a705" + }, + "ini": { + "Package": "ini", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6154ec2223172bce8162d4153cda21f7" + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "htmltools" + ], + "Hash": "5aab57a3bd297eee1c1d862735972182" + }, + "jsonlite": { + "Package": "jsonlite", + "Version": "1.8.8", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "methods" + ], + "Hash": "e1b9c55281c5adc4dd113652d9e26768" + }, + "knitr": { + "Package": "knitr", + "Version": "1.48", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "evaluate", + "highr", + "methods", + "tools", + "xfun", + "yaml" + ], + "Hash": "acf380f300c721da9fde7df115a5f86f" + }, + "lifecycle": { + "Package": "lifecycle", + "Version": "1.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "rlang" + ], + "Hash": "b8552d117e1b808b09a832f589b79035" + }, + "magrittr": { + "Package": "magrittr", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "7ce2733a9826b3aeb1775d56fd305472" + }, + "memoise": { + "Package": "memoise", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "cachem", + "rlang" + ], + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" + }, + "mime": { + "Package": "mime", + "Version": "0.12", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tools" + ], + "Hash": "18e9c28c1d3ca1560ce30658b22ce104" + }, + "openssl": { + "Package": "openssl", + "Version": "2.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "askpass" + ], + "Hash": "c62edf62de70cadf40553e10c739049d" + }, + "pillar": { + "Package": "pillar", + "Version": "1.9.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "cli", + "fansi", + "glue", + "lifecycle", + "rlang", + "utf8", + "utils", + "vctrs" + ], + "Hash": "15da5a8412f317beeee6175fbc76f4bb" + }, + "pkgbuild": { + "Package": "pkgbuild", + "Version": "1.4.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "callr", + "cli", + "desc", + "processx" + ], + "Hash": "a29e8e134a460a01e0ca67a4763c595b" + }, + "pkgconfig": { + "Package": "pkgconfig", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "utils" + ], + "Hash": "01f28d4278f15c76cddbea05899c5d6f" + }, + "pkgdown": { + "Package": "pkgdown", + "Version": "2.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bslib", + "callr", + "cli", + "desc", + "digest", + "downlit", + "fontawesome", + "fs", + "httr2", + "jsonlite", + "openssl", + "purrr", + "ragg", + "rlang", + "rmarkdown", + "tibble", + "whisker", + "withr", + "xml2", + "yaml" + ], + "Hash": "0d3d789055c873f48521ce7e23c23f48" + }, + "pkgload": { + "Package": "pkgload", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "desc", + "fs", + "glue", + "lifecycle", + "methods", + "pkgbuild", + "processx", + "rlang", + "rprojroot", + "utils", + "withr" + ], + "Hash": "2ec30ffbeec83da57655b850cf2d3e0e" + }, + "praise": { + "Package": "praise", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a555924add98c99d2f411e37e7d25e9f" + }, + "processx": { + "Package": "processx", + "Version": "3.8.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "ps", + "utils" + ], + "Hash": "0c90a7d71988856bad2a2a45dd871bb9" + }, + "ps": { + "Package": "ps", + "Version": "1.7.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "878b467580097e9c383acbb16adab57a" + }, + "purrr": { + "Package": "purrr", + "Version": "1.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "lifecycle", + "magrittr", + "rlang", + "vctrs" + ], + "Hash": "1cba04a4e9414bdefc9dcaa99649a8dc" + }, + "ragg": { + "Package": "ragg", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "systemfonts", + "textshaping" + ], + "Hash": "e3087db406e079a8a2fd87f413918ed3" + }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" + }, + "rematch2": { + "Package": "rematch2", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "tibble" + ], + "Hash": "76c9e04c712a05848ae7a23d2f170a40" + }, + "renv": { + "Package": "renv", + "Version": "1.0.7", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "utils" + ], + "Hash": "397b7b2a265bc5a7a06852524dabae20" + }, + "rlang": { + "Package": "rlang", + "Version": "1.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" + }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.28", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bslib", + "evaluate", + "fontawesome", + "htmltools", + "jquerylib", + "jsonlite", + "knitr", + "methods", + "tinytex", + "tools", + "utils", + "xfun", + "yaml" + ], + "Hash": "062470668513dcda416927085ee9bdc7" + }, + "rprojroot": { + "Package": "rprojroot", + "Version": "2.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "4c8415e0ec1e29f3f4f6fc108bef0144" + }, + "rstudioapi": { + "Package": "rstudioapi", + "Version": "0.16.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "96710351d642b70e8f02ddeb237c46a7" + }, + "sass": { + "Package": "sass", + "Version": "0.4.9", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "fs", + "htmltools", + "rappdirs", + "rlang" + ], + "Hash": "d53dbfddf695303ea4ad66f86e99b95d" + }, + "sys": { + "Package": "sys", + "Version": "3.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3a1be13d68d47a8cd0bfd74739ca1555" + }, + "systemfonts": { + "Package": "systemfonts", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11", + "lifecycle" + ], + "Hash": "213b6b8ed5afbf934843e6c3b090d418" + }, + "testthat": { + "Package": "testthat", + "Version": "3.2.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "brio", + "callr", + "cli", + "desc", + "digest", + "evaluate", + "jsonlite", + "lifecycle", + "magrittr", + "methods", + "pkgload", + "praise", + "processx", + "ps", + "rlang", + "utils", + "waldo", + "withr" + ], + "Hash": "3f6e7e5e2220856ff865e4834766bf2b" + }, + "textshaping": { + "Package": "textshaping", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cpp11", + "lifecycle", + "systemfonts" + ], + "Hash": "5142f8bc78ed3d819d26461b641627ce" + }, + "tibble": { + "Package": "tibble", + "Version": "3.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "fansi", + "lifecycle", + "magrittr", + "methods", + "pillar", + "pkgconfig", + "rlang", + "utils", + "vctrs" + ], + "Hash": "a84e2cc86d07289b3b6f5069df7a004c" + }, + "tinytex": { + "Package": "tinytex", + "Version": "0.52", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "xfun" + ], + "Hash": "cfbad971a71f0e27cec22e544a08bc3b" + }, + "usethis": { + "Package": "usethis", + "Version": "3.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "clipr", + "crayon", + "curl", + "desc", + "fs", + "gert", + "gh", + "glue", + "jsonlite", + "lifecycle", + "purrr", + "rappdirs", + "rlang", + "rprojroot", + "rstudioapi", + "stats", + "utils", + "whisker", + "withr", + "yaml" + ], + "Hash": "b2fbf93c2127bedd2cbe9b799530d5d2" + }, + "utf8": { + "Package": "utf8", + "Version": "1.2.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "62b65c52671e6665f803ff02954446e9" + }, + "vctrs": { + "Package": "vctrs", + "Version": "0.6.5", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "glue", + "lifecycle", + "rlang" + ], + "Hash": "c03fa420630029418f7e6da3667aac4a" + }, + "waldo": { + "Package": "waldo", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "diffobj", + "fansi", + "glue", + "methods", + "rematch2", + "rlang", + "tibble" + ], + "Hash": "c7d3fd6d29ab077cbac8f0e2751449e6" + }, + "whisker": { + "Package": "whisker", + "Version": "0.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c6abfa47a46d281a7d5159d0a8891e88" + }, + "withr": { + "Package": "withr", + "Version": "3.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "graphics" + ], + "Hash": "07909200e8bbe90426fbfeb73e1e27aa" + }, + "xfun": { + "Package": "xfun", + "Version": "0.47", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "grDevices", + "stats", + "tools" + ], + "Hash": "36ab21660e2d095fef0d83f689e0477c" + }, + "xml2": { + "Package": "xml2", + "Version": "1.3.6", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "cli", + "methods", + "rlang" + ], + "Hash": "1d0336142f4cd25d8d23cd3ba7a8fb61" + }, + "yaml": { + "Package": "yaml", + "Version": "2.3.10", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "51dab85c6c98e50a18d7551e9d49f76c" + }, + "zip": { + "Package": "zip", + "Version": "2.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fcc4bd8e6da2d2011eb64a5e5cc685ab" + } + } +} From adcb182ae996bf3a3432ec1739d3cc0e8ad6c7c8 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Tue, 29 Oct 2024 10:46:27 +0000 Subject: [PATCH 39/44] fix bug where bioconductor is the source if source was not "Repository" `renv2nix()` looked for a remote, source can also be "Bioconductor" and not have a remote which resulted in an error as remote was empty when source was "Bioconductor" --- R/renv_helpers.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index f633d062..a3b3b42e 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -134,7 +134,7 @@ renv2nix <- function( # unsupported_pkgs <- list() renv_lock_pkg_names <- names(renv_lock$Packages) for (i in seq_along(renv_lock$Packages)) { - if (renv_lock$Packages[[i]]$Source == "Repository") { + if (renv_lock$Packages[[i]]$Source %in% c("Repository", "Bioconductor")) { repo_pkgs[[renv_lock_pkg_names[i]]] <- renv_lock$Packages[[i]] } else if (renv_lock$Packages[[i]]$RemoteType %in% c("github", "gitlab")) { remote_pkgs[[renv_lock_pkg_names[i]]] <- renv_lock$Packages[[i]] From c0c7b3ccdd2f6e68931d5c080a6e25095ddce9a1 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Tue, 29 Oct 2024 10:48:14 +0000 Subject: [PATCH 40/44] test sample renv.lock files can be read --- tests/testthat/test-renv_helpers.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 9a1d7d2b..47bd8c50 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -5,12 +5,18 @@ testthat::test_that("testing renv_helpers", { # testthat::skip("skipping remaining renv_helpers tests...") # uncomment to skip subsequent tests + renv_sample_dir <- paste0(testthat::test_path(), "/testdata/renv-samples") + renv_sample_files <- list.files(renv_sample_dir, pattern = "*.lock", full.names = TRUE) + testthat::test_that("Testing `read_renv_lock()`", { testthat::expect_error(read_renv_lock("nosuchfile"), "nosuchfile does not exist") tmpf <- tempfile() cat("not json", file = tmpf) testthat::expect_error(read_renv_lock(tmpf), "Error reading renv\\.lock file") unlink(tmpf) + for (file in renv_sample_files) { + testthat::expect_type(read_renv_lock(file), "list") + } }) synthetic_renv_lock_example <- list( From 41343f3b6985995708d701f0e6f3a25917eb9ad7 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Tue, 29 Oct 2024 10:56:06 +0000 Subject: [PATCH 41/44] removing packages from renv example which appear to have build errors in nix at this version --- .../testdata/renv-samples/renv_v0-14-0.lock | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/tests/testthat/testdata/renv-samples/renv_v0-14-0.lock b/tests/testthat/testdata/renv-samples/renv_v0-14-0.lock index 57197b7f..f7cb643a 100644 --- a/tests/testthat/testdata/renv-samples/renv_v0-14-0.lock +++ b/tests/testthat/testdata/renv-samples/renv_v0-14-0.lock @@ -718,13 +718,6 @@ "Repository": "RSPM", "Hash": "01f28d4278f15c76cddbea05899c5d6f" }, - "pkgdown": { - "Package": "pkgdown", - "Version": "1.6.1", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "8896076540d9e9b556a2ec658c81f916" - }, "pkgload": { "Package": "pkgload", "Version": "1.2.3", @@ -788,13 +781,6 @@ "Repository": "RSPM", "Hash": "97def703420c8ab10d8f0e6c72101e02" }, - "ragg": { - "Package": "ragg", - "Version": "1.1.3", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "663065eff8c6c08eaa9955c6f478ee7a" - }, "rappdirs": { "Package": "rappdirs", "Version": "0.3.3", @@ -1019,13 +1005,6 @@ "Repository": "RSPM", "Hash": "89e55ebe4f5ddd7f43f0f2bc6d96c950" }, - "textshaping": { - "Package": "textshaping", - "Version": "0.3.6", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "1ab6223d3670fac7143202cb6a2d43d5" - }, "tibble": { "Package": "tibble", "Version": "3.1.5", From 62d19ba108fbfb063eec86c5b22e1c163ee04acd Mon Sep 17 00:00:00 2001 From: Bruno Rodrigues Date: Fri, 1 Nov 2024 17:55:47 +0100 Subject: [PATCH 42/44] renv2nix docs --- R/renv_helpers.R | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index a3b3b42e..cc241a20 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -105,20 +105,25 @@ renv_remote_pkgs <- function( #' renv2nix #' -#' @param renv_lock_path location of the renv.lock file, defaults to "renv.lock" -#' @param return_rix_call return the generated rix function call instead of -#' evaluating it this is for debugging purposes, defaults to FALSE -#' @param method the method of generating a nix environment from and renv.lock file. -#' "fast" is an inexact conversion which simply extracts the R version and a list of all the -#' packages in an renv.lock file and adds them to the `r_pkgs` argument of [rix], unless they -#' are from external package repositories such as being installed directly from a github -#' repository in which case an attempt is made to handle them and pass them to the -#' `git_pkgs` argument of [rix] -#' Currently defaults to "fast", "accurate" is not yet implemented +#' @param renv_lock_path Character, path of the renv.lock file, defaults to +#' "renv.lock" +#' @param return_rix_call Logical, return the generated rix function call +#' instead of evaluating it this is for debugging purposes, defaults to +#' `FALSE` +#' @param method Character, the method of generating a nix environment from an +#' renv.lock file. "fast" is an inexact conversion which simply extracts the R +#' version and a list of all the packages in an renv.lock file and adds them +#' to the `r_pkgs` argument of `rix()`. This will use a snapshot of `nixpkgs` +#' that should contain package versions that are not too different from the +#' ones defined in the `renv.lock` file. For packages installed from Github or +#' similar, an attempt is made to handle them and pass them to the `git_pkgs` +#' argument of `rix()`. Currently defaults to "fast", "accurate" is not yet +#' implemented. #' @inheritDotParams rix system_pkgs local_r_pkgs:shell_hook #' -#' @return nothing side effects only, unless `return_rix_call = TRUE` in which case an unevaluated -#' call to the [rix] function is returned +#' @return Nothing, this function is called for its side effects only, unless +#' `return_rix_call = TRUE` in which case an unevaluated call to `rix()` +#' is returned #' @export #' renv2nix <- function( @@ -142,7 +147,7 @@ renv2nix <- function( # unsupported_pkgs[[renv_lock_pkg_names[i]]] <- renv_lock$Packages[[i]] warning( renv_lock$Packages[[i]]$Package, " has the unsupported remote type ", - renv_lock$Packages[[i]]$RemoteType, " and will not be included in the Nix environment.", + renv_lock$Packages[[i]]$RemoteType, " and will not be included in the Nix expression.", "\n Consider manually specifying the git remote or a local package install." ) } @@ -171,8 +176,8 @@ renv2nix <- function( eval(rix_call) } else { stop( - "'accurate' renv based environments with package version matching", - " is not yet implemented :(" + "The 'accurate' method to generate Nix expressions with exact package versions", + "matching the ones in the `renv.lock` file is not yet implemented." ) } } From 078ac16d5f512d7c59babb850fbeace1e6383f98 Mon Sep 17 00:00:00 2001 From: "Richard J. Acton" Date: Sun, 3 Nov 2024 11:26:16 +0000 Subject: [PATCH 43/44] build documentation changes to `renv2nix()` --- man/renv2nix.Rd | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/man/renv2nix.Rd b/man/renv2nix.Rd index a60432c8..bd4dd8d9 100644 --- a/man/renv2nix.Rd +++ b/man/renv2nix.Rd @@ -12,18 +12,22 @@ renv2nix( ) } \arguments{ -\item{renv_lock_path}{location of the renv.lock file, defaults to "renv.lock"} +\item{renv_lock_path}{Character, path of the renv.lock file, defaults to +"renv.lock"} -\item{return_rix_call}{return the generated rix function call instead of -evaluating it this is for debugging purposes, defaults to FALSE} +\item{return_rix_call}{Logical, return the generated rix function call +instead of evaluating it this is for debugging purposes, defaults to +\code{FALSE}} -\item{method}{the method of generating a nix environment from and renv.lock file. -"fast" is an inexact conversion which simply extracts the R version and a list of all the -packages in an renv.lock file and adds them to the \code{r_pkgs} argument of \link{rix}, unless they -are from external package repositories such as being installed directly from a github -repository in which case an attempt is made to handle them and pass them to the -\code{git_pkgs} argument of \link{rix} -Currently defaults to "fast", "accurate" is not yet implemented} +\item{method}{Character, the method of generating a nix environment from an +renv.lock file. "fast" is an inexact conversion which simply extracts the R +version and a list of all the packages in an renv.lock file and adds them +to the \code{r_pkgs} argument of \code{rix()}. This will use a snapshot of \code{nixpkgs} +that should contain package versions that are not too different from the +ones defined in the \code{renv.lock} file. For packages installed from Github or +similar, an attempt is made to handle them and pass them to the \code{git_pkgs} +argument of \code{rix()}. Currently defaults to "fast", "accurate" is not yet +implemented.} \item{...}{ Arguments passed on to \code{\link[=rix]{rix}} @@ -141,8 +145,9 @@ using bleeding edge packages".} }} } \value{ -nothing side effects only, unless \code{return_rix_call = TRUE} in which case an unevaluated -call to the \link{rix} function is returned +Nothing, this function is called for its side effects only, unless +\code{return_rix_call = TRUE} in which case an unevaluated call to \code{rix()} +is returned } \description{ renv2nix From be984909dc49ae98be9a8f1356b4bab397b70ad3 Mon Sep 17 00:00:00 2001 From: Bruno Rodrigues Date: Mon, 18 Nov 2024 12:42:29 +0100 Subject: [PATCH 44/44] please linter (locally) --- R/renv_helpers.R | 20 ++++++++++---------- tests/testthat/test-renv_helpers.R | 23 ++++++++++++++--------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/R/renv_helpers.R b/R/renv_helpers.R index cc241a20..d6c76661 100644 --- a/R/renv_helpers.R +++ b/R/renv_helpers.R @@ -40,10 +40,10 @@ read_renv_lock <- function(renv_lock_path = "renv.lock") { #' renv_remote_pkgs(read_renv_lock()$Packages) #' } renv_remote_pkgs <- function( - renv_lock_remote_pkgs, type = NULL) { + renv_lock_remote_pkgs, type = NULL) { # , "bitbucket", "git", "local", "svn", "url", "version", "cran", "bioc" - supported_pkg_types <- c("github","gitlab") - if(!(is.null(type) || (type %in% supported_pkg_types))) { + supported_pkg_types <- c("github", "gitlab") + if (!(is.null(type) || (type %in% supported_pkg_types))) { stop("Unsupported remote type: ", type) } initial_type_state <- type @@ -51,13 +51,13 @@ renv_remote_pkgs <- function( names(git_pkgs) <- names(renv_lock_remote_pkgs) for (i in seq_along(renv_lock_remote_pkgs)) { renv_lock_pkg_info <- renv_lock_remote_pkgs[[i]] - if(is.null(type)){ - if(is.null(renv_lock_pkg_info$RemoteType)){ + if (is.null(type)) { + if (is.null(renv_lock_pkg_info$RemoteType)) { stop( "Not a package installed from a remote outside of the main package repositories\n", "renv_remote_pkgs() only handles pkgs where remote type is specified" ) - } else if(renv_lock_pkg_info$RemoteType %in% supported_pkg_types) { + } else if (renv_lock_pkg_info$RemoteType %in% supported_pkg_types) { type <- renv_lock_pkg_info$RemoteType } else { stop( @@ -70,7 +70,7 @@ renv_remote_pkgs <- function( if (type != renv_lock_pkg_info$RemoteType) { stop( "Remote type (", renv_lock_pkg_info$RemoteType, ") of ", renv_lock_pkg_info$Package, - " does not match the provided type (", type , ")" + " does not match the provided type (", type, ")" ) } } @@ -155,7 +155,7 @@ renv2nix <- function( git_pkgs <- NULL # as local_r_pkgs expects an archive not sure how to set type here.. # local_r_pkgs <- NULL - if(length(remote_pkgs) > 0) { + if (length(remote_pkgs) > 0) { git_pkgs <- renv_remote_pkgs(remote_pkgs) } rix_call <- call("rix", @@ -176,8 +176,8 @@ renv2nix <- function( eval(rix_call) } else { stop( - "The 'accurate' method to generate Nix expressions with exact package versions", - "matching the ones in the `renv.lock` file is not yet implemented." + "The 'accurate' method to generate Nix expressions with exact package versions", + "matching the ones in the `renv.lock` file is not yet implemented." ) } } diff --git a/tests/testthat/test-renv_helpers.R b/tests/testthat/test-renv_helpers.R index 47bd8c50..beeb038f 100644 --- a/tests/testthat/test-renv_helpers.R +++ b/tests/testthat/test-renv_helpers.R @@ -115,17 +115,24 @@ testthat::test_that("testing renv_helpers", { jsonlite::write_json(synthetic_renv_lock_example, tmpf, auto_unbox = TRUE) expect_error(renv2nix(tmpf, method = "accurate"), "not yet implemented") test_call <- call( - "rix", r_ver = "4.4.1", r_pkgs = c("MASS", "R6"), git_pkgs = expected_git_pkg + "rix", + r_ver = "4.4.1", r_pkgs = c("MASS", "R6"), git_pkgs = expected_git_pkg ) - testthat::expect_warning({ - call <- renv2nix(tmpf, return_rix_call = TRUE) - }, "has the unsupported remote type") + testthat::expect_warning( + { + call <- renv2nix(tmpf, return_rix_call = TRUE) + }, + "has the unsupported remote type" + ) testthat::expect_equal(call, test_call) - warns <- testthat::expect_warning({ - call <- renv2nix(tmpf, return_rix_call = TRUE, ide = "rstudio") - }, "has the unsupported remote type") + warns <- testthat::expect_warning( + { + call <- renv2nix(tmpf, return_rix_call = TRUE, ide = "rstudio") + }, + "has the unsupported remote type" + ) test_call$ide <- "rstudio" testthat::expect_equal(call, test_call) @@ -138,6 +145,4 @@ testthat::test_that("testing renv_helpers", { testthat::expect_equal(renv_lock_r_ver(renv_lock_path = tmpf), "4.4.1") unlink(tmpf) }) - }) -