-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
292 additions
and
799 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
## REALEASE PROCESS: | ||
The release process uses the ROBOT tool produce the ontology release file `data-source-ontology.owl`. | ||
|
||
Information about downloading and installing ROBOT is found at: | ||
- http://robot.obolibrary.org/ | ||
- https://github.com/ontodev/robot | ||
|
||
Since the robot.jar file is in the directory, calls to robot are made using the `java -jar ./robot.jar` command. | ||
Alternatively, if your system is configured properly, you can edit the script to call robot directly. | ||
For example, if the path to robot is in your `PATH` environment variable, you can replace `java -jar ./robot.jar` with `robot`. | ||
|
||
## MERGE ERRORS AND THE CATALOG-V001.XML FILE | ||
As you create new import files for the ontology, robot may throw an error saying it cannot locate the import ontology. | ||
This error is most likely fixed by editing the catalog-v001.xml file in the build directory to include the new import. | ||
For example, suppose the catalog-v001.xml only references the `ontology_annotations_import.owl` like so: | ||
``` | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> | ||
<uri name="http://purl.roswellpark.org/ontology_annotations_import.owl" uri="ontology_annotations_import.owl"/> | ||
</catalog> | ||
``` | ||
|
||
You then create a file named `foo.owl` in the imports directory. | ||
In order for the robot merge operation to execute, you need to modify the catalog file to reference `foo.owl`: | ||
``` | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> | ||
<uri name="http://purl.roswellpark.org/ontology_annotations_import.owl" uri="ontology_annotations_import.owl"/> | ||
<uri name="http://purl.roswellpark.org/foo.owl" uri="foo.owl"/> | ||
</catalog> | ||
``` | ||
|
||
## RUNNING THE RELEASE SCRIPT | ||
To release a version of `data-source-ontology.owl`, run the `robot_release.sh` command | ||
|
||
This will copy the `data-source-ontology-dev.owl` file and the imports into build directory, and produce the temp files: | ||
|
||
- `data-source-ontology-merged.owl` | ||
- `data-source-ontology-annotated.owl` | ||
- `data-source-ontology.owl` | ||
|
||
The `data-source-ontology.owl` is the **release file**. Open this file and check that the ontology IRI was produced correctly and that are not any errors. | ||
The `data-source-ontology-merged.owl` and `data-source-ontology-annotated.owl` are intermediary files produced in the release process. | ||
They are deleted after the build process completes, but they can be helpful in tracking down errors. | ||
To prevent them from being deleted, comment out the following lines in the build script: | ||
``` | ||
rm data-source-ontology-merged.owl | ||
rm data-source-ontology-annotated.owl | ||
``` | ||
|
||
Finally, when you are satisfied with the ontology generated by the release script: | ||
|
||
- copy the build `data-source-ontology.owl` file to the ontology directory | ||
- commit and push your changes: | ||
``` | ||
git commit -am "create release ontology $(date '+%Y-%m-%dT%H:%M:%S')" | ||
git push | ||
``` | ||
- tag the repo with the date and time and push the tag: | ||
``` | ||
git tag data_source_ontology_release_$(date '+%Y-%m-%dT%H_%M_%S') -m "ONTOLOGY REALEASE $(date '+%Y-%m-%d %H:%M:%S')" | ||
git push origin --tags | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> | ||
<uri name="http://purl.roswellpark.org/ontology_annotations_import.owl" uri="ontology_annotations_import.owl"/> | ||
</catalog> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# remove any existing owl files in the directory | ||
rm *.owl | ||
|
||
# copy dev ontology and imports into directory | ||
cp ../data-source-ontology-dev.owl . | ||
cp ../imports/*import.owl . | ||
|
||
# since the robot.jar file is in the directory, calls to robot are made using the java -jar ./robot.jar command | ||
# alternatively, you can call robot directly if your system is configured properly | ||
# for example, if the path to robot is in your PATH environment variable | ||
# you can perform merge by simple executing robot merge | ||
|
||
# merge owl files | ||
# you can also call robot merge ...; but I have placed the jar file in the directory | ||
java -jar ./robot.jar merge \ | ||
--inputs "*.owl" \ | ||
--include-annotations true \ | ||
--collapse-import-closure true \ | ||
--output data-source-ontology-merged.owl | ||
|
||
# # add date to IRI version; e.g.: http://purl.obolibrary.org/obo/2018-06-05/data-source-ontology.owl | ||
java -jar ./robot.jar annotate \ | ||
--input data-source-ontology-merged.owl \ | ||
--ontology-iri "http://purl.data-source-translation.org/data-source-translation.owl" \ | ||
--version-iri "http://purl.data-source-translation.org/`date '+%Y-%m-%d'`/data-source-translation.owl" \ | ||
--output data-source-ontology-annotated.owl | ||
|
||
# run reasoner on the ontology and add inferred axioms to final output | ||
java -jar ./robot.jar reason \ | ||
--input data-source-ontology-annotated.owl \ | ||
--reasoner HermiT \ | ||
--annotate-inferred-axioms true \ | ||
--output data-source-ontology.owl | ||
|
||
# clean up | ||
# remove imports | ||
rm *import.owl | ||
|
||
# remove dev, merge, annotated temp ontologies | ||
# comment out these lines if you wish to examine them | ||
rm data-source-ontology-dev.owl | ||
rm data-source-ontology-merged.owl | ||
rm data-source-ontology-annotated.owl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> | ||
<group id="imports" prefer="public" xml:base=""> | ||
<uri name="http://purl.roswellpark.org/ontology-annotations.owl" uri="imports/ontology-annotations.owl"/> | ||
<uri name="http://purl.data-source-translation.org/data-source-translation.owl" uri="data-source-translation.owl"/> | ||
<uri name="http://purl.roswellpark.org/ontology_annotations_import.owl" uri="imports/ontology_annotations_import.owl"/> | ||
</group> | ||
</catalog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> | ||
<group id="Folder Repository, directory=, recursive=true, Auto-Update=true, version=2" prefer="public" xml:base=""> | ||
<uri id="Automatically generated entry, Timestamp=1527625362484" name="http://purl.roswellpark.org/ontology-annotations.owl/" uri="ontology-annotations.owl"/> | ||
<uri id="Automatically generated entry, Timestamp=1530912005722" name="http://purl.roswellpark.org/ontology_annotations_import.owl/" uri="ontology_annotations_import.owl"/> | ||
</group> | ||
</catalog> |
Oops, something went wrong.