Skip to content

Drop the local mapping-set selection and transform once oold ships them #4

Description

@simontaurus

schema_playground.mappings and schema_playground.transform both carry a "Pending upstream migration" docstring. OO-LD/oold-python#154 is that migration - oold.utils.mappings added, oold.utils.transform replaced over x-oold-context instead of the pre-spec "name*" sibling keys. It is green and mergeable but unreviewed since 12 September; merged against today's main locally the suite passes (757). Once it lands and ships, both modules import from oold and the local copies go.

Three things do not come along with it.

_materialize_types / _property_types have no upstream home yet. They implement OOLD-INS-75c6 (MUST): an exporter materializes the schema-declared rdf:types as @type. Upstream has instance_rdf_types() to read them and nothing that writes them - the keyword appears nowhere outside the validator. They belong on oold's export path (static.export_jsonld / to_jsonld), and this local implementation is the one to move, since it also handles nested objects taking their property's declared type, @graph documents, and copy-before-write so shared nodes are not mutated.

reference_preserving_frame is close to redundant but not a straight deletion. schema_to_frame in oold 1.0.1 already emits {"@embed": "@never"} for reference properties, and via all three signals of OOLD-EXT-68fa rather than format alone (oold-python#161). The mismatch is shape: it takes one schema, while this repo passes a chain of separate documents and loops over every member, which is what catches a reference property declared on a base rather than inlined in the derived document. Either schema_to_frame grows a chain-aware entry point or the playground composes before calling it - worth settling upstream rather than papering over here.

The pin. oold[validation]>=0.20 predates all of this; >=1.0.1 is the precondition for the frame part, and a further bump for the rest.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions