Skip to content

Commit

Permalink
added japanese translation, updated makefile to merge it in at releas…
Browse files Browse the repository at this point in the history
…e time
  • Loading branch information
mcourtot committed Jul 30, 2020
1 parent 44e218a commit ad64dec
Show file tree
Hide file tree
Showing 4 changed files with 351 additions and 145 deletions.
23 changes: 15 additions & 8 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,31 @@ OBO=http://purl.obolibrary.org/obo
ONT=duo
BASE=$(OBO)/$(ONT)
SRC=$(ONT)-edit.owl
MRG=$(ONT)-merged.owl
RELEASEDIR=../..
ROBOT= robot
OWLTOOLS= owltools
USECAT= --use-catalog

all: $(ONT).owl $(ONT)-basic.owl $(ONT).csv
all: $(ONT).owl $(ONT)-basic.owl $(ONT).csv

test:all


prepare-release-local:
cp $(ONT).owl $(ONT)-basic.owl $(ONT).csv $(RELEASEDIR) &&\
echo "Release files are now in $(RELEASEDIR) - please check locally. Nothing has been added to GH yet."

prepare-release:
$(ROBOT) reason -i $(SRC) -r ELK relax reduce -r ELK annotate -V $(BASE)/releases/`date +%Y-%m-%d`/$(ONT).owl -o $(ONT).owl
cp $(ONT).owl $(ONT)-basic.owl $(ONT).csv $(RELEASEDIR) &&\
cp $(ONT).owl $(ONT)-basic.owl $(ONT).csv $(RELEASEDIR) &&\
git add $(RELEASEDIR)/*.owl
echo "Release files are now in $(RELEASEDIR) - now you should commit, push and make a release on github"

echo "Release files are now in $(RELEASEDIR) - now you should commit, push and make a release on github"

$(ONT).owl: $(SRC)
$(ROBOT) reason -i $< -r ELK relax reduce -r ELK annotate -V $(BASE)/releases/`date +%Y-%m-%d`/$(ONT).owl -o $@
$(ONT).owl:
#merges in the japanese translation
$(ROBOT) merge -i $(SRC) -i $(ONT)-japanese.owl -o $(ONT).owl
#build the owl file
$(ROBOT) reason -i $(ONT).owl -r ELK relax reduce -r ELK annotate -V $(BASE)/releases/`date +%Y-%m-%d`/$(ONT).owl -o $@

$(ONT)-basic.owl: $(ONT).owl root-terms.txt
$(ROBOT) merge -i $(ONT).owl filter --term-file root-terms.txt --select "annotations self descendants ontology" annotate --ontology-iri $(BASE)-basic.owl -V $(BASE)/releases/`date +%Y-%m-%d`/$(ONT)-basic.owl -o $@
Expand Down Expand Up @@ -48,7 +55,7 @@ $(ONT).csv: $(ONT)-basic.owl make-csv.sparql
# $(OWLTOOLS) $(USECAT) $< -o -f obo $@

# clone remote ontology locally, performing some excision of relations and annotations
mirror/%.owl: $(SRC)
mirror/%.owl: $(MRG)
$(OWLTOOLS) $(OBO)/$*.owl --remove-annotation-assertions -l -s -d --remove-dangling-annotations -o $@
.PRECIOUS: mirror/%.owl

Expand Down
Loading

0 comments on commit ad64dec

Please sign in to comment.