Remove self-referential owl:imports from bundled SHACL templates - #11
Merged
marco-volpini merged 2 commits intoAug 4, 2026
Merged
Conversation
…plates Each bundled template declared its ontology as importing itself — a no-op that can send import-resolving loaders into a redundant self-fetch. Keep the owl:Ontology declaration, drop the self-import. Data-only change; the tests that load and register these templates stay green. Fixes CIRPASS-2#10
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.
Remove self-referential
owl:importsfrom bundled SHACL templatesFixes #10.
What
Each bundled SHACL template declared its ontology as importing itself:
This PR drops the self-referential
owl:importsclause (keeping theowl:Ontologydeclaration) in:
core/src/test/resources/shacl-templates/battery_pass_shacl.ttlcore/src/test/resources/shacl-templates/vehicle_shacl.ttlcore/src/test/resources/shacl-templates/electronics_shacl.ttlapi/rest/src/test/resources/shacl-templates/test-addition.ttldatastore/pgsql/src/test/resources/shacl-templates/test-addition.ttlWhy
A self
owl:importsis a no-op at best and can send import-resolving loaders into aredundant self-fetch. These templates are the only shapes the repo ships, and downstream
users copy them as starting points.
Tests
Data-only change to test resources — no code paths altered. Verified locally with the full
reactor (
./mvnw test, JDK 21): all modules green, including the tests that load andregister these exact templates (
testAddTemplate,ValidationResourceAPITest, pgsqldatastore tests). Happy to add a guard test that scans bundled templates for self-imports if
you'd like one.
— Giovanni Savastano · OpenDPP (opendpp-node.eu)