-
Notifications
You must be signed in to change notification settings - Fork 5
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
Issue 76 schema template #78
Conversation
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)
@@ -172,6 +174,39 @@ def test_enums(): | |||
_roundtrip(schema, ENUM_SPEC) | |||
|
|||
|
|||
def test_prefixes(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like your PR is mixing in changes from a previous PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I treid to build upon your prefixes template fix. does that screw something up?
@@ -215,6 +250,3 @@ def test_export_metamodel_slots(): | |||
# of this will change | |||
examples = s['examples'] | |||
assert 'bibo:draft' == examples | |||
|
|||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to start with tox for this repo!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I watched a video about tox last night, but I don't think I'm ready to make that change yet.
#76
@cmungall I wrote
test_schema_metadata
and addedto
schemasheets/schema_exporter.py
, following your #77but I think the exporting steps may have to be different, because we won't be iterating over a multiple schema rows, like we would for slots, classes or prefixes.