@@ -157,9 +157,9 @@
Loading
157 157
  checkSumFilePath <- file.path(destinationPath, "CHECKSUMS.txt")
158 158
159 159
  if (is.null(targetFile)) {
160 -
    fileGuess <- .guessAtFile(url = url, archive = archive,
161 -
                              targetFile = targetFile,
162 -
                              destinationPath = destinationPath, verbose = verbose)
160 +
    fileGuess <- .guessAtFile(url = url, archive = archive, targetFile = targetFile,
161 +
                              destinationPath = destinationPath, verbose = verbose,
162 +
                              team_drive = dots[["team_drive"]])
163 163
    if (is.null(archive))
164 164
      archive <- .isArchive(fileGuess)
165 165
    archive <- moveAttributes(fileGuess, archive)
@@ -259,7 +259,7 @@
Loading
259 259
        #   an archive, either remotely, in the case of google or from the basename of url
260 260
        fileGuess <- .guessAtFile(url = url, archive = archive,
261 261
                                  targetFile = targetFile, destinationPath = destinationPath,
262 -
                                  verbose = verbose)
262 +
                                  verbose = verbose, team_drive = dots[["team_drive"]])
263 263
        archive <- .isArchive(fileGuess)
264 264
        # The fileGuess MAY have a fileSize attribute, which can be attached to "archive"
265 265
        archive <- moveAttributes(fileGuess, receiving = archive)
@@ -274,7 +274,6 @@
Loading
274 274
                                      checkSums = checkSums,
275 275
                                      verbose = verbose)
276 276
      }
277 -
278 277
    }
279 278
  }
280 279
@@ -297,7 +296,7 @@
Loading
297 296
  # Deal with "similar" in alsoExtract -- maybe this is obsolete with new feature that uses file_name_sans_ext
298 297
  if (is.null(alsoExtract)) {
299 298
    filesInsideArchive <- .listFilesInArchive(archive)
300 -
    if (isTRUE(length(filesInsideArchive)>0)) {
299 +
    if (isTRUE(length(filesInsideArchive) > 0)) {
301 300
      checkSums <- .checkSumsUpdate(destinationPath, file.path(destinationPath, filesInsideArchive),
302 301
                                    checkSums = checkSums)
303 302
    }
@@ -396,8 +395,8 @@
Loading
396 395
  )
397 396
398 397
  downloadFileResult <- .fixNoFileExtension(downloadFileResult = downloadFileResult,
399 -
                      targetFile = targetFile, archive = archive,
400 -
                      destinationPath = destinationPath, verbose = verbose)
398 +
                                            targetFile = targetFile, archive = archive,
399 +
                                            destinationPath = destinationPath, verbose = verbose)
401 400
402 401
  # Post downloadFile -- put objects into this environment
403 402
  if (!is.null(downloadFileResult$targetFilePath))
