phyloref / clade-ontology

Ontology of Phylogenetic Clade Definitions
MIT License
1 stars 0 forks source link

Detect unmatched specifiers and report to the rest of the testing infrastructure #11

Closed gaurav closed 6 years ago

gaurav commented 6 years ago

testcase2owl.py can now detect when specifiers have failed to match. It records this in the OWL representation using the testcase:has_unmatched_specifier object property. If the curated study documents this using the testcase:specifier_will_not_match object property (see example), it will reports this as a warning on the standard error stream. If not, it will report this as an error and a test failure.

These changes involved JSON terms that incorrectly used spider_case, so I've standardized them to camelCase. I've also modified test_json2owl.py so that warnings of unmatched specifiers will be reported to the test runner and to Travis (see example). Since these warnings contained string representations of specifiers and taxonomic units, I also improved the representations returned by the __str__() special properties so that the warnings are readable and hopefully useful.

I have tried to separate these changes into reasonably well-organized commits, so they could be rebased in, but there were some last-minute changes that have messed this up. I don't think there is a compelling reason not to squash-merge this, but if there is, let me know and I'll rebase it more thoroughly!

Closes #9.

gaurav commented 6 years ago

Sorry about the vocabulary corrections! I realized that I was naming new terms incorrectly (in snake_case instead of camelCase), and it was easier to standardize all terms to camelCase instead of identifying and correcting the new terms here and then setting up a separate pull request for the previously miscased terms. I'll try to be more consistent about terms in the future!