updates to ontology and added ontology tests#6
Conversation
|
|
||
| def test_bia_terms_have_sensible_type(bia_ontology: Graph): | ||
|
|
||
| # Check terms in our ontology are an instance of Class, Property, or Ontology, but not any two disjoint classes in this list |
There was a problem hiding this comment.
which of the types are meant to be disjoint here?
There was a problem hiding this comment.
Something can be an instance of any of the Class classes (owl:Class, rdfs:Class) - so they're not disjoint with one another.
Class, Property, and Ontology are all disjoint with one another
owl:ObjectProperties and owl:DatatypeProperty should be disjoint with one another (and therefore also disjoint with all the rest). If we also used rdf:Property then that wouldn't necessarily be disjoint with these two as it's a superclass.
There was a problem hiding this comment.
So can something have types OWL.ObjectProperty, OWL.DatatypeProperty and OWL.Class ? (or any other more viable mix of 3 types)
There was a problem hiding this comment.
No, only 1 of those. The viable mixes are:
- owl:Class, rdfs:Class
- owl:ObjectProperty, rdf:Property
- owl:DatatypeProperty, rdf:Property
There's no upper limit on number of types something could have, so could have 3 (e.g. most of these are probably also of type skos:Concept - but i'm not usre skos is particularly useful for us). Some properties are also of type owl:InverseFunctionalProperty
There was a problem hiding this comment.
ty! The reason I wanted to double-check was because this check doesn't test that only one of the attributes is set
AybukeKY
left a comment
There was a problem hiding this comment.
LGTM assuming it was agreed to change the Annotation section naming to Annotation Method.
|
Not sure it was agreed - but the naming here doesn't enforce naming anywhere else. Not sure what you mean by changing the name? |
ticket: https://app.clickup.com/t/8698uqxkx
Adds tests to make sure ontology terms are sensibly defined (e.g. they point at objects that actually exist etc) and added lots of corrections to the ontology file because there was lots of mistakes.
Changed schema.org to use the http (rather than https) link just because it's easier to load, but changing it back at a later date shouldn't cause issues as they are the same.
Main ontology change is to use Association Properties rather than Association Classes - this will make the json-ld a lot less verbose.