Combines manually written PUT annotations with auto-detected workflow elements, allowing flexible strategies for handling conflicts and supplementing information.
Usage
put_merge(
path,
pattern = NULL,
recursive = TRUE,
merge_strategy = "manual_priority",
include_line_numbers = FALSE,
exclude = NULL,
log_level = NULL
)Arguments
- path
Character string specifying the path to a file or directory
- pattern
Character string specifying the file pattern to match. Default: all extensions with detection pattern support.
- recursive
Logical. Should subdirectories be searched recursively? Default: TRUE
- merge_strategy
Character string specifying how to merge:
"manual_priority" - Manual annotations override auto-detected (default)
"supplement" - Auto fills in missing input/output fields only
"union" - Combine all detected I/O from both sources
- include_line_numbers
Logical. Should line numbers be included? Default: FALSE
- exclude
Character vector of regex patterns. Files whose full path matches any pattern are excluded. Default: NULL (no exclusion).
- log_level
Character string specifying log verbosity for this call. Overrides the global option
putior.log_levelwhen specified. Options: "DEBUG", "INFO", "WARN", "ERROR". Seeset_putior_log_level.
Value
A data frame in the same format as put(), containing
merged workflow information from both manual and auto-detected sources.
Examples
if (FALSE) { # \dontrun{
# Merge with manual annotations taking priority
workflow <- put_merge("./src/")
put_diagram(workflow)
# Supplement manual annotations with auto-detected I/O
workflow <- put_merge("./scripts/", merge_strategy = "supplement")
# Combine all inputs/outputs from both sources
workflow <- put_merge("./analysis/", merge_strategy = "union")
} # }