test: cover a complete generated-schema document end to end - #63
Merged
Merged
Conversation
The seeded property graphs exercise each hard RDF shape on its own. A real generated schema puts them in one document, where shared list tails, a blank-node cycle, OWL restrictions and SHACL shapes interact. Add a naturalistic OWL/SHACL fixture and check that every public rendering preserves it, stays idempotent, and ignores incoming blank-node names and insertion order. Adding an unrelated class must rewrite nothing: the same edit moves 40 existing lines under RDFC-1.0 labels alone, which the test asserts as its own control so a weakened fixture cannot pass silently. Map the new cases as end-to-end evidence for RDF-ISOMORPHISM, TURTLE-STABILITY and WL-COMPONENTS, which until now claimed no composed-document dimension.
This was referenced Sep 18, 2026
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.
Adds the document-level correctness net that #61's canary implies: a complete,
naturalistic generated-schema document, checked end to end.
Why
From the linkml/linkml#3985 review, this comment:
The seeded graphs in
properties/exercise each hard shape on its own. Thiscovers the other risk: one document where they interact.
What
tests/integration/test_naturalistic_schema.py- an OWL/SHACL document thatcombines, in a single graph:
owl:unionOflists sharing a tail cell, and a list whose member is a listsh:ignoredPropertieslistrdf:nilEight tests, 32 cases: isomorphic round-trip, idempotence, blank-node-label
independence and insertion-order independence across all seven public
renderings, plus diff locality on a realistic edit. A guard test asserts the
fixture still contains each hard shape, so the rest cannot pass vacuously.
The behavior it pins down
Adding one unrelated class to that document:
test_adding_a_class_rewrites_nothing_rdfc_alone_would_rewriteasserts botharms, so a fixture that stopped demonstrating the problem fails instead of
passing quietly.
Requirement catalog
RDF-ISOMORPHISMandTURTLE-STABILITYdescribed only seeded graphs, and boththey and
WL-COMPONENTSdeclared theirend-to-enddimension not-applicable.The new cases are mapped as end-to-end evidence on all three, the descriptions
updated, and
coverage.mdregenerated.No release
No
src/change, so no behavior or emitted-byte change, and no changelog entryLocal verification: 1259 passed, coverage 96.13% (gate 95%),
check_requirements.pyandcheck_standards.pyclean, ruff check and format clean.