Skip to content

updates to ontology and added ontology tests#6

Merged
sherwoodf merged 2 commits intomainfrom
ontology_updates
Apr 29, 2025
Merged

updates to ontology and added ontology tests#6
sherwoodf merged 2 commits intomainfrom
ontology_updates

Conversation

@sherwoodf
Copy link
Contributor

@sherwoodf sherwoodf commented Apr 24, 2025

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.

@sherwoodf sherwoodf requested review from AybukeKY and liviuba April 24, 2025 16:13
Copy link

@liviuba liviuba left a comment

Choose a reason for hiding this comment

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

👍 Left a clarification comment


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

Choose a reason for hiding this comment

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

which of the types are meant to be disjoint here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link

Choose a reason for hiding this comment

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

So can something have types OWL.ObjectProperty, OWL.DatatypeProperty and OWL.Class ? (or any other more viable mix of 3 types)

Copy link
Contributor Author

@sherwoodf sherwoodf Apr 25, 2025

Choose a reason for hiding this comment

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

No, only 1 of those. The viable mixes are:

  1. owl:Class, rdfs:Class
  2. owl:ObjectProperty, rdf:Property
  3. 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

Copy link

@liviuba liviuba Apr 25, 2025

Choose a reason for hiding this comment

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

ty! The reason I wanted to double-check was because this check doesn't test that only one of the attributes is set

Copy link

@AybukeKY AybukeKY left a comment

Choose a reason for hiding this comment

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

LGTM assuming it was agreed to change the Annotation section naming to Annotation Method.

@sherwoodf
Copy link
Contributor Author

Not sure it was agreed - but the naming here doesn't enforce naming anywhere else. Not sure what you mean by changing the name?

@sherwoodf sherwoodf merged commit aa2f669 into main Apr 29, 2025
6 checks passed
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.

3 participants