Skip to content

Shared JSON-LD conformance corpus with openMINDS_Python #162

Description

@ehennestad

The only cross-implementation check between this toolbox and openMINDS_Python is InteropTest, which lives here, builds one six-node fixture on both sides and compares. It is one-sided: the Python project does not run it, and nothing outside MATLAB ever reads a document for most types. That is how a required property of GridImageStack was exported under the wrong name for years (fixed on branch fix-schema-property-name-map-and-subsref-fallback): the round-trip suite compared MATLAB output with MATLAB output, and the interop fixture did not contain the type.

The Python library has the mirror-image gaps: its random round-trip test never populates IRI, date or bool properties, and its behaviour for @type as a list, expanded IRIs as keys and datetime text in date properties was each fixed as a separate regression after a user hit it.

Proposal: a language-neutral conformance corpus, ideally in the openMINDS organisation rather than in either implementation:

  • a set of JSON-LD documents, each with a short statement of what a conforming reader must produce (nodes, links, values) and what a conforming writer must emit for the same collection;
  • covering every property type and format the schemas use, embedded and linked values, mixed-type properties, references outside the document, both property-name syntaxes, @type as list, and one document per model version;
  • consumed by both CI pipelines, so a change on either side that breaks the contract fails there.

The existing tools/tests/fixtures/interop_collection.json and tools/tests/interop/openminds_interop.py are a starting point. Until an upstream home exists, the corpus could live here and be pointed at from the Python repo.

🤖 Generated with Claude Code

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions