
Write a closed reproducibility manifest into a Salmon Data Package
Source:R/reproducibility-manifest.R
write_sdp_reproducibility_manifest.RdBinds an explicit inventory of reviewed semantic selections, workflow
records, provenance, and source records to exact paths, media types, byte
sizes, and SHA-256 hashes in reproducibility/manifest.json. The writer does
not discover files. Validation requires the declarations to be closed over
the actual reproducibility tree, which prevents accidental publication of
local notes or editor backups.
Arguments
- path
Existing Salmon Data Package directory.
- artifacts
Non-empty data frame with exactly
path,role, andmedia_typecolumns. Paths are package-relative. Roles arereviewed_semantic_selections,workflow,provenance, orsourceand must agree with the canonical directory layout.- overwrite
Logical; replace an existing managed manifest when
TRUE.
Examples
sdp_path <- tempfile("sdp-")
dir.create(file.path(sdp_path, "reproducibility", "workflow"),
recursive = TRUE)
writeLines("message('prepare data')",
file.path(sdp_path, "reproducibility", "workflow", "prepare.R"))
artifacts <- data.frame(
path = "reproducibility/workflow/prepare.R",
role = "workflow",
media_type = "text/x-r-source"
)
write_sdp_reproducibility_manifest(sdp_path, artifacts)
validate_sdp_reproducibility_manifest(sdp_path)
unlink(sdp_path, recursive = TRUE)