Globs the .qmd files in workflows_dir, reads the YAML frontmatter of each
(the block between the first two --- fences), and keeps only those carrying
a top-level msens: key. Returns one row per pipeline notebook with the
fields needed to wire the targets DAG.
Usage
parse_qmd_frontmatter(workflows_dir = here::here(), pattern = "*.qmd")Arguments
- workflows_dir
directory holding the pipeline
.qmds (defaulthere::here())- pattern
glob for notebooks (default
"*.qmd")
Details
The msens: block vocabulary:
- target_name
the
targetsnode name (a legal R symbol)- workflow_type
one of
grid,ingest,merge,score,publish,release,test- dependency
list of upstream
target_names, or[auto]to depend on everygrid+ingesttarget- output
the file/dir the notebook produces (tracked via
format = "file"; may contain a*glob)
Examples
if (FALSE) { # \dontrun{
wf <- parse_qmd_frontmatter("~/Github/MarineSensitivity/workflows")
dplyr::filter(wf, workflow_type == "ingest")
} # }