@@ -676,14 +675,14 @@
Loading
676 675
}
677 676
678 677
#' @keywords internal
679 -
.guessAtFile <- function(url, archive, targetFile, destinationPath, verbose = getOption("reproducible.verbose", 1)) {
678 +
.guessAtFile <- function(url, archive, targetFile, destinationPath,
679 +
                         verbose = getOption("reproducible.verbose", 1), team_drive = NULL) {
680 680
  guessedFile <- if (!is.null(url)) {
681 681
    if (grepl("drive.google.com", url)) {
682 682
      ie <- isTRUE(internetExists())
683 683
      if (ie) {
684 -
        assessGoogle(url = url, archive = archive,
685 -
                     targetFile = targetFile,
686 -
                     destinationPath = destinationPath, verbose = verbose)
684 +
        assessGoogle(url = url, archive = archive, targetFile = targetFile,
685 +
                     destinationPath = destinationPath, verbose = verbose, team_drive = NULL)
687 686
      } else {
688 687
        # likely offline
689 688
        file.path(destinationPath, .basename(url))

@@ -284,7 +284,8 @@
Loading
284 284
#'
285 285
dlGoogle <- function(url, archive = NULL, targetFile = NULL,
286 286
                     checkSums, skipDownloadMsg, destinationPath,
287 -
                     overwrite, needChecksums, verbose = getOption("reproducible.verbose", 1)) {
287 +
                     overwrite, needChecksums, verbose = getOption("reproducible.verbose", 1),
288 +
                     team_drive = NULL) {
288 289
  .requireNamespace("googledrive", stopOnFALSE = TRUE)
289 290
290 291
  if (missing(destinationPath)) {
@@ -293,16 +294,19 @@
Loading
293 294
  downloadFilename <- assessGoogle(url = url, archive = archive,
294 295
                                   targetFile = targetFile,
295 296
                                   destinationPath = destinationPath,
296 -
                                   verbose = verbose)
297 +
                                   verbose = verbose,
298 +
                                   team_drive = NULL)
297 299
298 300
  destFile <- file.path(destinationPath, basename(downloadFilename))
299 301
  if (!isTRUE(checkSums[checkSums$expectedFile ==  basename(destFile), ]$result == "OK")) {
300 302
    messagePrepInputs("  Downloading from Google Drive.", verbose = verbose)
301 303
    fs <- attr(archive, "fileSize")
302 304
    if (is.null(fs))
303 -
      fs <- attr(assessGoogle(url, verbose = verbose),"fileSize")
304 -
    class(fs) <- "object_size"
305 -
    isLargeFile <- if (is.null(fs)) FALSE else fs > 1e6
305 +
      fs <- attr(assessGoogle(url, verbose = verbose, team_drive = team_drive), "fileSize")
306 +
    if (!is.null(fs))
307 +
      class(fs) <- "object_size"
308 +
309 +
    isLargeFile <- ifelse(is.null(fs), FALSE, fs > 1e6)
306 310
    if (!isWindows() && requireNamespace("future", quietly = TRUE) && isLargeFile &&
307 311
        !.isFALSE(getOption("reproducible.futurePlan"))) {
308 312
      messagePrepInputs("Downloading a large file", verbose = verbose)
@@ -316,8 +320,8 @@
Loading
316 320
      }
317 321
      a <- future::future({
318 322
        googledrive::drive_deauth()
319 -
        retry(quote(googledrive::drive_download(googledrive::as_id(url), path = destFile, overwrite = overwrite,
320 -
                                   verbose = TRUE)))
323 +
        retry(quote(googledrive::drive_download(googledrive::as_id(url), path = destFile,
324 +
                                                overwrite = overwrite, verbose = TRUE)))
321 325
        },
322 326
        globals = list(drive_download = googledrive::drive_download,
323 327
                       as_id = googledrive::as_id,
@@ -340,7 +344,7 @@
Loading
340 344
      cat("\nDone!\n")
341 345
    } else {
342 346
      a <- retry(quote(googledrive::drive_download(googledrive::as_id(url), path = destFile,
343 -
                                                   overwrite = overwrite, verbose = TRUE)))
347 +
                                                   overwrite = overwrite, verbose = TRUE))) ## TODO: unrecognized type "shp"
344 348
    }
345 349
  } else {
346 350
    messagePrepInputs(skipDownloadMsg, verbose = verbose)
@@ -397,6 +401,8 @@
Loading
397 401
            add = TRUE)
398 402
  }
399 403
404 +
  dots <- list(...)
405 +
400 406
  if (!is.null(url) || !is.null(dlFun)) { # if no url, no download
401 407
    #if (!is.null(fileToDownload)  ) { # don't need to download because no url --- but need a case
402 408
      if (!isTRUE(tryCatch(is.na(fileToDownload), warning = function(x) FALSE)))  {
@@ -406,10 +412,10 @@
Loading
406 412
          dlFun <- .extractFunction(dlFun)
407 413
          fun <- .fnCleanup(dlFun, callingFun = "downloadRemote")
408 414
          forms <- .argsToRemove
409 -
          dots <- list(...)
415 +
          #dots <- list(...)
410 416
          overlappingForms <- fun$formalArgs[fun$formalArgs %in% forms]
411 417
          overlappingForms <- grep("\\.\\.\\.", overlappingForms, invert = TRUE, value = TRUE)
412 -
          dots <- list(...)
418 +
413 419
          # remove arguments that are in .argsToRemove, i.e., the sequence
414 420
          args <- if (length(overlappingForms)) {
415 421
            append(list(...), mget(overlappingForms))
@@ -444,8 +450,10 @@
Loading
444 450
          }
445 451
          downloadResults <- list(out = out, destFile = normPath(destFile), needChecksums = 2)
446 452
        } else if (grepl("drive.google.com", url)) {
447 -
          # browser(expr = exists("._downloadRemote_2"))
448 -
          if (!requireNamespace("googledrive")) stop(requireNamespaceMsg("googledrive", "to use google drive files"))
453 +
          #browser(expr = exists("._downloadRemote_2"))
454 +
          if (!requireNamespace("googledrive", quietly = TRUE))
455 +
            stop(requireNamespaceMsg("googledrive", "to use google drive files"))
456 +
449 457
          downloadResults <- dlGoogle(
450 458
            url = url,
451 459
            archive = archive,
@@ -455,7 +463,8 @@
Loading
455 463
            destinationPath = .tempPath,
456 464
            overwrite = overwrite,
457 465
            needChecksums = needChecksums,
458 -
            verbose = verbose
466 +
            verbose = verbose,
467 +
            team_drive = dots[["team_drive"]]
459 468
          )
460 469
461 470
        } else if (grepl("dl.dropbox.com", url)) {
@@ -529,8 +538,10 @@
Loading
529 538
530 539
assessGoogle <- function(url, archive = NULL, targetFile = NULL,
531 540
                         destinationPath = getOption("reproducible.destinationPath"),
532 -
                         verbose = getOption("reproducible.verbose", 1)) {
533 -
  if (!requireNamespace("googledrive")) stop(requireNamespaceMsg("googledrive", "to use google drive files"))
541 +
                         verbose = getOption("reproducible.verbose", 1),
542 +
                         team_drive = NULL) {
543 +
  if (!requireNamespace("googledrive", quietly = TRUE))
544 +
    stop(requireNamespaceMsg("googledrive", "to use google drive files"))
534 545
  if (.isRstudioServer()) {
535 546
    .requireNamespace("httr", stopOnFALSE = TRUE)
536 547
    opts <- options(httr_oob_default = TRUE)
@@ -538,8 +549,8 @@
Loading
538 549
  }
539 550
540 551
  if (is.null(archive)) {
541 -
    fileAttr <- retry(quote(googledrive::drive_get(googledrive::as_id(url))))
542 -
    fileSize <- fileAttr$drive_resource[[1]]$size
552 +
    fileAttr <- retry(quote(googledrive::drive_get(googledrive::as_id(url), team_drive = team_drive)))
553 +
    fileSize <- fileAttr$drive_resource[[1]]$size ## TODO: not returned with team drive (i.e., NULL)
543 554
    if (!is.null(fileSize)) {
544 555
      fileSize <- as.numeric(fileSize)
545 556
      class(fileSize) <- "object_size"
@@ -574,7 +585,6 @@
Loading
574 585
  mess
575 586
}
576 587
577 -
578 588
.isRstudioServer <- function() {
579 589
  isRstudioServer <- FALSE
580 590

@@ -7,21 +7,25 @@
Loading
7 7
#' Will check for presence of a \code{cloudFolderID} and make a new one
8 8
#' if one not present on Google Drive, with a warning.
9 9
#'
10 +
#' @inheritParams Cache
10 11
#' @param cloudFolderID The google folder ID where cloud caching will occur.
11 12
#' @param create Logical. If \code{TRUE}, then the \code{cloudFolderID} will be created.
12 13
#'     This should be used with caution as there are no checks for overwriting.
13 14
#'     See \code{googledrive::drive_mkdir}. Default \code{FALSE}.
14 15
#' @param overwrite Logical. Passed to \code{googledrive::drive_mkdir}.
15 -
#' @inheritParams Cache
16 +
#' @param team_drive Logical indicating whether to check team drives.
17 +
#'
16 18
#' @export
17 -
#' @inheritParams Cache
18 19
checkAndMakeCloudFolderID <- function(cloudFolderID = getOption('reproducible.cloudFolderID', NULL),
19 20
                                      cacheRepo = NULL,
20 21
                                      create = FALSE,
21 22
                                      overwrite = FALSE,
22 -
                                      verbose = getOption("reproducible.verbose", 1)) {
23 -
  if (!requireNamespace("googledrive")) stop(requireNamespaceMsg("googledrive", "to use google drive files"))
24 -
  # browser(expr = exists("._checkAndMakeCloudFolderID_1"))
23 +
                                      verbose = getOption("reproducible.verbose", 1),
24 +
                                      team_drive = NULL) {
25 +
  if (!requireNamespace("googledrive", quietly = TRUE))
26 +
    stop(requireNamespaceMsg("googledrive", "to use google drive files"))
27 +
28 +
  browser(expr = exists("._checkAndMakeCloudFolderID_1"))
25 29
  if (!is(cloudFolderID, "dribble")) {
26 30
    isNullCFI <- is.null(cloudFolderID)
27 31
    if (isNullCFI) {
@@ -32,9 +36,11 @@
Loading
32 36
    }
33 37
    isID <- isTRUE(32 <= nchar(cloudFolderID) && nchar(cloudFolderID) <= 33)
34 38
    driveLs <- if (isID) {
35 -
      tryCatch(googledrive::drive_get(googledrive::as_id(cloudFolderID)), error = function(x) {character()})
39 +
      tryCatch(googledrive::drive_get(googledrive::as_id(cloudFolderID), team_drive = team_drive),
40 +
               error = function(x) {character()})
36 41
    } else {
37 -
      tryCatch(googledrive::drive_get(cloudFolderID), error = function(x) { character() })
42 +
      tryCatch(googledrive::drive_get(cloudFolderID, team_drive = team_drive),
43 +
               error = function(x) { character() })
38 44
    }
39 45
40 46
    if (NROW(driveLs) == 0) {
@@ -45,7 +51,7 @@
Loading
45 51
          }
46 52
          cloudFolderID <- cloudFolderFromCacheRepo(cacheRepo)
47 53
        }
48 -
        newDir <- googledrive::drive_mkdir(cloudFolderID, path = "~/", overwrite = overwrite)
54 +
        newDir <- googledrive::drive_mkdir(cloudFolderID, path = NULL, overwrite = overwrite)
49 55
        cloudFolderID <- newDir
50 56
      }
51 57
    } else {
@@ -53,28 +59,37 @@
Loading
53 59
    }
54 60
    if (isNullCFI) {
55 61
      messageCache("Setting 'reproducible.cloudFolderID' option to be cloudFolder: ",
56 -
              ifelse(!is.null(names(cloudFolderID)), cloudFolderID$name, cloudFolderID),
57 -
              verbose = verbose)
62 +
                   ifelse(!is.null(names(cloudFolderID)), cloudFolderID$name, cloudFolderID),
63 +
                   verbose = verbose)
58 64
    }
59 65
    options('reproducible.cloudFolderID' = cloudFolderID)
60 66
  }
61 67
  return(cloudFolderID)
62 68
}
63 69
64 -
driveLs <- function(cloudFolderID = NULL, pattern = NULL, verbose = getOption("reproducible.verbose", 1)) {
65 -
  if (!requireNamespace("googledrive")) stop(requireNamespaceMsg("googledrive", "to use google drive files"))
66 -
  # browser(expr = exists("kkkk"))
70 +
driveLs <- function(cloudFolderID = NULL, pattern = NULL,
71 +
                    verbose = getOption("reproducible.verbose", 1),
72 +
                    team_drive = NULL) {
73 +
  if (!requireNamespace("googledrive", quietly = TRUE))
74 +
    stop(requireNamespaceMsg("googledrive", "to use google drive files"))
75 +
  #browser(expr = exists("kkkk"))
76 +
67 77
  if (!is(cloudFolderID, "tbl"))
68 -
    cloudFolderID <- checkAndMakeCloudFolderID(cloudFolderID = cloudFolderID, create = FALSE) # only deals with NULL case
69 -
  messageCache("Retrieving file list in cloud folder",
70 -
               verbose = verbose)
71 -
  gdriveLs <- retry(quote(googledrive::drive_ls(path = cloudFolderID,
72 -
                                   pattern = paste0(collapse = "|", c(cloudFolderID$id ,pattern)))))
78 +
    cloudFolderID <- checkAndMakeCloudFolderID(cloudFolderID = cloudFolderID, create = FALSE,
79 +
                                               team_drive = team_drive) # only deals with NULL case
80 +
81 +
  messageCache("Retrieving file list in cloud folder", verbose = verbose)
82 +
  gdriveLs <- retry(quote({
83 +
    googledrive::drive_ls(path = cloudFolderID, ## TODO: team drives needs a dribble
84 +
                          pattern = paste0(collapse = "|", c(cloudFolderID$id ,pattern)))
85 +
  }))
73 86
  if (is(gdriveLs, "try-error")) {
74 87
    fnf <- grepl("File not found", gdriveLs)
75 88
    if (!fnf) {
76 -
      gdriveLs <- retry(quote(googledrive::drive_ls(path = googledrive::as_id(cloudFolderID),
77 -
                                       pattern = paste0(cloudFolderID, "|",pattern))))
89 +
      gdriveLs <- retry(quote({
90 +
        googledrive::drive_ls(path = googledrive::as_id(cloudFolderID), ## TODO: team drives needs a dribble
91 +
                              pattern = paste0(cloudFolderID, "|",pattern))
92 +
      }))
78 93
      #cloudFolderID <- checkAndMakeCloudFolderID(cloudFolderID, create = TRUE)
79 94
      #gdriveLs <- try(googledrive::drive_ls(path = googledrive::as_id(cloudFolderID), pattern = paste0(cloudFolderID, "|",pattern)))
80 95
    } else {
@@ -82,8 +97,8 @@
Loading
82 97
    }
83 98
  }
84 99
  gdriveLs
85 -
86 100
}
101 +
87 102
#' Upload to cloud, if necessary
88 103
#'
89 104
#' Meant for internal use, as there are internal objects as arguments.
@@ -94,7 +109,9 @@
Loading
94 109
#' @param output The output object of FUN that was run in \code{Cache}
95 110
#' @inheritParams Cache
96 111
cloudUpload <- function(isInRepo, outputHash, gdriveLs, cacheRepo, cloudFolderID, output) {
97 -
  if (!requireNamespace("googledrive")) stop(requireNamespaceMsg("googledrive", "to use google drive files"))
112 +
  if (!requireNamespace("googledrive", quietly = TRUE))
113 +
      stop(requireNamespaceMsg("googledrive", "to use google drive files"))
114 +
98 115
  artifact <- isInRepo[[.cacheTableHashColName()]][1]
99 116
  # browser(expr = exists("._cloudUpload_1"))
100 117
  artifactFileName <- CacheStoredFile(cacheRepo, hash = artifact)
@@ -110,7 +127,7 @@
Loading
110 127
111 128
  if (!any(isInCloud)) {
112 129
    messageCache("Uploading local copy of ", artifactFileName,", with cacheId: ",
113 -
            outputHash," to cloud folder")
130 +
                 outputHash," to cloud folder")
114 131
    numRetries <- 1
115 132
    while (numRetries < 6) {
116 133
      du <- try(retry(retries = numRetries,
@@ -140,8 +157,10 @@
Loading
140 157
cloudDownload <- function(outputHash, newFileName, gdriveLs, cacheRepo, cloudFolderID,
141 158
                          drv = getOption("reproducible.drv", RSQLite::SQLite()),
142 159
                          conn = getOption("reproducible.conn", NULL)) {
143 -
  if (!requireNamespace("googledrive")) stop(requireNamespaceMsg("googledrive", "to use google drive files"))
144 -
  # browser(expr = exists("._cloudDownload_1"))
160 +
  if (!requireNamespace("googledrive", quietly = TRUE))
161 +
    stop(requireNamespaceMsg("googledrive", "to use google drive files"))
162 +
163 +
  #browser(expr = exists("._cloudDownload_1"))
145 164
  messageCache("Downloading cloud copy of ", newFileName,", with cacheId: ", outputHash)
146 165
  localNewFilename <- file.path(tempdir2(), basename2(newFileName))
147 166
  isInCloud <- gsub(gdriveLs$name,
@@ -176,8 +195,10 @@
Loading
176 195
#' @keywords internal
177 196
cloudUploadFromCache <- function(isInCloud, outputHash, cacheRepo, cloudFolderID,
178 197
                                 outputToSave, rasters) {
179 -
  if (!requireNamespace("googledrive")) stop(requireNamespaceMsg("googledrive", "to use google drive files"))
180 -
  # browser(expr = exists("._cloudUploadFromCache_1"))
198 +
  if (!requireNamespace("googledrive", quietly = TRUE))
199 +
    stop(requireNamespaceMsg("googledrive", "to use google drive files"))
200 +
201 +
  #browser(expr = exists("._cloudUploadFromCache_1"))
181 202
  if (!any(isInCloud)) {
182 203
    cacheIdFileName <- CacheStoredFile(cacheRepo, outputHash)
183 204
    newFileName <- if (useDBI()) {
@@ -197,15 +218,17 @@
Loading
197 218
}
198 219
199 220
cloudUploadRasterBackends <- function(obj, cloudFolderID) {
200 -
  if (!requireNamespace("googledrive")) stop(requireNamespaceMsg("googledrive", "to use google drive files"))
201 -
  # browser(expr = exists("._cloudUploadRasterBackends_1"))
221 +
  if (!requireNamespace("googledrive", quietly = TRUE))
222 +
    stop(requireNamespaceMsg("googledrive", "to use google drive files"))
223 +
224 +
  #browser(expr = exists("._cloudUploadRasterBackends_1"))
202 225
  rasterFilename <- Filenames(obj)
203 226
  out <- NULL
204 227
  if (!is.null(unlist(rasterFilename)) && length(rasterFilename) > 0) {
205 228
    allRelevantFiles <- unique(rasterFilename)
206 229
    out <- lapply(allRelevantFiles, function(file) {
207 -
      try(retry(quote(googledrive::drive_upload(media = file,  path = cloudFolderID, name = basename(file),
208 -
                               overwrite = FALSE))))
230 +
      try(retry(quote(googledrive::drive_upload(media = file,  path = cloudFolderID,
231 +
                                                name = basename(file), overwrite = FALSE))))
209 232
    })
210 233
  }
211 234
  return(invisible(out))
@@ -214,8 +237,10 @@
Loading
214 237
cloudDownloadRasterBackend <- function(output, cacheRepo, cloudFolderID,
215 238
                                       drv = getOption("reproducible.drv", RSQLite::SQLite()),
216 239
                                       conn = getOption("reproducible.conn", NULL)) {
217 -
  if (!requireNamespace("googledrive")) stop(requireNamespaceMsg("googledrive", "to use google drive files"))
218 -
  # browser(expr = exists("._cloudDownloadRasterBackend_1"))
240 +
  if (!requireNamespace("googledrive", quietly = TRUE))
241 +
    stop(requireNamespaceMsg("googledrive", "to use google drive files"))
242 +
243 +
  #browser(expr = exists("._cloudDownloadRasterBackend_1"))
219 244
  rasterFilename <- Filenames(output)
220 245
  if (!is.null(unlist(rasterFilename)) && length(rasterFilename) > 0) {
221 246
    gdriveLs2 <- NULL
@@ -263,7 +288,7 @@
Loading
263 288
      unlist(lapply(mget(ls(obj), envir = obj), function(x) isOrHasRaster(x)))
264 289
    } else {
265 290
      tryCatch(unlist(lapply(mget(ls(obj), envir = obj@.xData),
266 -
                        function(x) isOrHasRaster(x))), error = function(x) FALSE)
291 +
                             function(x) isOrHasRaster(x))), error = function(x) FALSE)
267 292
    }
268 293
  } else if (is.list(obj)) {
269 294
    unlist(lapply(obj, function(x) isOrHasRaster(x)))

@@ -895,7 +895,7 @@
Loading
895 895
                              extent(object)), dataSlotsToDigest), length = length, quick = quick,
896 896
                  algo = algo) # don't include object@data -- these are volatile
897 897
  else {
898 -
    if (!requireNamespace("fastdigest"))
898 +
    if (!requireNamespace("fastdigest", quietly = TRUE))
899 899
      stop(requireNamespaceMsg("fastdigest", "to use options('reproducible.useNewDigestAlgorithm' = FALSE"))
900 900
    dig <- fastdigest::fastdigest(append(list(dim(object), res(object), crs(object),
901 901
                                  extent(object)), dataSlotsToDigest)) # don't include object@data -- these are volatile
@@ -908,7 +908,7 @@
Loading
908 908
    dig2 <- .robustDigest(legendSlotsToDigest, length = length, quick = quick,
909 909
                  algo = algo) # don't include object@data -- these are volatile
910 910
  else {
911 -
    if (!requireNamespace("fastdigest"))
911 +
    if (!requireNamespace("fastdigest", quietly = TRUE))
912 912
      stop(requireNamespaceMsg("fastdigest", "to use options('reproducible.useNewDigestAlgorithm' = FALSE"))
913 913
    dig2 <- fastdigest::fastdigest(legendSlotsToDigest) # don't include object@data -- these are volatile
914 914
  }
@@ -921,7 +921,7 @@
Loading
921 921
    digFile <- .robustDigest(fileSlotsToDigest, length = length, quick = quick,
922 922
                             algo = algo) # don't include object@file -- these are volatile
923 923
  else {
924 -
    if (!requireNamespace("fastdigest"))
924 +
    if (!requireNamespace("fastdigest", quietly = TRUE))
925 925
      stop(requireNamespaceMsg("fastdigest", "to use options('reproducible.useNewDigestAlgorithm' = FALSE"))
926 926
    digFile <- fastdigest::fastdigest(fileSlotsToDigest) # don't include object@file -- these are volatile
927 927
  }
@@ -942,7 +942,7 @@
Loading
942 942
  if (isTRUE(getOption("reproducible.useNewDigestAlgorithm")))
943 943
    dig <- .robustDigest(unlist(dig), length = length, quick = quick, algo = algo)
944 944
  else {
945 -
    if (!requireNamespace("fastdigest"))
945 +
    if (!requireNamespace("fastdigest", quietly = TRUE))
946 946
      stop(requireNamespaceMsg("fastdigest", "to use options('reproducible.useNewDigestAlgorithm' = FALSE"))
947 947
    dig <- fastdigest::fastdigest(dig)
948 948
  }

@@ -365,7 +365,7 @@
Loading
365 365
    out <- if (cacheSpeed == 1) {
366 366
      digest(x, algo = algo)
367 367
    } else if (cacheSpeed == 2) {
368 -
      if (!requireNamespace("fastdigest"))
368 +
      if (!requireNamespace("fastdigest", quietly = TRUE))
369 369
        stop(requireNamespaceMsg("fastdigest", "to use options('reproducible.useNewDigestAlgorithm' = FALSE"))
370 370
      fastdigest::fastdigest(x)
371 371
    } else {
Files Coverage
R 67.81%
Project Totals (25 files) 67.81%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
        informational: true
10
    patch:
11
      default:
12
        target: auto
13
        threshold: 1%
14
        informational: true
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading