Skip to content

Commit

Permalink
Merge pull request #6 from luis-gonzalez-m/main
Browse files Browse the repository at this point in the history
Clean objects and properties and German synonyms added.
  • Loading branch information
JCGiron authored Jul 3, 2021
2 parents c639c13 + 2b7b608 commit 7af72e5
Show file tree
Hide file tree
Showing 7 changed files with 41,028 additions and 12,232 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/qc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Basic ODK workflow

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "ontology_qc"
ontology_qc:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: obolibrary/odkfull:v1.2.29

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Run ontology QC checks
env:
DEFAULT_BRANCH: main
run: cd src/ontology && make ROBOT_ENV='ROBOT_JAVA_ARGS=-Xmx6G' test IMP=false PAT=false

19 changes: 12 additions & 7 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ----------------------------------------
# Makefile for lepao
# Generated using ontology-development-kit
# ODK Version: v1.2.28
# ODK Version: v1.2.29
# ----------------------------------------
# IMPORTANT: DO NOT EDIT THIS FILE. To override default make goals, use lepao.Makefile instead

Expand Down Expand Up @@ -35,7 +35,7 @@ REPORT_PROFILE_OPTS =
OBO_FORMAT_OPTIONS =
SPARQL_VALIDATION_CHECKS = equivalent-classes owldef-self-reference
SPARQL_EXPORTS = basic-report class-count-by-prefix edges xrefs obsoletes synonyms
ODK_VERSION_MAKEFILE = v1.2.28
ODK_VERSION_MAKEFILE = v1.2.29

TODAY ?= $(shell date +%Y-%m-%d)
OBODATE ?= $(shell date +'%d:%m:%Y %H:%M')
Expand Down Expand Up @@ -104,8 +104,7 @@ all_imports: $(IMPORT_FILES)
SUBSETS =

SUBSET_ROOTS = $(patsubst %, subsets/%, $(SUBSETS))
SUBSET_FORMATS = $(sort tsv owl)
SUBSET_FILES = $(foreach n,$(SUBSET_ROOTS), $(foreach f,$(SUBSET_FORMATS), $(n).$(f)))
SUBSET_FILES = $(foreach n,$(SUBSET_ROOTS), $(foreach f,$(FORMATS_INCL_TSV), $(n).$(f)))

.PHONY: all_subsets
all_subsets: $(SUBSET_FILES)
Expand Down Expand Up @@ -260,10 +259,15 @@ subsets/%.tsv: subsets/%.owl
.PRECIOUS: subsets/%.tsv

subsets/%.owl: $(ONT).owl
owltools --use-catalog $< --extract-ontology-subset --fill-gaps --subset $* -o $@.tmp.owl && mv $@.tmp.owl $@
owltools --use-catalog $< --extract-ontology-subset --fill-gaps --subset $* -o $@.tmp.owl && mv $@.tmp.owl $@ &&\
$(ROBOT) annotate --input $@ --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) -o $@.tmp.owl && mv $@.tmp.owl $@
.PRECIOUS: subsets/%.owl


subsets/%.obo: subsets/%.owl
$(ROBOT) convert --input $< --check false -f obo $(OBO_FORMAT_OPTIONS) -o $@.tmp.obo && grep -v ^owl-axioms $@.tmp.obo > $@ && rm $@.tmp.obo


# ----------------------------------------
# Release
# ----------------------------------------
Expand Down Expand Up @@ -330,6 +334,7 @@ $(ONT).obo: $(ONT).owl
# -----------------------------------------------------
# Release artefacts: variants (base, full, simple, etc)
# -----------------------------------------------------
SHARED_ROBOT_COMMANDS =

$(ONTOLOGYTERMS): $(SRC) $(OTHER_SRC)
touch $(ONTOLOGYTERMS) && \
Expand All @@ -346,7 +351,7 @@ $(ONTOLOGYTERMS): $(SRC) $(OTHER_SRC)
$(ONT)-base.owl: $(SRC) $(OTHER_SRC)
$(ROBOT) remove --input $< --select imports --trim false \
merge $(patsubst %, -i %, $(OTHER_SRC)) \
annotate --link-annotation http://purl.org/dc/elements/1.1/type http://purl.obolibrary.org/obo/IAO_8000001 \
$(SHARED_ROBOT_COMMANDS) annotate --link-annotation http://purl.org/dc/elements/1.1/type http://purl.obolibrary.org/obo/IAO_8000001 \
--ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
--output $@.tmp.owl && mv $@.tmp.owl $@

Expand All @@ -356,7 +361,7 @@ $(ONT)-full.owl: $(SRC) $(OTHER_SRC)
reason --reasoner ELK --equivalent-classes-allowed all --exclude-tautologies structural \
relax \
reduce -r ELK \
annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) --output $@.tmp.owl && mv $@.tmp.owl $@
$(SHARED_ROBOT_COMMANDS) annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) --output $@.tmp.owl && mv $@.tmp.owl $@



Expand Down
Loading

0 comments on commit 7af72e5

Please sign in to comment.