We can define custom checks using SPARQL. SPARQL queries define bad modelling patterns (missing labels, misspelt URIs, and many more) in the ontology. If these queries return any results, then the build will fail. Custom checks are designed to be run as part of GitHub Actions Continuous Integration testing, but they can also run locally.
src/sparql. The name of the file should end with -violation.sparql. Please give a name that helps to understand which violation the query wants to check.src/ontology/uberon-odk.yaml:
-violation.sparql part) to the list inside the key custom_sparql_checks that is inside robot_report key.If the robot_report or custom_sparql_checks keys are not available, please add this code block to the end of the file.
robot_report:
release_reports: False
fail_on: ERROR
use_labels: False
custom_profile: True
report_on:
- edit
custom_sparql_checks:
- name-of-the-file-check
sh run.sh make update_repo