Skip to contents

Reads every pipeline notebook's msens: block (via parse_qmd_frontmatter()) and returns a list() of targets::tar_target_raw() objects for use as the body of _targets.R. Each target's body is a {} block whose leading statements are bare references to its upstream target names (so targets draws the DAG edges), followed by a quarto::quarto_render() of the notebook and the output path (tracked with format = "file" for hash-based invalidation).

Usage

build_targets_list(
  workflows_dir = here::here(),
  exclude = NULL,
  verbose = TRUE
)

Arguments

workflows_dir

directory holding the pipeline .qmds (default here::here())

exclude

character vector of target names (or .qmd filenames) to drop from the pipeline; excluded targets are also stripped from other targets' dependency lists

verbose

print the parsed workflow table (default TRUE)

Value

a list() of tar_target_raw() objects for _targets.R

Details

dependency: [auto] (typically the release caboose) resolves to every grid + ingest target.

Examples

if (FALSE) { # \dontrun{
# in _targets.R:
library(targets)
library(msens)          # or devtools::load_all("../msens")
build_targets_list()
} # }