Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express DANDI data models in LinkML #240

Closed
wants to merge 1 commit into from

Conversation

candleindark
Copy link
Member

@candleindark candleindark commented Apr 25, 2024

The goal of this PR is to provide representations of DANDI data models in LinkML.

The initial representations in LinkML are generated with https://github.com/candleindark/linkml-aind-model a fork of https://github.com/DailyDreaming/linkml-aind-model.

Incremental targets:

  • Develop the tool at https://github.com/candleindark/linkml-aind-model to produce more correct and complete conversion from Pydantic models to a LinkML schema
  • Set up a CI project to check various existing data instances against the produced LinkML schema
  • Use the produced LinkML schema to produce Pydantic models to replace the existing Pydantic models in the dandi-schema project and check how well the existing tests in the project pass.
  • Repeat the above steps to obtain a more complete and accurate LinkML schema if needed

These models are generated using
https://github.com/DailyDreaming/linkml-aind-model.
They are incomplete but a good starting point for
migrating to linkml models. These models are generated
based on their respective definition in dandischema
version 0.10.1.
Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.81%. Comparing base (dc15401) to head (55992f0).

Additional details and impacted files
@@              Coverage Diff              @@
##           to-linkml     #240      +/-   ##
=============================================
+ Coverage      87.39%   91.81%   +4.41%     
=============================================
  Files             16       16              
  Lines           1722     1722              
=============================================
+ Hits            1505     1581      +76     
+ Misses           217      141      -76     
Flag Coverage Δ
unittests 91.81% <ø> (+4.41%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yarikoptic yarikoptic marked this pull request as draft April 30, 2024 16:53
@candleindark candleindark changed the title Add initial representation of dandi models in linkml Express DANDI data models in LinkML May 17, 2024
@djarecka
Copy link
Member

djarecka commented Oct 7, 2024

@candleindark - can you point me to the newest version of the linkml schema. The links posints to versions that are 5-8months old

@candleindark
Copy link
Member Author

@djarecka You can generate the current schema using https://github.com/candleindark/pydantic2linkml/tree/enh (make sure it is the enh branch), by running pydantic2linkml -o dandi-linkml-schema.yml dandischema.models.

I will also make the latest DANDI LinkML schema available on https://github.com/dandi/dandisets-linkml-status, as part of the report directory, later today as well.

@djarecka
Copy link
Member

djarecka commented Oct 7, 2024

perhaps you can add it to github (even if it's not final), so I can point someone to it

@candleindark
Copy link
Member Author

I will provide a link to it at https://github.com/dandi/dandisets-linkml-status/blob/main/dandi-reports/summary.md. https://github.com/dandi/dandisets-linkml-status/tree/main will provide some the up-to-date info on the conversion of Dandi models to LinkML.

@candleindark
Copy link
Member Author

@djarecka The latest generated DANDI LinkML schema is now referenced on https://github.com/dandi/dandisets-linkml-status/blob/main/dandi-reports/summary.md.

@candleindark
Copy link
Member Author

I am closing this PR. It is no longer relevant. An up-to-date DANDI LinkML schema is now always referenced at https://github.com/dandi/dandisets-linkml-status/blob/main/dandi-reports/summary.md along with the validation results of dandiset metadata against it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants