Skip to contents

Writes a fully-optioned dqcheckr.yml: the shared infrastructure paths set live to their built-in defaults (visible and editable), and a commented default_rules block listing every rule key with its default value and description – the full rule vocabulary in one place, so thresholds can be changed by uncommenting a line rather than consulting the manual. Rules with no default are shown with an example value and a note that leaving them unset keeps the check off.

Usage

generate_global_config(config_dir = ".")

Arguments

config_dir

Character. Directory to write dqcheckr.yml into (created if absent). Defaults to ".".

Value

Invisibly, the path of the written config file.

Details

Create-only, like generate_dataset_config: an existing dqcheckr.yml is never overwritten – generation aborts with dqcheckr_config_exists and the file is untouched. The write is crash-safe (emitted to a temp file, renamed into place once complete); see the Accepted design decisions section of the specification vignette for the residual concurrent-generation caveat.

Examples

tmp <- file.path(tempdir(), "gen-global-demo")
cfg <- generate_global_config(config_dir = tmp)
#> [dqcheckr] Global config written: /tmp/RtmpXCCxT9/gen-global-demo/dqcheckr.yml
#>   Relative snapshot_db/report_output_dir resolve against the working directory -- run from the deployment root.
yaml::read_yaml(cfg)$snapshot_db
#> [1] "data/snapshots.sqlite"