fix(validation): treat an absent @context as every property unmapped - #142
Merged
Conversation
_unmapped_properties returned the empty set for a context that resolved to nothing, so roundtrip.generated counted every declared property as a mapped loss and failed the schema for what OOLD-SCH-2d05 permits. context.coverage now reports the case it was silent on, so a schema mapping none of its properties is not quieter than one mapping all but one. Closes #141
Contributor
Release previewMerging this PR would release v0.18.2 (current: Changelog preview (truncated)## v0.18.2 (2026-08-29)
### Bug Fixes
- **validation**: Treat an absent @context as every property unmapped
([`25cdbf5`](https://github.com/OO-LD/oold-python/commit/25cdbf5ddf074359ed4c1110d83b782761cb6aa1))
Preview via python-semantic-release and conventional commits. |
Contributor
📊 Benchmark ResultsClick to see benchmark comparisonThreshold: 1.3x (30% slower triggers a regression warning) Note: Benchmarks are informational only and won't fail the build. 💡 Tip: Download the |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Aug 31, 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.
Fixes #141.
Before
vis not mapped; the schema declares no@context.OOLD-SCH-2d05says an unmapped term must not be a conformance failure.After
Change
_unmapped_propertiessplit the two cases its docstring already distinguished. A context that cannot be resolved still returns the empty set, because the checks that report resolution failures own that. A context that resolves to nothing is the opposite: no term exists, so every declared property is unmapped.context.coveragealso reports the empty-context case, which it skipped past. Without that, a schema with no@contextproduced no signal at all once the wrong failure was removed - quieter than a schema that maps nine properties out of ten.Verification
pytest: 560 passed, 9 skipped, plus ano_context.schema.jsonfixture and a regression testoold-schema/examples380 ok / 0 failed andexamples/compliance72 ok / 0 failed, both unchangedvalidate.mjs: 6 passedParity failed on
mainbefore this branch, for an unrelated reason: theremotemeta cache still held a copy ofrefs/heads/mainfrom before OO-LD/oold-schema#152, socoverage.vocabdemanded a fixture for a keyword that no longer exists.oold meta fetch --forceclears it. That is #138, noted there.