linkml / schemasheets

Structure your data in a FAIR way using google sheets or TSVs. These are then converted to LinkML, and from there other formats
https://linkml.io/schemasheets/
41 stars 5 forks source link

linkml2sheets alternative? #41

Closed turbomam closed 1 year ago

turbomam commented 2 years ago

I have found that the experimental linkml2sheets can't sheetify several of the elements and attributes I care about, and it can't seem to do even a minimal dump on complex/large schemas like MIxS. I have written some code that approximate a LinkML/sheets round trip on the following metaclasses:

See the turbomam/linkml-abuse project.Makefile

The prefixes and subsets don't seem to include the content of imports

I'm not using a template to determine what gets written to the sheets. I'm iterating over all slots, except for the skipped slots listed below.

If my code was going to be included in any LinkML repo, it would need refactoring for performance and readability. I can do some of that. Even as it is, I have already used this for QC'ing the MIxS schema and plan to use it for round-tripping the NMDC submission portal schema (within sheets_and_friends)

There are some minor systematic changes between the before and after schemas. Thats crudely reported in target/roundtrip.yaml

skipped slots:

cmungall commented 2 years ago

I believe when you say template you mean column configurations

Does it help if we say there are two use cases:

  1. linkml2sheets: going from an abritrary linkml schema to an arbitrary schemasheets configuration
  2. linkml2basic_sheets: going from an abritrary linkml schema to a fixed schemasheets configuration, where this configuration is largely isomorphic to the linkml metamodel

linkml2sheets attempts to address 1 but it's a hard challenge and is not complete

Your approach I believe addresses 2. This will ultimately be subsumed by approach 1, but in the interim it would be very useful to have this as part of the schemasheets codebase. I think the logic would not need to intermingle