Skip to contents

Run multiple workflow steps

Usage

morie_run_pipeline(
  steps = NULL,
  project_root = NULL,
  script_map = morie_default_workflow_map(),
  stop_on_error = TRUE,
  verbose = TRUE
)

Arguments

steps

Ordered vector of workflow step names.

project_root

Project root directory.

script_map

Named character vector mapping steps to script paths.

stop_on_error

If TRUE, stop at first failure.

verbose

If TRUE, streams command output.

Value

Data frame of step statuses.

Examples

# Build a one-step pipeline in tempdir and dispatch it. The
# real package's morie_default_workflow_map() points at scripts that
# live in a morie project tree.
tdir <- tempfile("morie-doc-")
dir.create(tdir)
step <- file.path(tdir, "step.R")
writeLines('cat("hello from pipeline\\n")', step)
morie_run_pipeline(
  steps = "demo",
  project_root = tdir,
  script_map = c(demo = step),
  verbose = FALSE
)
#>   step script status
#> 1 demo   <NA>      1
#>                                                                                                             error
#> 1 Workflow script not found: /tmp/Rtmp7fqYDy/morie-doc-2e514546e1b6//tmp/Rtmp7fqYDy/morie-doc-2e514546e1b6/step.R