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

Test and fix for #70, linkmk2sheets for prefixes #77

Closed cmungall closed 1 year ago

cmungall commented 1 year ago

This test uses SchemaBuilder to generate a fake schema with only prefixes in it

We then use the generic roundtripping mechanism in the test framework to see if we can go Schema->TSV->Schema, retaining the prefixes

This uses a simple TSV specification with two columns:

As expected, this test failed, so we included a fix here.

The bug was simply that Prefix was not considered among the list of possible Elements (it's not really an element in the same way Class, Slot, etc are).

To fix this we add a condition checking to see if there is a column 'prefix', and if so, if a prefix object is passed, then use the prefix column as the primary ID (i.e prefix_prefix)

Fixes #70