diff --git a/R/class_branch.R b/R/class_branch.R index 0f4eb72f..f6911ff3 100644 --- a/R/class_branch.R +++ b/R/class_branch.R @@ -15,7 +15,8 @@ branch_init <- function( deps = deps, settings = settings, cue = cue, - store = store + store = store, + file = file_init() ) } @@ -26,7 +27,8 @@ branch_new <- function( deps = NULL, settings = NULL, cue = NULL, - store = NULL + store = NULL, + file = NULL ) { out <- new.env(parent = emptyenv(), hash = FALSE) out$name <- name @@ -36,6 +38,7 @@ branch_new <- function( out$settings <- settings out$cue <- cue out$store <- store + out$file <- file enclass(out, branch_s3_class) } diff --git a/R/class_builder.R b/R/class_builder.R index f7df26d4..5e6adfac 100644 --- a/R/class_builder.R +++ b/R/class_builder.R @@ -5,6 +5,7 @@ builder_new <- function( value = NULL, metrics = NULL, store = NULL, + file = NULL, subpipeline = NULL ) { out <- new.env(parent = emptyenv(), hash = FALSE) @@ -14,6 +15,7 @@ builder_new <- function( out$value <- value out$metrics <- metrics out$store <- store + out$file <- file out$subpipeline <- subpipeline enclass(out, builder_s3_class) } diff --git a/R/class_stem.R b/R/class_stem.R index 04bb190c..f448cf17 100644 --- a/R/class_stem.R +++ b/R/class_stem.R @@ -1,3 +1,23 @@ +stem_init <- function( + name = NULL, + command = NULL, + seed = NULL, + deps = NULL, + settings = NULL, + cue = NULL +) { + stem_new( + name = name, + command = command, + seed = seed, + deps = deps, + settings = settings, + cue = cue, + store = settings_produce_store(settings), + file = file_init() + ) +} + stem_new <- function( name = NULL, command = NULL, @@ -5,7 +25,8 @@ stem_new <- function( deps = NULL, settings = NULL, cue = NULL, - store = NULL + store = NULL, + file = NULL ) { out <- new.env(parent = emptyenv(), hash = FALSE) out$name <- name @@ -15,6 +36,7 @@ stem_new <- function( out$settings <- settings out$cue <- cue out$store <- store + out$file <- file enclass(out, stem_s3_class) } diff --git a/R/class_target.R b/R/class_target.R index 5d20d9cc..39d6e5bb 100644 --- a/R/class_target.R +++ b/R/class_target.R @@ -54,14 +54,13 @@ target_init <- function( deps <- setdiff(deps, name) if_any( is.null(settings$pattern), - stem_new( + stem_init( name = name, command = command, seed = seed, deps = deps, settings = settings, - cue = cue, - store = settings_produce_store(settings) + cue = cue ), pattern_new( name = name,