Repository navigation
fix(frame): reverse IRI grouping, $ref embeds and default type anchors - #179
Merged
Merged
Conversation
is_embed now counts a $ref, and the reference subframes are written before the embedded ones, so a property both signals claim keeps the empty subframe that preserves its nested keys. Fixes #175
Contributor
Release previewMerging this PR would release v2.3.1 (current: Changelog preview (truncated)## v2.3.1 (2026-11-15)
### Bug Fixes
- **frame**: Anchor the frame on a type pinned as a default
([`fa22022`](https://github.com/OO-LD/oold-python/commit/fa220221e48feb83c26879748c317457d2484012))
- **frame**: Keep a $ref-valued embed out of the reference list
([`a7ac1d1`](https://github.com/OO-LD/oold-python/commit/a7ac1d1d153719258fb299c3f706a58238bbe9c4))
- **frame**: One reverse subframe per IRI, not per term
([`74a3adf`](https://github.com/OO-LD/oold-python/commit/74a3adf44fb647aa544c7432c0e5fd78f44949c1))
### Documentation
- **controller**: Name controller members for what they do
([`648018f`](https://github.com/OO-LD/oold-python/commit/648018fc480934b5b5185c6d0702860392e90c25))
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.
Three defects in
schema_to_frame, one commit and one regression test each.is_embedcounts a$ref, andreference_propertiesdrops anythingembedded_propertiesclaims. Reference subframes are written first, embedded ones second, so a property both signals claim keeps{}instead of being overwritten with{"@embed": "@never"}and losing its nested keys. A$refis the only trace of an embed before dereferencing, while the"@type": "@id"OO-LD requires on such a term makes it look reference-valued at the same time.@reverse, keyed by the reverse IRI as the term writes it (new helperreverse_predicates). Two terms on one reverse IRI expanded to two subframes under that IRI, which pyld rejects withinvalid frame. This changes the derived frame for every reverse term, not only colliding ones; for a single term both forms frame to the same document, checked on the Organization/worksFor shape. Derived frames carry no sub-properties, so the expanded-IRI constraint recorded in the issue does not arise.instance_rdf_typesfalls back toproperties.type.defaultwherex-oold-instance-rdf-typeis absent, read before theallOfwalk because a schema's own spelling is nearer than an inherited one. Without that anchor the first backwards edge degenerates the framed result to@graph.#175 is a 2.x regression, from #164 and #155 interacting rather than from either alone, and an open range such as
oold[validation]>=0.20resolves to it today. #176 and #177 are present on 0.18.1 and 0.19.0 as well.Tests 800 passed / 10 skipped / 1 xfailed before, 804 / 10 / 1 after; each new test was confirmed to fail on the unfixed code.
make checkandmake validatepass.