Offer ontology graphs as context graph - #7
Merged
Conversation
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
Coverage Report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Context Graph parameter of Validate Knowledge Graph did not offer a single ontology graph in its dropdown.
GraphParameterTypefilters autocompletion by graph class, and when noclassesare passed it falls back todi:Dataset,void:Datasetandshui:QueryCatalog. An ontology graph carriesowl:Ontologyand nothing else, so all of them were filtered out — on the test deployment that is 7 of 18 graphs, includingskos,rdfs,owlandhttps://vocab.eccenca.com/auth/. The IRI could still be typed by hand, sinceallow_only_autocompleted_values=False, but it was never offered.How
The class list is now an explicit
CONTEXT_GRAPH_CLASSESconstant holding the three former defaults plusowl:Ontology.shape_graphandresult_graphare deliberately untouched. The result graph is a write target thatclear_result_graphcan wipe, so offering vocabularies there would invite someone to clear one.Test
tests/fixtures/ontology.ttldeclares its own graph asowl:Ontology, the wayshapes.ttldeclares itself ashui:ShapeCatalog. A dedicated fixture imports and deletes it, and the newtest_ontology_as_context_graphasserts the graph is among the autocompleted values. Verified red before the change and green after;task checkpasses in full (7 tests).🤖 Generated with Claude Code
https://claude.ai/code/session_01SxhW9xhADjcpzFezfXBBDk