ontocast.check.facts¶
Check a user-supplied facts graph against a catalog, without a model.
Attributes¶
Vocabulary = TypingLiteral['strict', 'open']
module-attribute
¶
Classes¶
Functions:¶
check_facts(graph, ontology_graph, shapes_graph=None, *, vocabulary='strict', additional_standard_namespaces=(), instance_namespaces=None, max_findings=None, shacl_max_triples=0)
¶
Check a facts graph against a catalog ontology and report what is wrong.
The graph is never modified: every check that rewrites runs on a copy.
With an empty or missing catalog, the checks that need one are skipped
and the report says so (catalog_empty); the well-known-term checks
and literal syntax still run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
graph
|
Graph
|
Facts graph, in the user's own namespaces. |
required |
ontology_graph
|
Graph | None
|
Merged catalog ontology; |
required |
shapes_graph
|
Graph | None
|
Merged SHACL shapes, or |
None
|
vocabulary
|
Vocabulary
|
|
'strict'
|
additional_standard_namespaces
|
Sequence[str]
|
Namespaces treated like the standard vocabularies. |
()
|
instance_namespaces
|
Sequence[str] | None
|
When given, only subjects under these namespaces are instances. |
None
|
max_findings
|
int | None
|
Cap on the returned findings; |
None
|
shacl_max_triples
|
int
|
Skip SHACL validation above this many triples; 0 means no limit. |
0
|
Returns:
| Type | Description |
|---|---|
FactsCheckReport
|
The report. |
Source code in ontocast/check/facts.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | |