From 4e2dac3763fc03d68431919238587d354513ca17 Mon Sep 17 00:00:00 2001 From: Eliot McIntire Date: Thu, 30 May 2024 17:30:09 -0700 Subject: [PATCH] missing loading of `geodata`; rm `curl` --- DESCRIPTION | 3 +-- R/setupProject.R | 2 +- tests/testthat/helpers.R | 10 +++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 66be170..c3ff8a3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,7 +6,7 @@ URL: https://spades-project.predictiveecology.org/, https://github.com/PredictiveEcology/SpaDES.project Date: 2024-05-31 -Version: 0.0.8.9057 +Version: 0.0.8.9058 Authors@R: c( person("Eliot J B", "McIntire", email = "eliot.mcintire@nrcan-rncan.gc.ca", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-6914-8316")), @@ -31,7 +31,6 @@ Imports: Suggests: covr, crayon, - curl, digest, ellipsis, filelock, diff --git a/R/setupProject.R b/R/setupProject.R index 5600bba..482d936 100644 --- a/R/setupProject.R +++ b/R/setupProject.R @@ -2291,7 +2291,7 @@ setupStudyArea <- function(studyArea, paths, envir, verbose = getOption("Require if (requireNamespace("reproducible", quietly = TRUE)) # Cache doesn't evaluate the `theCall` inside eval, so need .cacheExtra to identify the actual contents studyArea <- reproducible::Cache(eval(theCall), .cacheExtra = list(studyArea, getStudyArea), - omitArgs = c("enclos", "envir"), + omitArgs = c("enclos", "envir"), verbose = verbose, cachePath = paths$cachePath, .functionName = "getStudyArea") else studyArea <- eval(theCall) diff --git a/tests/testthat/helpers.R b/tests/testthat/helpers.R index e8ba4b5..b51e666 100644 --- a/tests/testthat/helpers.R +++ b/tests/testthat/helpers.R @@ -14,7 +14,7 @@ setupTest <- function(pkgs, envir = parent.frame(), name = .rndstr(1), first = F warns <- capture_warnings({ # withr::local_package("googledrive", .local_envir = envir) - withr::local_package("curl", .local_envir = envir) + # withr::local_package("curl", .local_envir = envir) withr::local_package("crayon", .local_envir = envir) withr::local_package("httr", .local_envir = envir) withr::local_package("waldo", .local_envir = envir) @@ -31,8 +31,12 @@ setupTest <- function(pkgs, envir = parent.frame(), name = .rndstr(1), first = F # } # } - # if (!missing(pkgs)) - # lapply(pkgs, withr::local_package, .local_envir = envir) + if (!missing(pkgs)) { + lapply(pkgs, function(pk) { + skip_if_not_installed(pk) + withr::local_package(pk, .local_envir = envir) + }) + } # withr::local_libpaths(Require::tempdir2(.rndstr(1)), .local_envir = envir)