This is a template Github repository that enables ontologies to be tested against a set of predefined validations.
You can use the contents in the repository to enable tests of your ontologies as part of continuous integration pipeline. This repository can be used in new projects (new Github repos) as well as included in existing projects. The instructions for both cases follow.
When creating your new Github repo that host your project, make sure to select this project tetherless-world/ontology-hygiene-tests
under the Repository template
section. There is no need to check the option Include all branches
. See the image below.
TBD.
Check the root directory of your repository. You should have (alogside your own content) the following content:
| .circleci
| | config.yml
| .hygiene
| | tests
| | - (a list of .sparql files)
| | docker-compose.yml
| | run_hygiene.sh
| | set_env.sh
Update the following variables in .hygiene/set_env.sh
to suit your project.
ONTPUB_SUBDIR
- This should be a relative path to the directory where your ontology sources are stored. The example ontology is stored in theontology
directory so the example config reads:ONTPUB_SUBDIR=ontology
.ONTPUB_EXCLUDED
- If you want to exclude some ontologies from testing, set this to a substring that matches those ontologies. E.g. if you don't want to test ontologies inontology/exclude
, you can setONTPUB_EXCLUDED=/exclude
.
You need to enable CircleCI in your repository. If it's already enabled, you can skip this step.
- Go to https://app.circleci.com/dashboard and log in with yout Github account
- Select the appropriate organization where your Github repository is
- In the Project list, click
Set Up Project
to start the cofiguration of CircleCI for your repository - In the next screen, click
Use Existing Config
as you will be using an already created.circleci/config.yml
configuration
TBD.