Mapping-set selection and rc.2 x-oold-context transform - #154
Open
simontaurus wants to merge 1 commit into
Open
simontaurus wants to merge 1 commit into
simontaurus wants to merge 1 commit into
Conversation
- add oold.utils.mappings: promote, mapping_sets, chain, context_of, synonym_entries; the selection OOLD-EXT-4966 describes, complementing validation's promoted_terms which deliberately never chooses - replace the name* alias notation in oold.utils.transform with to_rdf/from_rdf/transform over x-oold-context: exactMatch rewriting, @reverse inversion, @graph framing, @nest shape bridging under a named set (OO-LD/oold-schema#135) - re-encode the alias-notation test cases as x-oold-context, same inputs and expected outputs
Contributor
Release previewMerging this PR would release v0.21.0 (current: Changelog preview (truncated)## v0.21.0 (2026-09-12)
### Documentation
- **validation**: Correct how pyld actually fails on each count
([#150](https://github.com/OO-LD/oold-python/pull/150),
[`4556612`](https://github.com/OO-LD/oold-python/commit/455661251a7ca5681608a0c2391dd77ae0e33775))
- **validation**: Document the fault status in the how-to
([#152](https://github.com/OO-LD/oold-python/pull/152),
[`6b31fd3`](https://github.com/OO-LD/oold-python/commit/6b31fd37af1c9c97b9a4aecb5d3583f9aa30ccf6))
- **validation**: Give the context walker a true justification
([#150](https://github.com/OO-LD/oold-python/pull/150),
[`4556612`](https://github.com/OO-LD/oold-python/commit/455661251a7ca5681608a0c2391dd77ae0e33775))
- **validation**: State what --offline pins and what nothing pins
([#149](https://github.com/OO-LD/oold-python/pull/149),
[`abcad76`](https://github.com/OO-LD/oold-python/commit/abcad7665a235169eab7465e16f36b4aefda92e4))
### Features
- **utils**: Mapping-set selection and rc.2 x-oold-context transform
([`156b9b0`](https://github.com/OO-LD/oold-python/commit/156b9b0e4a95732c8059cbd060610d1413047a2c))
### Testing
- **validation**: Check context equality over every schema, not thirteen
([#153](https://github.com/OO-LD/oold-python/pull/153),
[`d47f39e`](https://github.com/OO-LD/oold-python/commit/d47f39e95a748531f15eca4b3bbf1de9159bff7d))
- **validation**: Pin the pyld equivalence the docstring argues from
([#150](https://github.com/OO-LD/oold-python/pull/150),
[`4556612`](https://github.com/OO-LD/oold-python/commit/455661251a7ca5681608a0c2391dd77ae0e33775))
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❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Changes
oold.utils.mappings(new):promote,mapping_sets,chain,context_of,synonym_entries. This is the profile-based selectionOOLD-EXT-4966describes; it complementsvalidation.context_resolution.promoted_terms, which deliberately never chooses a synonym (OOLD-EXT-8f62). Ported fromoold-reference-schemas/scripts/{_shared,build_docs}.pyand verified equivalent against that implementation on thequantitiesmodule (all schemas, all three mapping sets plus consensus). Two deliberate extensions over the port:mapping_set_idmay be a list (the spec allows it), and a@reversesynonym promotes to@reverserather than an invalid@id+@reversepair.oold.utils.transform(replaced):to_rdf/from_rdf/transformoverx-oold-context. Export promotes a named set; import rewrites everyexactMatchsynonym onto the primary IRI (no set needed), inverts@reverserelations, frames@graphinput viavalidation.frame.schema_to_frame, and bridges document shapes when a promoted fragment carries@nestand a set is named. Readings A/B/C/E of Mapping-set selection can bridge document shapes via @nest, and the spec should say so oold-schema#135 are reproduced exactly and pinned as regression tests, including the boundary that vocabulary is bridged without a selection and shape is not.tests/test_transform.pyrewritten: thename*alias cases are re-encoded asx-oold-contextwith the same inputs and expected outputs, so the change of notation provably does not change what the transformation produces.Breaking change
jsonld_to_jsonld/json_to_jsonand the pre-specname*alias notation are removed. Onlytests/test_transform.pyreferenced them in this repository. The commit is deliberately typedfeat:rather thanfeat!:so semantic-release does not force a major bump; retype if a major is wanted.Verification
main;make checkgreen.schema-playgroundin https://github.com/OO-LD/oold-playgrounds/tree/feat/schema-playground vendors exactly these modules pending this PR; once released they can be deleted there.Closes the mappings/transform part of the migration listed in https://github.com/OO-LD/oold-playgrounds/blob/feat/schema-playground/schema-playground/README.md#pending-upstream-migration