The release workflow
The release workflow recommended by the ODK is based on GitHub releases and works as follows:
- Run a release with the ODK
- Review the release
- Merge to main branch
- Create a GitHub release
These steps are outlined in detail in the following.
Run a release with the ODK
Preparation:
- Ensure that all your pull requests are merged into your main (master) branch
- Make sure that all changes to main are committed to GitHub (
git status
should say that there are no modified files) - Locally make sure you have the latest changes from main (
git pull
) - Checkout a new branch (e.g.
git checkout -b release-2021-01-01
) - You may or may not want to refresh your imports as part of your release strategy (see here)
- Make sure you have the latest ODK installed by running
docker pull obolibrary/odkfull
To actually run the release, you:
- Open a command line terminal window and navigate to the src/ontology directory (
cd phenio/src/ontology
) - Run release pipeline:
sh run.sh make prepare_release -B
. Note that for some ontologies, this process can take up to 90 minutes - especially if there are large ontologies you depend on, like PRO or CHEBI. - If everything went well, you should see the following output on your machine:
Release files are now in ../.. - now you should commit, push and make a release on your git hosting site such as GitHub or GitLab
.
This will create all the specified release targets (OBO, OWL, JSON, and the variants, ont-full and ont-base) and copy them into your release directory (the top level of your repo).
Review the release
- (Optional) Rough check. This step is frequently skipped, but for the more paranoid among us (like the author of this doc), this is a 3 minute additional effort for some peace of mind. Open the main release (phenio.owl) in you favourite development environment (i.e. Protégé) and eyeball the hierarchy. We recommend two simple checks:
- Does the very top level of the hierarchy look ok? This means that all new terms have been imported/updated correctly.
- Does at least one change that you know should be in this release appear? For example, a new class. This means that the release was actually based on the recent edit file.
- Commit your changes to the branch and make a pull request
- In your GitHub pull request, review the following three files in detail (based on our experience):
phenio.obo
- this reflects a useful subset of the whole ontology (everything that can be covered by OBO format). OBO format has that speaking for it: it is very easy to review!phenio-base.owl
- this reflects the asserted axioms in your ontology that you have actually edited.- Ideally also take a look at
phenio-full.owl
, which may reveal interesting new inferences you did not know about. Note that the diff of this file is sometimes quite large.
- Like with every pull request, we recommend to always employ a second set of eyes when reviewing a PR!
Merge the main branch
Once your CI checks have passed, and your reviews are completed, you can now merge the branch into your main branch (don't forget to delete the branch afterwards - a big button will appear after the merge is finished).
Create a GitHub release
- Go to your releases page on GitHub by navigating to your repository, and then clicking on releases (usually on the right, for example: https://github.com/monarch-initiative/phenio/releases). Then click "Draft new release"
- As the tag version you need to choose the date on which your ontologies were build. You can find this, for example, by looking at the
phenio.obo
file and check thedata-version:
property. The date needs to be prefixed with av
, so, for examplev2020-02-06
. - You can write whatever you want in the release title, but we typically write the date again. The description underneath should contain a concise list of changes or term additions.
- Click "Publish release". Done.
Debugging typical ontology release problems
Problems with memory
When you are dealing with large ontologies, you need a lot of memory. When you see error messages relating to large ontologies such as CHEBI, PRO, NCBITAXON, or Uberon, you should think of memory first, see here.
Problems when using OBO format based tools
Sometimes you will get cryptic error messages when using legacy tools using OBO format, such as the ontology release tool (OORT), which is also available as part of the ODK docker container. In these cases, you need to track down what axiom or annotation actually caused the breakdown. In our experience (in about 60% of the cases) the problem lies with duplicate annotations (def
, comment
) which are illegal in OBO. Here is an example recipe of how to deal with such a problem:
- If you get a message like
make: *** [cl.Makefile:84: oort] Error 255
you might have a OORT error. - To debug this, in your terminal enter
sh run.sh make IMP=false PAT=false oort -B
(assuming you are already in the ontology folder in your directory) - This should show you where the error is in the log (eg multiple different definitions) WARNING: THE FIX BELOW IS NOT IDEAL, YOU SHOULD ALWAYS TRY TO FIX UPSTREAM IF POSSIBLE
- Open
phenio-edit.owl
in Protégé and find the offending term and delete all offending issue (e.g. delete ALL definition, if the problem was "multiple def tags not allowed") and save. *While this is not idea, as it will remove all definitions from that term, it will be added back again when the term is fixed in the ontology it was imported from and added back in. - Rerun
sh run.sh make IMP=false PAT=false oort -B
and if it all passes, commit your changes to a branch and make a pull request as usual.