Skip to contents

[Stable]

Compares graph_invariant_counts() against the bands declared in the graph_invariants block of docs/framework-invariants.yml. Each band is a pair of inclusive bounds; a pair with two equal bounds is an exact value. A measured quantity outside its band raises a classed condition naming every disagreement.

Bands are the file's claim about the pipeline's output. A value that leaves its band is a human-review event: something upstream moved, and the right response is to find out what before editing the number.

Usage

assert_graph_invariants(rdf, invariants_path = NULL, declared = NULL)

Arguments

rdf

An rdf object.

invariants_path

Character path to the invariants file. Defaults to docs/framework-invariants.yml in the source checkout.

declared

Optional pre-read graph_invariants list, used in place of reading the file. Mainly for tests.

Value

Invisibly, the tibble of measured counts.

Examples

if (FALSE) { # \dontrun{
assert_graph_invariants(load_combined_ntriples_graph())
} # }