## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")

## ----object-pipeline, eval=FALSE----------------------------------------------
# spec <- wf_pipeline(
#   target = target,
#   stages = list(
#     calibrate = list(method = "raking", tol = 1e-8)
#   ),
#   validate = list(max_deff = 6, max_margin_dev = 0.01)
# )
# 
# weights <- wf_run(spec, design, dims)

## ----population-pipeline, eval=FALSE------------------------------------------
# population_spec <- wf_pipeline(
#   target = list(mode = "population"),
#   stages = list(calibrate = list(method = "raking"))
# )
# 
# weights <- wf_run(
#   population_spec,
#   design,
#   dims,
#   population = target
# )

## ----audit, eval=FALSE--------------------------------------------------------
# wf_audit_export(
#   weights,
#   "pipeline-audit.json",
#   inputs = list(design = design, target = target)
# )

