Skip to content

Translate base.yaml and CSRMatrix to LinkML #1488

Description

@rly

Part of the "Read and write LinkML schema for HDMF (CSRMatrix / base.yaml)" epic. Depends on the mapping-conventions issue.

Hand-author the LinkML translation of a minimal test namespace: a namespace.yaml that references only base.yaml (Data, Container, SimpleMultiContainer) and sparse.yaml (CSRMatrix), plus those two schema files, following the agreed mapping conventions. These become the fixtures the reader and writer are tested against, so they must be correct and follow the conventions exactly. Include any companion files the conventions call for (for example, the dtype type definitions). The namespace references only these two files so the out-of-scope table.yaml and resources.yaml are excluded.

The HDMFSL sources are src/hdmf/common/hdmf-common-schema/common/base.yaml and src/hdmf/common/hdmf-common-schema/common/sparse.yaml; the test namespace.yaml is a new, minimal namespace modeled on src/hdmf/common/hdmf-common-schema/common/namespace.yaml but referencing only those two files.

The examples should be described in full in the new docs/source/linkml-mapping.rst file from #1487, as well as added as YAML to tests/unit/linkml_tests/fixtures/.

Acceptance criteria

  • LinkML files for the test namespace, the base types, and CSRMatrix committed to tests/unit/linkml_tests/fixtures/.
  • The LinkML follows the agreed conventions and loads without error under linkml-runtime's SchemaView.
  • Every construct in the two HDMFSL schemas is represented; nothing the reader will need is dropped.
  • linkml-runtime is added as an optional linkml dependency group; the core install does not require it.
  • A unit test that shows that the translated LinkML schema is valid LinkML, using linkml-runtime's SchemaView.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions