Skip to content

Implement the Spec → LinkML writer (CSRMatrix / base.yaml) #1490

Description

@rly

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

Implement a writer in hdmf/spec/linkml that serializes HDMF Spec objects (GroupSpec, DatasetSpec, AttributeSpec, etc.) to LinkML following the agreed conventions, including the namespace-level schema and any companion files the conventions require (for example, the dtype type definitions). Expose the writer through HDMF's schema export path so the programmatic schema API can output LinkML.

Because reading an HDMFSL schema into Spec already works, this writer also completes the HDMFSL → Spec → LinkML migration path; verifying its output against the fixtures validates that path.

Acceptance criteria

  • hdmf/spec/linkml writer serializes Spec objects to LinkML following the agreed conventions, emitting any required companion files.
  • The writer is reachable through HDMF's schema export API.
  • The LinkML written for CSRMatrix and the base types matches the fixtures from the fixture-translation issue (modulo formatting).
  • Tests cover the writer at HDMF's usual coverage standard.

Metadata

Metadata

Assignees

Fields

No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions