Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
pfabry committed Apr 20, 2023
1 parent 96f1a03 commit 5ccd03d
Show file tree
Hide file tree
Showing 17 changed files with 7,357 additions and 28,040 deletions.
25 changes: 20 additions & 5 deletions ODKRepo-base.owl
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
<rdf:RDF xmlns="http://purl.obolibrary.org/obo/ODKRepo/ODKRepo-base.owl#"
xml:base="http://purl.obolibrary.org/obo/ODKRepo/ODKRepo-base.owl"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:obo="http://purl.obolibrary.org/obo/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:terms="http://purl.org/dc/terms/">
<owl:Ontology rdf:about="http://purl.obolibrary.org/obo/ODKRepo/ODKRepo-base.owl">
<owl:versionIRI rdf:resource="http://purl.obolibrary.org/obo/ODKRepo/releases/2023-04-18/ODKRepo-base.owl"/>
<owl:versionIRI rdf:resource="http://purl.obolibrary.org/obo/ODKRepo/releases/2023-04-20/ODKRepo-base.owl"/>
<dc:type rdf:resource="http://purl.obolibrary.org/obo/IAO_8000001"/>
<terms:description>None</terms:description>
<terms:license rdf:resource="https://creativecommons.org/licenses/unspecified"/>
<terms:title>ODK test repository</terms:title>
<owl:versionInfo>2023-04-18</owl:versionInfo>
<owl:versionInfo>2023-04-20</owl:versionInfo>
</owl:Ontology>


Expand All @@ -30,6 +31,12 @@



<!-- http://purl.obolibrary.org/obo/IAO_0000115 -->

<owl:AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/IAO_0000115"/>



<!-- http://purl.org/dc/elements/1.1/type -->

<owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/type"/>
Expand Down Expand Up @@ -71,10 +78,18 @@



<!-- http://purl.obolibrary.org/obo/ODKREPO_0000000 -->
<!-- http://purl.obolibrary.org/obo/OBI_0000011 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/OBI_0000011"/>



<!-- http:/purl.obolibrary.org/obo/ODKREPO_0000001 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/ODKREPO_0000000">
<rdfs:label xml:lang="en">root node</rdfs:label>
<owl:Class rdf:about="http:/purl.obolibrary.org/obo/ODKREPO_0000001">
<rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/OBI_0000011"/>
<obo:IAO_0000115 xml:lang="en">A planned process that is an intervention.</obo:IAO_0000115>
<rdfs:label xml:lang="en">health intervention</rdfs:label>
</owl:Class>
</rdf:RDF>

Expand Down
13,094 changes: 2,736 additions & 10,358 deletions ODKRepo-full.owl

Large diffs are not rendered by default.

13,094 changes: 2,736 additions & 10,358 deletions ODKRepo.owl

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions docs/odk-workflows/RepositoryFileStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ These are the current imports in ODKREPO

| Import | URL | Type |
| ------ | --- | ---- |
| bfo | http://purl.obolibrary.org/obo/bfo.owl | None |
| omo | http://purl.obolibrary.org/obo/omo.owl | None |
| bfo-2020 | https://raw.githubusercontent.com/BFO-ontology/BFO-2020/master/21838-2/owl/bfo-2020.owl | mirror |
| omo | http://purl.obolibrary.org/obo/omo.owl | mirror |
| obi | http://purl.obolibrary.org/obo/obi.owl | None |
| omrse | http://purl.obolibrary.org/obo/omrse.owl | None |

## Components
Components, in contrast to imports, are considered full members of the ontology. This means that any axiom in a component is also included in the ontology base - which means it is considered _native_ to the ontology. While this sounds complicated, consider this: conceptually, no component should be part of more than one ontology. If that seems to be the case, we are most likely talking about an import. Components are often not needed for ontologies, but there are some use cases:
Expand Down
52 changes: 19 additions & 33 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ OTHER_SRC =
ONTOLOGYTERMS = $(TMPDIR)/ontologyterms.txt
EDIT_PREPROCESSED = $(TMPDIR)/$(ONT)-preprocess.owl

FORMATS = $(sort owl json owl)
FORMATS = $(sort owl owl)
FORMATS_INCL_TSV = $(sort $(FORMATS) tsv)
RELEASE_ARTEFACTS = $(sort $(ONT)-base $(ONT)-full )

Expand Down Expand Up @@ -108,7 +108,7 @@ all_main: $(MAIN_FILES)
# ----------------------------------------


IMPORTS = bfo omo obi omrse
IMPORTS = bfo-2020 omo obi

IMPORT_ROOTS = $(patsubst %, $(IMPORTDIR)/%_import, $(IMPORTS))
IMPORT_OWL_FILES = $(foreach n,$(IMPORT_ROOTS), $(n).owl)
Expand Down Expand Up @@ -309,6 +309,18 @@ $(IMPORTDIR)/%_import.owl: $(MIRRORDIR)/%.owl $(IMPORTDIR)/%_terms_combined.txt

.PRECIOUS: $(IMPORTDIR)/%_import.owl

## Module for ontology: bfo-2020

$(IMPORTDIR)/bfo-2020_import.owl: $(MIRRORDIR)/bfo-2020.owl $(IMPORTDIR)/bfo-2020_terms_combined.txt
if [ $(IMP) = true ]; then $(ROBOT) merge -i $< query --update ../sparql/preprocess-module.ru --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
$(ANNOTATE_CONVERT_FILE); fi

## Module for ontology: omo

$(IMPORTDIR)/omo_import.owl: $(MIRRORDIR)/omo.owl $(IMPORTDIR)/omo_terms_combined.txt
if [ $(IMP) = true ]; then $(ROBOT) merge -i $< query --update ../sparql/preprocess-module.ru --update ../sparql/inject-subset-declaration.ru --update ../sparql/inject-synonymtype-declaration.ru --update ../sparql/postprocess-module.ru \
$(ANNOTATE_CONVERT_FILE); fi


.PHONY: refresh-imports
refresh-imports:
Expand Down Expand Up @@ -340,12 +352,11 @@ IMP_LARGE=true # Global parameter to bypass handling of large imports



## ONTOLOGY: bfo
.PHONY: mirror-bfo
.PRECIOUS: $(MIRRORDIR)/bfo.owl
mirror-bfo: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/bfo.owl --create-dirs -o $(MIRRORDIR)/bfo.owl --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/bfo.owl -o $@.tmp.owl &&\
## ONTOLOGY: bfo-2020
.PHONY: mirror-bfo-2020
.PRECIOUS: $(MIRRORDIR)/bfo-2020.owl
mirror-bfo-2020: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ]; then $(ROBOT) convert -I https://raw.githubusercontent.com/BFO-ontology/BFO-2020/master/21838-2/owl/bfo-2020.owl -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


Expand All @@ -367,15 +378,6 @@ mirror-obi: | $(TMPDIR)
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


## ONTOLOGY: omrse
.PHONY: mirror-omrse
.PRECIOUS: $(MIRRORDIR)/omrse.owl
mirror-omrse: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/omrse.owl --create-dirs -o $(MIRRORDIR)/omrse.owl --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/omrse.owl -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi


$(MIRRORDIR)/%.owl: mirror-% | $(MIRRORDIR)
if [ $(IMP) = true ] && [ $(MIR) = true ] && [ -f $(TMPDIR)/mirror-$*.owl ]; then if cmp -s $(TMPDIR)/mirror-$*.owl $@ ; then echo "Mirror identical, ignoring."; else echo "Mirrors different, updating." &&\
cp $(TMPDIR)/mirror-$*.owl $@; fi; fi
Expand All @@ -396,10 +398,6 @@ $(SUBSETDIR)/%.owl: $(ONT).owl | $(SUBSETDIR)
.PRECIOUS: $(SUBSETDIR)/%.owl


$(SUBSETDIR)/%.json: $(SUBSETDIR)/%.owl
$(ROBOT) convert --input $< --check false -f json -o $@.tmp.json &&\
mv $@.tmp.json $@


