Tooling to support interoperability in the world of linked-datalad-data
Find a file
2026-03-16 08:00:35 +01:00
code fix: make default iterable 2026-03-16 08:00:35 +01:00
data wip neurobagel tests; change shacl group schema namespace to dlco 2024-12-12 20:17:15 +01:00
datalad-concepts@323397dda3 bump dlco version to latest changes including shaclgen patch for order 2024-12-12 20:20:36 +01:00
outputs wip neurobagel tests; change shacl group schema namespace to dlco 2024-12-12 20:17:15 +01:00
schemas adds dlco prefix to property group schema 2024-12-12 20:17:55 +01:00
.gitignore ignore ds_store files 2024-12-12 15:57:57 +01:00
.gitmodules point submodule to datalink branch 2024-09-24 10:05:02 +02:00
LICENSE Initial commit 2024-09-20 08:59:38 +00:00
README.md Add register-uploads script to README 2026-02-09 10:26:44 +00:00

DataLink Tools

WORK IN PROGRESS - CAN CHANGE AT ANY MOMENT

Tooling to support interoperability where linked data and DataLad meet. These tools are co-developed in order to integrate several other tools/frameworks:

  1. In a virtual environment: install the latest version of linkml with pip, either from PyPI or from source at https://github.com/linkml/linkml
  2. Clone this tools repository: git clone https://hub.datalad.org/datalink/tools.git datalink_tools
  3. Make sure the content of the datalad-concepts submodule is available locally
  4. Patch your LinkML installation to allow correct integration with datalad-concepts and the tools in this repository:
cd datalink_tools/datalad-concepts
tools/patch_linkml

Generating UI-annotated SHACL shapes from a LinkML schema

LinkML has the ability to export its YAML schemas and validated YAML data into various formats. One such format for schemas is the Shapes Constraint Language, SHACL, which is a standard for validating RDF graph data. Apart from validation, SHACL schemas containing enough information can be used by applications/script to autogenerate user interfaces. An example is shacl-vue, a VueJS-based web application that uses SHACL for auto-generating metadata forms, viewers, and editors. To support such applications, the SHACL exported by LinkML should include UI-annotations.

Update a LinkML schema with UI annotations

TODO

Export SHACL

TODO

python code/gen_shacl_ui.py datalad-concepts/src/thing/unreleased.yaml data/dlco-shacl-groups.yaml

Generating a data dictionary for Neurobagel from a LinkML schema

TODO: A previous version of this README contained a thorough description of how to generate a data dictionary using a now outdated approach. A new approach is to be developed and documented...

For background, read these DataLad-Neurobagel integration notes.

A structured data dictionary is required by Neurobagel when adding TSV data to a Neurobagel node. Our goal is to embed the information required by a Neurobagel data dictionary into any datald-concepts-derived schema that models data that could end up being represented in a Neurobagel node. This would be useful because the schema would simultaneously:

  • model the data using datald-concepts-compatible classes, e.g. a Scientific Data Distribution schema
  • contain UI annotations that enable generating a SHACL shapes graph with sufficient information to drive shacl-vue form generation
  • contain slots with Neurobagel annotations that enable the programmatic generation of a Neurobagel data dictionary

CI workflow to register file uploads from shacl-vue editors

The script code/register-upload.py is a resource to use in CI actions for automatic registration of uploaded annex keys into target repositories. Shacl-vue's file upload feature (see https://shacl-vue.psychoinformatics.de/features-file-upload.html#file-upload) essentially stores file content as unused, unreferenced keys in its configured upload repository. This tool identifies such unused keys, and registers them in the target repository by creating an annex pointer file. The name and structure of the pointer file location is derived from metadata records from the dumpthings instance the file was uploaded to. You can see it being used in this CI action