diff --git a/R/cache.R b/R/cache.R index b0973fac0..010ea65ea 100644 --- a/R/cache.R +++ b/R/cache.R @@ -582,6 +582,7 @@ cached <- function( if (is.null(cache)) { return(character(0)) } + cache <- decorate_storr(cache) if (is.null(namespace)) { namespace <- cache$default_namespace } diff --git a/R/decorated_storr.R b/R/decorated_storr.R index a4108695c..9c2209b11 100644 --- a/R/decorated_storr.R +++ b/R/decorated_storr.R @@ -37,8 +37,11 @@ refclass_decorated_storr <- methods::setRefClass( # prevent users from supplying their own true `storr`s. methods = list( # Custom: - file_return_hash = function(hash) { + assert_dirs = function() { dir_create(.self$path_return) + dir_create(.self$path_tmp) + }, + file_return_hash = function(hash) { file.path(.self$path_return, hash) }, file_return_key = function(key) { @@ -46,13 +49,15 @@ refclass_decorated_storr <- methods::setRefClass( .self$file_return_hash(hash) }, file_tmp = function() { - dir_create(.self$path_tmp) file.path(.self$path_tmp, basename(tempfile())) }, - gc = function(...) decst_gc(..., .self = .self), - get = function(key, ...) decst_get(key = key, ..., .self = .self), + gc = function(...) dcst_gc(..., .self = .self), + get = function(key, ...) dcst_get(key = key, ..., .self = .self), + get_value = function(hash, ...) { + dcst_get_value(hash = hash, ..., .self = .self) + }, set = function(key, value, ...) { - decst_set(value = value, key = key, ..., .self = .self) + dcst_set(value = value, key = key, ..., .self = .self) }, # Delegate to storr: archive_export = function(...) .self$storr$archive_export(...), @@ -69,7 +74,6 @@ refclass_decorated_storr <- methods::setRefClass( fill = function(...) .self$storr$fill(...), flush_cache = function(...) .self$storr$flush_cache(...), get_hash = function(...) .self$storr$get_hash(...), - get_value = function(...) .self$storr$get_value(...), hash_object = function(...) .self$storr$hash_object(...), hash_raw = function(...) .self$storr$hash_raw(...), import = function(...) .self$storr$import(...), @@ -91,54 +95,86 @@ refclass_decorated_storr <- methods::setRefClass( ) ) -decst_gc <- function(..., .self) { +dcst_gc <- function(..., .self) { + before <- .self$storr$list_hashes() .self$storr$gc(...) + after <- .self$storr$list_hashes() + removed <- setdiff(before, after) + unlink(.self$file_return_hash(removed)) } -decst_get <- function(key, ..., .self) { +dcst_get <- function(key, ..., .self) { value <- .self$storr$get(key = key, ...) - decst_inner_get(value = value, key = key, .self = .self) + dcst_get_(value = value, key = key, .self = .self) } -decst_inner_get <- function(value, key, .self) { - UseMethod("decst_inner_get") +dcst_get_ <- function(value, key, .self) { + UseMethod("dcst_get_") } -decst_inner_get.default <- function(value, key, .self) { +dcst_get_.default <- function(value, key, .self) { value } -decst_inner_get.return_fst <- function(value, key, .self) { +dcst_get_.return_fst <- function(value, key, .self) { value } -decst_inner_get.return_keras <- function(value, key, .self) { +dcst_get_.return_keras <- function(value, key, .self) { value } -decst_inner_get.return_rds <- function(value, key, .self) { +dcst_get_.return_rds <- function(value, key, .self) { readRDS(.self$file_return_key(key)) } -decst_set <- function(value, key, ..., .self) { - UseMethod("decst_set") +dcst_get_value <- function(hash, ..., .self) { + value <- .self$storr$get_value(hash = hash, ...) + dcst_get_value_(value = value, hash = hash, .self = .self) +} + +dcst_get_value_ <- function(value, hash, .self) { + UseMethod("dcst_get_value_") +} + +dcst_get_value_.default <- function(value, hash, .self) { + value +} + +dcst_get_value_.return_fst <- function(value, hash, .self) { + value +} + +dcst_get_value_.return_keras <- function(value, hash, .self) { + value +} + +dcst_get_value_.return_rds <- function(value, hash, .self) { + readRDS(.self$file_return_hash(hash)) +} + +dcst_set <- function(value, key, ..., .self) { + UseMethod("dcst_set") } -decst_set.default <- function(value, key, ..., .self) { +dcst_set.default <- function(value, key, ..., .self) { .self$storr$set(key = key, value = value, ...) } -decst_set.return_fst <- function(value, key, ..., .self) { +dcst_set.return_fst <- function(value, key, ..., .self) { assert_pkg("fst") + .self$assert_dirs() .self$storr$set(key = key, value = value, ...) } -decst_set.return_keras <- function(value, key, ..., .self) { +dcst_set.return_keras <- function(value, key, ..., .self) { assert_pkg("keras") + .self$assert_dirs() .self$storr$set(key = key, value = value, ...) } -decst_set.return_rds <- function(value, key, ..., .self) { +dcst_set.return_rds <- function(value, key, ..., .self) { + .self$assert_dirs() r_version <- paste0(R.version$major, ".", R.version$minor) sufficient_r_version <- utils::compareVersion(r_version, "3.5.0") >= 0L stopifnot(sufficient_r_version) @@ -151,10 +187,10 @@ decst_set.return_rds <- function(value, key, ..., .self) { compress = TRUE, refhook = NULL ) - decst_set_move_tmp(key = key, value = value, tmp = tmp, .self = .self) + dcst_set_move_tmp(key = key, value = value, tmp = tmp, .self = .self) } -decst_set_move_tmp <- function(key, value, tmp, .self) { +dcst_set_move_tmp <- function(key, value, tmp, .self) { hash_tmp <- digest::digest( object = tmp, algo = .self$hash_algorithm, diff --git a/R/deprecated.R b/R/deprecated.R index de4a6d983..d21bbfc18 100644 --- a/R/deprecated.R +++ b/R/deprecated.R @@ -1233,7 +1233,8 @@ dataset_wildcard <- function() { dataset_wildcard_() } -#' @title Deprecated. Compute the initial pre-build metadata of a target or import. +#' @title Deprecated. Compute the initial pre-build metadata +#' of a target or import. #' @description Deprecated on 2019-01-12. #' @details The metadata helps determine if the #' target is up to date or outdated. The metadata of imports @@ -1355,7 +1356,7 @@ in_progress <- function( package = "drake", msg = "in_progress() in drake is deprecated. Use running() instead." ) - running(path, search, cache, verbose ) + running(path, search, cache, verbose) } #' @title Deprecated. Load an existing drake files system cache diff --git a/R/drake_config.R b/R/drake_config.R index 4b16c81fc..b2e836de6 100644 --- a/R/drake_config.R +++ b/R/drake_config.R @@ -58,7 +58,7 @@ #' #' @param parallelism Character scalar, type of parallelism to use. #' For detailed explanations, see the -#' [high-performance computing chapter](https://ropenscilabs.github.io/drake-manual/hpc.html) +#' [high-performance computing chapter](https://ropenscilabs.github.io/drake-manual/hpc.html) # nolint #' of the user manual. #' #' You could also supply your own scheduler function @@ -748,7 +748,10 @@ force_cache_path <- function(cache = NULL) { cache_path_ <- function(cache = NULL) { if (is.null(cache)) { NULL - } else if (inherits(cache, "refclass_decorated_storr")) { + } + is_cache <- inherits(cache, "refclass_decorated_storr") || + inherits(cache, "storr") + if (is_cache) { cache$driver$path } else { NULL diff --git a/R/drake_meta_.R b/R/drake_meta_.R index d7ac0bd59..3b684fd74 100644 --- a/R/drake_meta_.R +++ b/R/drake_meta_.R @@ -169,7 +169,7 @@ storage_hash <- function( new_size = storage_size(file), old_size = meta$size ) - ifelse ( + ifelse( should_rehash, rehash_storage(target = target, config = config), config$cache$get(key = target) diff --git a/R/drake_plan.R b/R/drake_plan.R index bb7fc003e..65892be91 100644 --- a/R/drake_plan.R +++ b/R/drake_plan.R @@ -8,7 +8,7 @@ #' #' @details Besides `"target"` and `"command"`, [drake_plan()] #' understands a special set of optional columns. For details, visit -#' +#' # nolint #' #' @section Columns: #' [drake_plan()] creates a special data frame. At minimum, that data frame diff --git a/R/package.R b/R/package.R index 729a14b91..45e408063 100644 --- a/R/package.R +++ b/R/package.R @@ -2,7 +2,8 @@ #' @docType package #' @description drake is a pipeline toolkit #' () -#' and a scalable, R-focused solution for reproducibility and high-performance computing. +#' and a scalable, R-focused solution for reproducibility +#' and high-performance computing. #' @name drake-package #' @aliases drake #' @author William Michael Landau \email{will.landau@@gmail.com} diff --git a/R/r_make.R b/R/r_make.R index 8fa24e363..c0e68e63a 100644 --- a/R/r_make.R +++ b/R/r_make.R @@ -29,7 +29,8 @@ #' @param r_fn A `callr` function such as `callr::r` or `callr::r_bg`. #' Example: `r_make(r_fn = callr::r)`. #' @param r_args List of arguments to `r_fn`, not including `func` or `args`. -#' Example: `r_make(r_fn = callr::r_bg, r_args = list(stdout = "stdout.log"))`. +#' Example: +#' `r_make(r_fn = callr::r_bg, r_args = list(stdout = "stdout.log"))`. #' @examples #' \dontrun{ #' isolate_example("quarantine side effects", { diff --git a/R/sankey_drake_graph.R b/R/sankey_drake_graph.R index 79e0b58cb..7c5ad5a0b 100644 --- a/R/sankey_drake_graph.R +++ b/R/sankey_drake_graph.R @@ -22,7 +22,7 @@ #' if (requireNamespace("networkD3", quietly = TRUE)) { #' if (requireNamespace("visNetwork", quietly = TRUE)) { #' # Plot the network graph representation of the workflow. -#' sankey_drake_graph(config, width = '100%') # The width is passed to visNetwork +#' sankey_drake_graph(config, width = '100%') #' # Show the legend separately. #' visNetwork::visNetwork(nodes = drake::legend_nodes()) #' make(my_plan) # Run the project, build the targets. @@ -135,7 +135,7 @@ sankey_drake_graph <- function( #' # You can pass the data frames right to render_sankey_drake_graph() #' # (as in sankey_drake_graph()) or you can create #' # your own custom visNewtork graph. -#' render_sankey_drake_graph(graph, width = '100%') # Width is passed to visNetwork. +#' render_sankey_drake_graph(graph, width = '100%') #' } #' } #' } diff --git a/R/store_outputs.R b/R/store_outputs.R index 0cdba06ef..02b9f7c12 100644 --- a/R/store_outputs.R +++ b/R/store_outputs.R @@ -179,7 +179,7 @@ log_time <- function(target, meta, config) { } if (requireNamespace("lubridate", quietly = TRUE)) { exec <- round(lubridate::dseconds(meta$time_command$elapsed), 3) - total <- round(lubridate::dseconds( meta$time_build$elapsed), 3) + total <- round(lubridate::dseconds(meta$time_build$elapsed), 3) tail <- paste("", exec, "|", total, " (exec | total)") } else { tail <- " (install lubridate)" # nocov diff --git a/man/drake-package.Rd b/man/drake-package.Rd index 857d1ced3..7bb1c37ef 100644 --- a/man/drake-package.Rd +++ b/man/drake-package.Rd @@ -8,7 +8,8 @@ \description{ drake is a pipeline toolkit (\url{https://github.com/pditommaso/awesome-pipeline}) -and a scalable, R-focused solution for reproducibility and high-performance computing. +and a scalable, R-focused solution for reproducibility +and high-performance computing. } \examples{ \dontrun{ diff --git a/man/drake_config.Rd b/man/drake_config.Rd index 881eab0f3..370f11d5d 100644 --- a/man/drake_config.Rd +++ b/man/drake_config.Rd @@ -68,7 +68,7 @@ See also \code{\link[=drake_cache]{drake_cache()}}.} \item{parallelism}{Character scalar, type of parallelism to use. For detailed explanations, see the -\href{https://ropenscilabs.github.io/drake-manual/hpc.html}{high-performance computing chapter} +\href{https://ropenscilabs.github.io/drake-manual/hpc.html}{high-performance computing chapter} # nolint of the user manual. You could also supply your own scheduler function diff --git a/man/drake_meta.Rd b/man/drake_meta.Rd index b7ba96a99..72130e9e6 100644 --- a/man/drake_meta.Rd +++ b/man/drake_meta.Rd @@ -2,7 +2,8 @@ % Please edit documentation in R/deprecated.R \name{drake_meta} \alias{drake_meta} -\title{Deprecated. Compute the initial pre-build metadata of a target or import.} +\title{Deprecated. Compute the initial pre-build metadata +of a target or import.} \usage{ drake_meta(target, config) } diff --git a/man/drake_plan.Rd b/man/drake_plan.Rd index 263279303..af864b242 100644 --- a/man/drake_plan.Rd +++ b/man/drake_plan.Rd @@ -56,7 +56,7 @@ R code to produce it. \details{ Besides \code{"target"} and \code{"command"}, \code{\link[=drake_plan]{drake_plan()}} understands a special set of optional columns. For details, visit -\url{https://ropenscilabs.github.io/drake-manual/plans.html#special-custom-columns-in-your-plan} +\url{https://ropenscilabs.github.io/drake-manual/plans.html#special-custom-columns-in-your-plan} # nolint } \section{Columns}{ diff --git a/man/make.Rd b/man/make.Rd index ca50b34e4..46cb91041 100644 --- a/man/make.Rd +++ b/man/make.Rd @@ -68,7 +68,7 @@ See also \code{\link[=drake_cache]{drake_cache()}}.} \item{parallelism}{Character scalar, type of parallelism to use. For detailed explanations, see the -\href{https://ropenscilabs.github.io/drake-manual/hpc.html}{high-performance computing chapter} +\href{https://ropenscilabs.github.io/drake-manual/hpc.html}{high-performance computing chapter} # nolint of the user manual. You could also supply your own scheduler function diff --git a/man/r_make.Rd b/man/r_make.Rd index 9f46839d0..e14f78132 100644 --- a/man/r_make.Rd +++ b/man/r_make.Rd @@ -60,7 +60,8 @@ and supply nothing to \code{source}. Example: \code{r_make(r_fn = callr::r)}.} \item{r_args}{List of arguments to \code{r_fn}, not including \code{func} or \code{args}. -Example: \code{r_make(r_fn = callr::r_bg, r_args = list(stdout = "stdout.log"))}.} +Example: +\code{r_make(r_fn = callr::r_bg, r_args = list(stdout = "stdout.log"))}.} \item{target}{Name of the target.} diff --git a/man/render_sankey_drake_graph.Rd b/man/render_sankey_drake_graph.Rd index 77dc52fd7..5f31b9b13 100644 --- a/man/render_sankey_drake_graph.Rd +++ b/man/render_sankey_drake_graph.Rd @@ -62,7 +62,7 @@ graph <- drake_graph_info(config) # You can pass the data frames right to render_sankey_drake_graph() # (as in sankey_drake_graph()) or you can create # your own custom visNewtork graph. -render_sankey_drake_graph(graph, width = '100\%') # Width is passed to visNetwork. +render_sankey_drake_graph(graph, width = '100\%') } } } diff --git a/man/rs_addin_r_make.Rd b/man/rs_addin_r_make.Rd index d8457e125..33df10d0f 100644 --- a/man/rs_addin_r_make.Rd +++ b/man/rs_addin_r_make.Rd @@ -8,7 +8,8 @@ rs_addin_r_make(r_args = list()) } \arguments{ \item{r_args}{List of arguments to \code{r_fn}, not including \code{func} or \code{args}. -Example: \code{r_make(r_fn = callr::r_bg, r_args = list(stdout = "stdout.log"))}.} +Example: +\code{r_make(r_fn = callr::r_bg, r_args = list(stdout = "stdout.log"))}.} } \value{ Nothing. diff --git a/man/rs_addin_r_outdated.Rd b/man/rs_addin_r_outdated.Rd index decf88b34..f324b69e0 100644 --- a/man/rs_addin_r_outdated.Rd +++ b/man/rs_addin_r_outdated.Rd @@ -8,7 +8,8 @@ rs_addin_r_outdated(r_args = list(), .print = TRUE) } \arguments{ \item{r_args}{List of arguments to \code{r_fn}, not including \code{func} or \code{args}. -Example: \code{r_make(r_fn = callr::r_bg, r_args = list(stdout = "stdout.log"))}.} +Example: +\code{r_make(r_fn = callr::r_bg, r_args = list(stdout = "stdout.log"))}.} \item{.print}{Logical, whether to \code{print()} the result to the console. Required for the addin.} diff --git a/man/rs_addin_r_vis_drake_graph.Rd b/man/rs_addin_r_vis_drake_graph.Rd index 0f1830b7b..8d3d67427 100644 --- a/man/rs_addin_r_vis_drake_graph.Rd +++ b/man/rs_addin_r_vis_drake_graph.Rd @@ -8,7 +8,8 @@ rs_addin_r_vis_drake_graph(r_args = list(), .print = TRUE) } \arguments{ \item{r_args}{List of arguments to \code{r_fn}, not including \code{func} or \code{args}. -Example: \code{r_make(r_fn = callr::r_bg, r_args = list(stdout = "stdout.log"))}.} +Example: +\code{r_make(r_fn = callr::r_bg, r_args = list(stdout = "stdout.log"))}.} \item{.print}{Logical, whether to \code{print()} the result to the console. Required for the addin.} diff --git a/man/sankey_drake_graph.Rd b/man/sankey_drake_graph.Rd index 12fdd4227..f6263ef46 100644 --- a/man/sankey_drake_graph.Rd +++ b/man/sankey_drake_graph.Rd @@ -123,7 +123,7 @@ config <- drake_config(my_plan) if (requireNamespace("networkD3", quietly = TRUE)) { if (requireNamespace("visNetwork", quietly = TRUE)) { # Plot the network graph representation of the workflow. -sankey_drake_graph(config, width = '100\%') # The width is passed to visNetwork +sankey_drake_graph(config, width = '100\%') # Show the legend separately. visNetwork::visNetwork(nodes = drake::legend_nodes()) make(my_plan) # Run the project, build the targets. diff --git a/tests/testthat/test-decorated-storr.R b/tests/testthat/test-decorated-storr.R index 0763bec08..c123c7955 100644 --- a/tests/testthat/test-decorated-storr.R +++ b/tests/testthat/test-decorated-storr.R @@ -1,12 +1,73 @@ drake_context("decorated storr") -test_with_dir("can save rds", { +test_with_dir("run through decorated storr methods", { + skip_on_cran() + x <- drake_config(drake_plan(x = 1))$cache + x$archive_export(tempfile()) + x$archive_import(tempfile()) + x$check() + x$clear() + x$clone() + x$set("x", 1) + x$duplicate("x", "y") + x$del("x") + x$exists("x") + x$exists_object("x") + y <- storr::storr_environment() + x$set("x", 1) + x$export(y, "x") + x$fill("z", 2) + x$flush_cache() + x$get("x") + x$get_value(x$get_hash("x")) + x$hash_object("x") + x$hash_raw("x") + x$import(y) + x$index_export() + x$index_import(x$index_export()[1:2, ]) + x$list() + x$list_hashes() + x$list_namespaces() + x$mget("x") + x$mget_hash("x") + x$mget_value(x$get_hash("x")) + x$mset("x", 1) + x$mset_by_value("x") + x$mset_value("x") + x$repair() + x$serialize_object("x") + x$set_by_value("x") + x$set_value("x") + x$destroy() +}) + +test_with_dir("garbage collection", { + plan <- drake_plan( + x = return_rds( + list(x = letters, y = letters) + ) + ) + make(plan) + cache <- drake_cache() + special <- file.path(".drake", "drake", "return") + file <- list.files(special, full.names = TRUE) + expect_true(file.exists(file)) + cache$gc() + expect_true(file.exists(file)) + clean(cache = cache) + expect_true(file.exists(file)) + clean(cache = cache, garbage_collection = TRUE) + expect_false(file.exists(file)) +}) + +test_with_dir("return_rds()", { plan <- drake_plan(x = return_rds(list(x = letters, y = letters))) make(plan) out <- readd(x) exp <- list(x = letters, y = letters) expect_equal(out, exp) cache <- drake_cache() + expect_equal(cache$get_value(cache$get_hash("x")), exp) ref <- cache$storr$get("x") expect_true(inherits(ref, "return_rds")) expect_equal(length(ref), 1L) @@ -14,7 +75,7 @@ test_with_dir("can save rds", { expect_false(is.list(ref)) }) -test_with_dir("Can save rds with envir cache", { +test_with_dir("return_rds() with environment storr", { plan <- drake_plan(x = return_rds(list(x = letters, y = letters))) cache <- storr::storr_environment() make(plan, cache = cache) @@ -22,6 +83,7 @@ test_with_dir("Can save rds with envir cache", { cache <- drake_config(plan, cache = cache)$cache exp <- list(x = letters, y = letters) expect_equal(out, exp) + expect_equal(cache$get_value(cache$get_hash("x")), exp) ref <- cache$storr$get("x") expect_true(inherits(ref, "return_rds")) expect_equal(length(ref), 1L) @@ -33,6 +95,43 @@ test_with_dir("Can save rds with envir cache", { expect_equal(length(special_files), 1L) }) +test_with_dir("return_rds() and recovery", { + plan <- drake_plan( + x = { + file.create("x") + return_rds(list(x = letters)) + } + ) + make(plan) + expect_true(file.exists("x")) + unlink("x") + plan <- drake_plan( + x = { + file.create("y") + return_rds(list(x = letters[1:3])) + } + ) + make(plan) + expect_true(file.exists("y")) + unlink("y") + expect_false(file.exists("x")) + expect_false(file.exists("y")) + plan <- drake_plan( + x = { + file.create("x") + return_rds(list(x = letters)) + } + ) + make(plan, recover = TRUE) + expect_false(file.exists("x")) + expect_false(file.exists("y")) + expect_equal(readd(x), list(x = letters)) + history <- drake_history() + hash <- history[history$target == "x" & !history$current, ]$hash + cache <- drake_cache() + expect_equal(cache$get_value(hash), list(x = letters[1:3])) +}) + # To do: reactivate tests if (FALSE) { @@ -47,6 +146,7 @@ test_with_dir("Can save fst data frames", { out <- readd(x) exp <- data.frame(x = letters, y = letters, stringsAsFactors = FALSE) expect_equal(out, exp) + expect_equal(cache$get_value(cache$get_hash("x")), exp) cache <- drake_cache() ref <- cache$storr$get("x") expect_true(inherits(ref, "return_fst")) @@ -65,6 +165,7 @@ test_with_dir("Can save keras models", { out <- readd(x) exp <- structure(list("keras_model"), class = "keras.engine.training.Model") expect_equal(out, exp) + expect_equal(cache$get_value(cache$get_hash("x")), exp) out <- cache$storr$get("x") exp <- structure(cache$storr$get_hash("x"), class = "return_keras") expect_equal(out, exp) @@ -76,99 +177,6 @@ test_with_dir("Can save keras models", { expect_false(is.list(ref)) }) -test_with_dir("garbage collection", { - plan <- drake_plan( - x = return_rds( - list(x = letters, y = letters) - ) - ) - make(plan) - cache <- drake_cache() - special <- file.path(".drake", "drake", "data") - file <- list.files(special, pattern = ".*\\.rds$", full.names = TRUE) - expect_true(file.exists(file)) - cache$gc() - expect_true(file.exists(file)) - clean(cache = cache) - expect_true(file.exists(file)) - clean(cache = cache, garbage_collection = TRUE) - expect_false(file.exists(file)) -}) - -test_with_dir("recovery with return_rds()", { - plan <- drake_plan( - x = { - file.create("x") - return_rds(list(x = letters)) - } - ) - make(plan) - expect_true(file.exists("x")) - unlink("x") - plan <- drake_plan( - x = { - file.create("y") - return_rds(list(x = letters[1:3])) - } - ) - expect_true(file.exists("y")) - unlink("y") - expect_false(file.exists("x")) - expect_false(file.exists("y")) - plan <- drake_plan( - x = { - file.create("x") - return_rds(list(x = letters)) - } - ) - make(plan, recover = TRUE) - expect_false(file.exists("x")) - expect_equal(readd(x), list(x = letters)) - history <- drake_history() - hash <- history[history$target == "x" & !history$current, "hash"] - cache <- drake_cache() - expect_equal(cache$get_value(hash), list(x = letters)) -}) - } -test_with_dir("runthrough of decorated storr methods", { - skip_on_cran() - x <- drake_config(drake_plan(x = 1))$cache - x$archive_export(tempfile()) - x$archive_import(tempfile()) - x$check() - x$clear() - x$clone() - x$set("x", 1) - x$duplicate("x", "y") - x$del("x") - x$exists("x") - x$exists_object("x") - y <- storr::storr_environment() - x$set("x", 1) - x$export(y, "x") - x$fill("z", 2) - x$flush_cache() - x$get("x") - x$get_value(x$get_hash("x")) - x$hash_object("x") - x$hash_raw("x") - x$import(y) - x$index_export() - x$index_import(x$index_export()[1:2, ]) - x$list() - x$list_hashes() - x$list_namespaces() - x$mget("x") - x$mget_hash("x") - x$mget_value(x$get_hash("x")) - x$mset("x", 1) - x$mset_by_value("x") - x$mset_value("x") - x$repair() - x$serialize_object("x") - x$set_by_value("x") - x$set_value("x") - x$destroy() -}) + diff --git a/tests/testthat/test-dsl.R b/tests/testthat/test-dsl.R index 5206de402..4f0a6a41d 100644 --- a/tests/testthat/test-dsl.R +++ b/tests/testthat/test-dsl.R @@ -1801,10 +1801,10 @@ test_with_dir("unequal trace vars are not duplicated in map()", { out <- drake_plan( wide1 = target( ez_parallel(a), - transform = map(a = !!inputs, type = !!types) ), + transform = map(a = !!inputs, type = !!types)), prelim = target( preliminary(wide1), - transform = combine(wide1, .by = type) ), + transform = combine(wide1, .by = type)), main = target( expensive_calc(prelim), transform = map(prelim)