Common Format Automated Check
- Overview
- Open (principle 1)
- Common Format (principle 2)
- URI/Identifier Space (principle 3)
- Versioning (principle 4)
- Scope (principle 5)
- Textual Definitions (principle 6)
- Relations (principle 7)
- Documentation (principle 8)
- Documented Plurality of Users (principle 9)
- Commitment To Collaboration (principle 10)
- Locus of Authority (principle 11)
- Naming Conventions (principle 12)
- Notification of Changes (principle 13)
- Maintenance (principle 16)
- Responsiveness (principle 20)
This page is generated via
_layouts/check.html. See edit guide
Common Format Automated Check
Discussion on this check can be found here.
Requirements
- Released ontology must be in RDF/XML format
Fixes
See the Common Format Recommendations. ROBOT offers functionality to convert a variety of formats, including OBO, to RDF/XML. Protégé allows you to save ontologies in RDF/XML, as well. The Ontology 101 Tutorial has directions on starting and saving in Protégé.
Implementation
Current implementation attempts to load the ontology using OWL API. If the ontology is loaded, it is assumed that it is in a good format, although it may not be RDF/XML. For large ontologies, the ontology is a valid format (either RDF/XML or Turtle) if it can be loaded with Jena to run the ROBOT report over.
import dash_utils
from dash_utils import format_msg
def is_common_format(ontology):
"""Check FP 2 - Common Format.
Args:
ontology (OWLOntology): ontology object
Return:
PASS if OWLOntology is not None, ERROR otherwise.
"""
if ontology is None:
return {'status': 'ERROR', 'comment': 'Unable to load ontology'}
else:
return {'status': 'PASS'}
def big_is_common_format(good_format):
"""Check FP 2 - Common Format on large ontologies
Args:
good_format (bool): True if ontology could be parsed by Jena
Return:
PASS if good_format, ERROR otherwise.
"""
if good_format is None:
return {'status': 'ERROR',
'comment': 'Unable to load ontology (may be too large)'}
elif good_format is False:
return {'status': 'ERROR',
'comment': 'Unable to parse ontology'}
else:
return {'status': 'PASS'}