Locus of Authority 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
Locus of Authority Automated Check
Discussion on this check can be found here.
Requirements
- The ontology must have a single contact person
Fixes
First, read the FAQ on how to edit the metadata for your ontology.
Next, determine who the point person for your ontology project is. This must not be a mailing list. If this person does not already have a GitHub account, we request that they create one. Then, add the following to your metadata file (replacing with the correct email, name, and GitHub username):
contact:
email: foo@bar.com
label: John Smith
github: jsmith123
Implementation
The registry data entry is validated with JSON schema using the contact schema. The contact schema ensures that a contact entry is present and that the entry has a name and email address.
import jsonschema
import dash_utils
from dash_utils import format_msg
contact_schema = dash_utils.load_schema('dependencies/contact.json')
def has_contact(data):
"""Check fp 11 - locus of authority.
Check if the registry data contains a valid contract entry.
Args:
data (dict): ontology registry data from YAML file
Return:
PASS or ERROR with optional help message
"""
try:
jsonschema.validate(data, contact_schema)
except jsonschema.exceptions.ValidationError as ve:
if 'contact' in data:
# contact is in data but is not proper format
return {'status': 'ERROR',
'comment': 'Invalid contact information'}
else:
# contact entry is missing from data
return {'status': 'ERROR',
'comment': 'Missing contact information'}
return {'status': 'PASS'}