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

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

Merged
merged 1 commit into from
Sep 16, 2022
Merged

Conversation

cmungall
Copy link
Member

@cmungall cmungall commented Sep 15, 2022

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:

  • prefix
  • prefix_reference

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

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:

 - prefix
 - prefix_reference

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)
Copy link
Contributor

@turbomam turbomam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functional and educational

@turbomam turbomam mentioned this pull request Sep 15, 2022
@cmungall cmungall changed the title Adding a test to recapitulate #70 Test and fix for #70, linkmk2sheets for prefixes Sep 16, 2022
@cmungall cmungall merged commit d707e75 into main Sep 16, 2022
@cmungall cmungall deleted the issue-70 branch September 16, 2022 00:46
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.

linkml2sheets won't populate a prefix template, even if that template works with sheets2linkml when populated
2 participants