information-artifact-ontology / IAO

information artifact ontology
Creative Commons Attribution 4.0 International
77 stars 25 forks source link

Create a Makefile #211

Closed beckyjackson closed 5 years ago

beckyjackson commented 5 years ago

Add a Makefile for IAO release process.

Use make all or make release to create the release directory and all required components. This Makefile utilizes ROBOT, but you do not need to install it (the process grabs the latest version automatically).

jamesaoverton commented 5 years ago

This Makefile can be used to update src/ontology/iao-merged.owl and src/ontology/iao.owl, then create a new dated release directory under releases/.

Note that using a releases/ directory was standard practise for Subversion, but with Git the standard practise is instead to simply tag the commit of the release (tagging just attaches a name to the commit).

We should discuss how imports are handled. IAO depends on RO Core, but doesn't specify a specific version. In the recent release directories there's an ro directory with copies of RO Core and its dependencies, which is one way of ensuring that a specific version is being used. This Makefile takes that approach further and creates a src/ontology/ro directory with copies of the RO Core files. The src/ontology/catalog-v001.xml has been updated to use the cached copies. The cached copies of the RO Core files should be checked in to git.

IAO also depends on BFO but does not specify a version, and no copy of BFO has been included in recent IAO release. I suggest just specifying a dated version of BFO in iao-main.owl.

zhengj2007 commented 5 years ago

@jamesaoverton and @rctauber I looked into the Makefile and ran the make command. I don't think the IAO used the correct ontology-metadata.owl. It shouldn't use out-of-date ontology-metadata.owl under src/ontology but the one under, information-artifact-ontology/ontology-metadata repository. So, newly added ontology terms in the ontology-metadata.owl are not included in the released iao.owl.

As James said, we are using GitHub tag to track version of each release now. I don't think it is good practice to create a new directory under release and copy over all the related files for each release.

In addition, in the catelog001.xml under release directory, it contains version IRI for each OWL files used to make release version of IAO: `

    <uri name="http://purl.obolibrary.org/obo/iao/2018-12-10/examples.owl" uri="iao-examples.owl"/>
    <uri name="http://purl.obolibrary.org/obo/iao/2018-12-10/iao.owl" uri="iao.owl"/>
    <uri name="http://purl.obolibrary.org/obo/iao/2018-12-10/iao-main.owl" uri="iao-main.owl"/>
    <uri name="http://purl.obolibrary.org/obo/iao/2018-12-10/import-OBO.owl" uri="import-OBO.owl"/>
    <uri name="http://purl.obolibrary.org/obo/iao/2018-12-10/ontology-metadata.owl" uri="ontology-metadata.owl"/>`

For making it works, we need to add PURL redirect for each of these files. There are some discussion regarding it but no decision yet. I am the person not prefer to do so. So, I am not sure whether it is the way we should follow and put in the Makefile.

Can we have a brief meeting to sort it out (including other issues James raised)?

jamesaoverton commented 5 years ago

It's true that this does not yet use the new ontology-metedata.owl. This PR is just about moving the release process to ROBOT.

I'm not sure that I understand what you're saying about the release catalogue file. I'm not worried about PURLs for every file in every release, just for the important files.

beckyjackson commented 5 years ago

import-OBO.owl isn't being regenerated from fresh data. The script for that is in src/ontology/ontofox. cd to that directory and then sh get-ontofox-imports. import-obo.owl will be placed in .., where the other ontology pieces are.

Added to the Makefile.

In the makefile, its not clear how the RO_CORE target is used. I see it in a robot command, but I don't see any imports from bfo-axioms.lisp and bfo-classes-minimal.lisp in the resultant files. If these aren't used then they shouldn't be downloaded. If they are, that's new. Could you point me at the documentation on how they are used, please?

The RO_CORE target is just the RO core.owl with the bfo-axioms.owl and bfo-classes-minimal.owl imports. All three of these are downloaded from their PURL and then given an updated version IRI. ro/core.owl is then imported into iao-main.owl which is used to create iao-merged.owl.

The imports of ro.owl and bfo.owl, and all the imports in iao.owl are to the ontology IRIs rather than to the versionIRIs. Where the source ontologies don't provide up-to-date versionIRIs I make a copy locally and give those versionIRIs of the release date. The PURL yaml reflects that.

iao.owl is created from iao-merged.owl by reasoning over it, so neither have any import statements. I changed iao-main.owl to use the version IRIs of BFO and RO.

The license annotations are missing. http://creativecommons.org/licenses/by/4.0/</dc:license>. Note, however that in my previous releases the dc namespace was incorrectly defined. It should be http://purl.org/dc/terms/ rather than http://purl.org/dc/elements/1.1. dc terms has license where the elements don't, although contributor is in both.

Added to iao.owl and iao-merged.owl. Does it need to be in any other files?

