Hygiene Tests

Hygiene Tests

Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.

Current Set

ERROR - a change is rejected.

PROD ERROR - a change is rejected if it occurs in PROD.

WARNING - a change can be accepted/merged, but the user is warned.

Name

Definition

Severity

Remarks

Decision

Name

Definition

Severity

Remarks

Decision

No untyped resources

Any reference to an IRI in any context other than as the object of an annotation property must have a type triple for that IRI. 

ERROR

 

IN

Labels and definitions

Every class and property must have an rdfs:label and a skos:definition. 

ERROR

 

IN

Ontology metadata

Every IDMP ontology needs appropriate metadata - see: Pattern: Metadata and Annotations.

PROD ERROR

 

IN

Ontology circular imports

Property owl:imports cannot be circular across all IDMP ontologies.

ERROR

 

IN

Label use

Every resource (IRI) must have a label.

ERROR

 

IN

Unique labels

No label can name more than one resource (IRI).

ERROR

 

IN

Single labels

No resource (IRI) can have more than one label.

ERROR

 

IN

Circular definitions

No textual definition should be circular, i.e., a definition cannot contain a label of the resource being defined. 

ERROR

 

IN

Avoiding cycles

Class and property hierarchies should not contain cycles.

ERROR

 

IN

Deprecated resources should not be used

If a resource (IRI) is owl:deprecated, then it should not be reused.

PROD ERROR

 

IN

Avoid (hard) punning

We must avoid punning of object and data properties.

ERROR

https://www.w3.org/TR/owl2-new-features/#F12:_Punning

IN

Avoid (soft) punning

A resource (IRI) should not be an instance of more than one of these: owl:Class, rdf:Property, owl:NamedIndividual.

WARNING

 

IN

Long IRIs

No IRI should be longer than 255 chars.

PROD ERROR

 

IN

Non opaque IRIs

We should avoid IRIs whose local names are not human readable.

PROD ERROR

 

IN

Avoid obsolete minimum cardinality restrictions

We should warn if an OWL minimum cardinality restriction on a superclass can be inferred from another minimum cardinality restriction on its subclass.

PROD ERROR

 

IN

Avoid obsolete existential restrictions

We should warn if an OWL existential restriction on a superclass can be inferred from another existential restriction on its subclass.

WARNING

 

IN

Leading blanks

No annotation property may have a string value with leading spaces.

ERROR

 

IN

Multiple embedded blanks

No annotation property may have a string value with multiple embedded spaces.

ERROR

 

IN

Trailing blanks

No annotation property may have a string value with trailing spaces.

ERROR

 

IN

Performance checks

See: https://github.com/stardog-union/pellet/blob/master/pellint/PELLINT-PATTERNS.txt

WARNING

 

???

Underspecified examples

We should provide all required properties for examples.

WARNING

 

???

Also we run consistency checks for both PROD and DEV. For PROD inconsistent ontology will reject the change. For DEV it will produce a warning.

Background

Current FIBO Hygiene

From https://github.com/edmcouncil/fibo/blob/master/ONTOLOGY_GUIDE.md

Because we believe that it is important to ensure at least some minimal level of quality in the ontologies we publish for FIBO, we have implemented a number of tests that are automatically run when updates are made via Github. These include:

  1. No Untyped references - Any reference to a URI in any context other than as the object of an annotation property must have a type triple for that URI. See testHygiene0001.sparql

  2. Crossing domains / ranges - If one property is a sub of another, then the domains (respectively ranges) should not be subClasses in the opposite direction. See testHygiene0002.sparql, testHygiene0003.sparql

  3. Labels and Definitions - Every Class and Property defined in FIBO must have an rdfs:label and a skos:definition. See testHygiene0004.sparql

  4. Ontology Metadata - Every Ontology defined in FIBO must have a rdfs:label, sm:copyright, dct:license, dct:abstract. See testHygiene0005.sparql

  5. Ontology imports - No ontology may import itself. See testHygiene1177.sparql

  6. Special Characters - The set of characters allowed in literals is limited to the alphanumeric characters, punctuation marks, and diacritic characters used in the languages FIBO uses. See testHygiene0114.sparql

  7. Unique Labels - No label can name more than one owl:Class or rdf:Property. See testHygiene1067.sparql

  8. Circular Definitions - No FIBO definition should be circular, i.e., a definition cannot contain a label (including synonyms) of the resource being defined. See testHygiene1068.sparql

  9. Object Property Inverses - No property may have more than one inverse as this may, among other things, make the inverse properties equivalent. See testHygiene1078.sparql

  10. Use of rdfs:comment - rdfs:comment shouldn't be used for FIBO annotations. See testHygiene1079.sparql

  11. Reference to owl:Thing - We should not make explicit references to owl:Thing as these are redundant except for someValuesFrom restrictions . See testHygiene0268.sparql

  12. Synonyms as classes - Use of OWL equivalences may indicate that different synonyms are modeled as separate classes, which should be avoided. See testHygiene1103.sparql

  13. Avoiding cycles - Class and property hierarchies should not contain cycles. See testHygiene1190.sparql and testHygiene1190_properties.sparql

  14. Implicit use of “is” relationships - Various kinds of “is” relationship should be represented by means of the appropriate logical constructs and not by means of ad-hoc properties. See testHygiene1289.sparql

  15. Disconnected resources - All classes should be rooted in FND, LCC or FBC domain. See testHygiene1290.sparql

  16. Merging different concepts in the same class - Classes should not refer to multiple concepts. See testHygiene1292.sparql

  17. Use of "min 1" cardinality restrictions - "min 1" cardinality restrictions should be avoided because of performance considerations. See testHygiene1293.sparql

  18. Deprecated resources should not be used - If a resource is owl:deprecated, then it should not be reused See testHygiene1610.sparql

  19. Avoid punning - Because of OWL specification we should avoid punning of both object and data properties See testHygiene1624_chain.sparql, testHygiene1624_disjoint.sparql, testHygiene1624_equivalent.sparql, testHygiene1624_inverse.sparql, testHygiene1624_subProperty.sparql, testHygiene1624.sparql

Runs