# ---------------------------------------------
# Sparql queries: Table exports / Query Reports
Expand All @@ -419,14 +417,6 @@ endif
# ----------------------------------------


$(ONT)-base.json: $(ONT)-base.owl
$(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
convert --check false -f json -o $@.tmp.json &&\
mv $@.tmp.json $@
$(ONT)-full.json: $(ONT)-full.owl
$(ROBOT) annotate --input $< --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
convert --check false -f json -o $@.tmp.json &&\
mv $@.tmp.json $@
# ----------------------------------------
# Release artefacts: main release artefacts
# ----------------------------------------
Expand All @@ -435,10 +425,6 @@ $(ONT).owl: $(ONT)-full.owl
$(ROBOT) annotate --input $< --ontology-iri $(URIBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
convert -o $@.tmp.owl && mv $@.tmp.owl $@

$(ONT).json: $(ONT).owl
$(ROBOT) annotate --input $< --ontology-iri $(URIBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
convert --check false -f json -o $@.tmp.json &&\
mv $@.tmp.json $@
# -----------------------------------------------------
# Release artefacts: variants (base, full, simple, etc)
# -----------------------------------------------------
Expand Down
37 changes: 19 additions & 18 deletions src/ontology/ODKRepo-edit.owl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Prefix(:=<http://purl.obolibrary.org/obo/ODKRepo.owl#>)
Prefix(dce:=<http://purl.org/dc/elements/1.1/>)
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
Expand All @@ -10,42 +9,44 @@ Prefix(dcterms:=<http://purl.org/dc/terms/>)


Ontology(<http://purl.obolibrary.org/obo/ODKRepo.owl>

Import(<http://purl.obolibrary.org/obo/ODKRepo/imports/bfo_import.owl>)

Import(<http://purl.obolibrary.org/obo/ODKRepo/imports/omo_import.owl>)

Import(<http://purl.obolibrary.org/obo/ODKRepo/imports/obi_import.owl>)

Import(<http://purl.obolibrary.org/obo/ODKRepo/imports/omrse_import.owl>)


Import(<http://purl.obolibrary.org/obo/ODKRepo/releases/2023-04-20/imports/bfo-2020_import.owl>)
Import(<http://purl.obolibrary.org/obo/ODKRepo/releases/2023-04-20/imports/obi_import.owl>)
Import(<http://purl.obolibrary.org/obo/ODKRepo/releases/2023-04-20/imports/omo_import.owl>)
Annotation(dcterms:description "None")
Annotation(dcterms:license <https://creativecommons.org/licenses/unspecified>)
Annotation(dcterms:title "ODK test repository")


Declaration(Class(<http://purl.obolibrary.org/obo/ODKREPO_0000000>))
Declaration(Class(<http:/purl.obolibrary.org/obo/ODKREPO_0000001>))
Declaration(AnnotationProperty(dcterms:description))
Declaration(AnnotationProperty(dcterms:license))
Declaration(AnnotationProperty(dcterms:title))

############################
# Annotation Properties
############################

# Annotation Property: dcterms:description (description)

AnnotationAssertion(rdfs:label dcterms:description "description")

# Annotation Property: dcterms:license (license)

AnnotationAssertion(rdfs:label dcterms:license "license")

# Annotation Property: dcterms:title (title)

AnnotationAssertion(rdfs:label dcterms:title "title")



############################
# Classes
############################

# Class: <http://purl.obolibrary.org/obo/ODKREPO_0000000> (root node)

AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/ODKREPO_0000000> "root node"@en)
# Class: <http:/purl.obolibrary.org/obo/ODKREPO_0000001> (health intervention)

AnnotationAssertion(<http://purl.obolibrary.org/obo/IAO_0000115> <http:/purl.obolibrary.org/obo/ODKREPO_0000001> "A planned process that is an intervention."@en)
AnnotationAssertion(rdfs:label <http:/purl.obolibrary.org/obo/ODKREPO_0000001> "health intervention"@en)
SubClassOf(<http:/purl.obolibrary.org/obo/ODKREPO_0000001> <http://purl.obolibrary.org/obo/OBI_0000011>)

)

)
7 changes: 4 additions & 3 deletions src/ontology/ODKRepo-odk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ release_artefacts:
primary_release: full
export_formats:
- owl
- json
import_group:
products:
- id: bfo
- id: bfo-2020
module_type: mirror
mirror_from: "https://raw.githubusercontent.com/BFO-ontology/BFO-2020/master/21838-2/owl/bfo-2020.owl"
- id: omo
module_type: mirror
- id: obi
- id: omrse
robot_java_args: "-Xmx8G"
16 changes: 16 additions & 0 deletions src/ontology/ODKRepo.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,20 @@
## If you need to customize your Makefile, make
## changes here rather than in the main Makefile

## ONTOLOGY: obi without individuals
.PHONY: mirror-obi
.PRECIOUS: $(MIRRORDIR)/obi.owl
mirror-obi: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/obi.owl --create-dirs -o $(MIRRORDIR)/obi.owl --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/obi.owl -o $@.tmp.owl &&\
$(ROBOT) remove -i $@.tmp.owl --select individuals -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi

## ONTOLOGY: omo
.PHONY: mirror-omo
.PRECIOUS: $(MIRRORDIR)/omo.owl
mirror-omo: | $(TMPDIR)
if [ $(MIR) = true ] && [ $(IMP) = true ]; then curl -L $(OBOBASE)/omo.owl --create-dirs -o $(MIRRORDIR)/omo.owl --retry 4 --max-time 200 &&\
$(ROBOT) convert -i $(MIRRORDIR)/omo.owl -o $@.tmp.owl &&\
$(ROBOT) remove -i $@.tmp.owl --select individuals -o $@.tmp.owl &&\
mv $@.tmp.owl $(TMPDIR)/$@.owl; fi
30 changes: 7 additions & 23 deletions src/ontology/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -1,23 +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="Folder Repository, directory=, recursive=false, Auto-Update=false, version=2" prefer="public" xml:base="">


<uri name="http://purl.obolibrary.org/obo/ODKRepo/imports/bfo_import.owl" uri="imports/bfo_import.owl"/>
<uri name="http://purl.obolibrary.org/obo/ODKRepo/imports/bfo_import.obo" uri="imports/bfo_import.obo"/>

<uri name="http://purl.obolibrary.org/obo/ODKRepo/imports/omo_import.owl" uri="imports/omo_import.owl"/>
<uri name="http://purl.obolibrary.org/obo/ODKRepo/imports/omo_import.obo" uri="imports/omo_import.obo"/>

<uri name="http://purl.obolibrary.org/obo/ODKRepo/imports/obi_import.owl" uri="imports/obi_import.owl"/>
<uri name="http://purl.obolibrary.org/obo/ODKRepo/imports/obi_import.obo" uri="imports/obi_import.obo"/>

<uri name="http://purl.obolibrary.org/obo/ODKRepo/imports/omrse_import.owl" uri="imports/omrse_import.owl"/>
<uri name="http://purl.obolibrary.org/obo/ODKRepo/imports/omrse_import.obo" uri="imports/omrse_import.obo"/>





</group>
</catalog>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uri id="Imports Wizard Entry" name="http://purl.obolibrary.org/obo/ODKRepo/releases/2023-04-20/imports/obi_import.owl" uri="imports/obi_import.owl"/>
<uri id="Imports Wizard Entry" name="http://purl.obolibrary.org/obo/ODKRepo/releases/2023-04-20/imports/omo_import.owl" uri="imports/omo_import.owl"/>
<uri id="Imports Wizard Entry" name="http://purl.obolibrary.org/obo/ODKRepo/releases/2023-04-20/imports/bfo-2020_import.owl" uri="imports/bfo-2020_import.owl"/>
<group id="Folder Repository, directory=, recursive=false, Auto-Update=false, version=2" prefer="public" xml:base=""/>
</catalog>
Loading

0 comments on commit 5ccd03d

Please sign in to comment.