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(syntax):
"""Check FP 2 - Common Format.
Args:
syntax (str): the syntax as determined by ROBOT metrics
Return:
PASS if OWLOntology is not None, ERROR otherwise.
"""
if syntax is None:
return {'status': 'ERROR', 'comment': 'Unknown format'}
elif syntax == "RDF/XML Syntax":
return {'status': 'PASS'}
else:
return {'status': 'WARN', 'comment': f'OWL syntax ({syntax}), but should be RDF/XML'}