It wasn't clear what reasoner ROBOT is using. In this case the ontology is small and a full DL reasoner should be used. I've been using fact++.

The default reasoner for ROBOT is ELK. I switched it to JFact.

Nice-to-haves: A generated an XML catalog for Protege, and the new bits to be added to the PURL yaml. Examples available in the last release I did: 2017-03-25

There is a catalog-v001.xml file that is generated in the release directory with dated IRIs.

jamesaoverton commented 5 years ago

I believe that all requested changes have been made and this PR is ready to go. I intend to merge it tomorrow morning and then work on a new IAO release that includes the latest https://github.com/information-artifact-ontology/ontology-metadata

zhengj2007 commented 5 years ago

@jamesaoverton Could you please give me sometime to double check it before merge? I can do it by the end of tomorrow morning. Thanks!

jamesaoverton commented 5 years ago

@zhengj2007 Sure, just let me know when you've had a chance to look at it.

zhengj2007 commented 5 years ago

@jamesaoverton Sure. I will. I do not find time to look at it in the morning but will work on it this afternoon. Thanks!

zhengj2007 commented 5 years ago

@jamesaoverton @rctauber I tried to run the Makefile, it gave "Error: Unable to access jarfile build/robot.jar" message. I found the link below doesn't work, "404 Not found error": https://build.berkeleybop.org/job/robot/lastSuccessfulBuild/artifact/bin/robot.jar Could you please check it? Thanks!

cmungall commented 5 years ago

Do something like this: https://github.com/EnvironmentOntology/envo/pull/647/files

On Wed, Jan 16, 2019 at 12:57 PM jie zheng notifications@github.com wrote:

@jamesaoverton https://github.com/jamesaoverton @rctauber https://github.com/rctauber I tried to run the Makefile, it gave "Error: Unable to access jarfile build/robot.jar" message. I found the link below doesn't work, "404 Not found error":

https://build.berkeleybop.org/job/robot/lastSuccessfulBuild/artifact/bin/robot.jar Could you please check it? Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/information-artifact-ontology/IAO/pull/211#issuecomment-454938342, or mute the thread https://github.com/notifications/unsubscribe-auth/AADGOWm_ekMLT7KIrRA2ngqNJoiRDEmvks5vD5JKgaJpZM4ZGe97 .

jamesaoverton commented 5 years ago

@zhengj2007 It should be fixed now. Sorry about that.

zhengj2007 commented 5 years ago

Thanks @jamesaoverton

zhengj2007 commented 5 years ago

@jamesaoverton I think the updated robot.jar link is correct. But when I ran 'make all' command I still got following errors:

Generating src/ontology/import-OBO.owl
Downloading src/ontology/ro/bfo-axioms.owl
Error: Unable to access jarfile build/robot.jar
make: *** [src/ontology/ro/bfo-axioms.owl] Error 1

I looked into the Makefile. I think the robot.jar should be downloaded before go to "RO TASKS" section. Based on the output message, it seems it did not download the robot.jar. Besides, I don't understand why "Generating src/ontology/import-OBO.owl" (IAO TASKS) run before "RO TASKS". I am not good at making Makefile. @rctauber Could you please check it again? ps: I can run Makefile of OBI ontology without any problem.

jamesaoverton commented 5 years ago

@zhengj2007 You're right, there were some missing dependencies after Becky made the changes that Alan requested. Those are now fixed. I was able to run make and get a new release.

zhengj2007 commented 5 years ago

@jamesaoverton Thanks for fixing the issues. The makefile is working now.

I have a couple of questions:

  1. Shall we copy all at the IAO relates owls to the folder under release directory? I think when we use tag it seems redundant. I'd like released IAO, use name iao.owl and put under: information-artifact-ontology/IAO Same as what we did for most other OBO Foundry ontologies.

  2. It seems the ontology-metadata.owl in the IAO repository is used which is out-of-date. As what we discussed before. I think the one in the ontology-metadata repository should be used. This is the link of latest release version of ontology-metadata.owl: https://github.com/information-artifact-ontology/ontology-metadata/blob/master/ontology-metadata.owl I think this is the OWL file that we'd import in the iao.owl.

Any comments/thoughts?

jamesaoverton commented 5 years ago

@zhengj2007:

  1. I think a tag would be much better than a release directory, but it changes a bunch of things about how the repository works. That's why I moved OBI to a new repository when we migrated to GitHub, and kept a public archive of the old repository. I think that discussion goes beyond this Pull Request.
  2. Yes, I wanted to make this new Makefile before updating ontology-metadata.

In other words, in this PR Becky and I were trying to do the smallest thing that would let us make a new IAO release.

zhengj2007 commented 5 years ago

@jamesaoverton Got it. Please go ahead to merge the PR. Thanks!

jamesaoverton commented 5 years ago

I'm overwhelmed with another deadline at the moment. I'll merge this now, but unfortuantely I won't have time for any other IAO stuff for a while.