Skip to content

Offer ontology graphs as context graph - #7

Merged
seebi merged 2 commits into
mainfrom
feature/context-graph-ontologies
Sep 8, 2026
Merged

Offer ontology graphs as context graph#7
seebi merged 2 commits into
mainfrom
feature/context-graph-ontologies

Conversation

@seebi

@seebi seebi commented Sep 8, 2026

Copy link
Copy Markdown
Member

What

The Context Graph parameter of Validate Knowledge Graph did not offer a single ontology graph in its dropdown.

GraphParameterType filters autocompletion by graph class, and when no classes are passed it falls back to di:Dataset, void:Dataset and shui:QueryCatalog. An ontology graph carries owl:Ontology and nothing else, so all of them were filtered out — on the test deployment that is 7 of 18 graphs, including skos, rdfs, owl and https://vocab.eccenca.com/auth/. The IRI could still be typed by hand, since allow_only_autocompleted_values=False, but it was never offered.

How

The class list is now an explicit CONTEXT_GRAPH_CLASSES constant holding the three former defaults plus owl:Ontology.

shape_graph and result_graph are deliberately untouched. The result graph is a write target that clear_result_graph can wipe, so offering vocabularies there would invite someone to clear one.

Test

tests/fixtures/ontology.ttl declares its own graph as owl:Ontology, the way shapes.ttl declares itself a shui:ShapeCatalog. A dedicated fixture imports and deletes it, and the new test_ontology_as_context_graph asserts the graph is among the autocompleted values. Verified red before the change and green after; task check passes in full (7 tests).

🤖 Generated with Claude Code

https://claude.ai/code/session_01SxhW9xhADjcpzFezfXBBDk

GraphParameterType filters its autocompletion by graph class and defaults to
di:Dataset, void:Dataset and shui:QueryCatalog when no classes are passed.
Ontology graphs carry owl:Ontology only, so none of them was offered for the
context graph parameter, although validating an ontology against SHACL shapes
is a normal thing to do. The IRI could still be typed by hand, since the
parameter does not require an autocompleted value.

The class list is now passed explicitly and adds owl:Ontology. The result
graph keeps the previous set on purpose: it is a write target which
clear_result_graph can wipe, so it has no business offering vocabularies.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SxhW9xhADjcpzFezfXBBDk
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Coverage

Coverage Report
File Stmts Miss Cover Missing
init.py 0 0 100%
validate_entities/init.py 0 0 100%
validate_entities/state.py 10 0 100%
validate_entities/task.py 134 38 72% 192 201 212 223-226 231 233-235 249 263-264 286 291 321 323-324 327-330 333-336 338 340-342 344 349 352-353 355 357-358
validate_graph/init.py 0 0 100%
validate_graph/state.py 22 0 100%
validate_graph/task.py 77 6 92% 187-188 195-196 199 206
TOTAL 243 44 82%  

Tests Skipped Failures Errors Time
7 0 💤 0 ❌ 0 🔥 73.906 ⏱

@seebi
seebi merged commit 1a79388 into main Sep 8, 2026
2 checks passed
@seebi
seebi deleted the feature/context-graph-ontologies branch September 8, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant