Skip to content

Commit bef3c7f

Browse files
authored
Merge pull request #436 from INCATools/odk1229
Preparing ODK 1.2.29
2 parents 4608b8f + 2032922 commit bef3c7f

File tree

4 files changed

+21
-15
lines changed

4 files changed

+21
-15
lines changed

Dockerfile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,12 @@ RUN apt-get update &&\
4141
libfreetype6-dev \
4242
libpng-dev \
4343
pkg-config \
44-
xlsx2csv &&\
45-
cd /usr/local/bin \
46-
&& ln -s /usr/bin/python3 python \
47-
&& pip3 install --upgrade pip setuptools \
48-
&& pip3 install -r /tools/requirements.txt \
49-
&& if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi \
50-
&& if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi \
51-
&& rm -r /root/.cache
44+
xlsx2csv \
45+
&& python3 -m pip install --upgrade pip setuptools \
46+
&& python3 -m pip install -r /tools/requirements.txt \
47+
&& if [ ! -e /usr/bin/pip ]; then ln -sf /usr/bin/pip3 /usr/bin/pip ; fi \
48+
&& if [ ! -e /usr/bin/python ]; then ln -sf /usr/bin/python3 /usr/bin/python; fi \
49+
&& rm -r /root/.cache
5250

5351

5452
### 3. Install SWI-Prolog

odk/odk.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,9 @@ class OntologyProject(JsonSchemaMixin):
440440
use_external_date: bool = False
441441
"""Flag to set if you want odk to use the host `date` rather than the docker internal `date`"""
442442

443+
remove_owl_nothing: bool = False
444+
"""Flag to set if you want odk to remove owl:Nothing from releases."""
445+
443446
export_project_yaml: bool = False
444447
"""Flag to set if you want a full project.yaml to be exported, including all the default options."""
445448

requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ rdflib >=0.0
1818
requests >=0.0
1919
ruamel.yaml >=0.0
2020
seaborn>=0.0
21-
upsetplot==0.4.1
21+
upsetplot>=0.0
2222
plotly>=0.0
2323
networkx==2.5
2424
ontodev-cogs>=0.0
2525
sssom==0.14.11.dev0
2626
mkdocs >= 0.0
27+
funowl >= 0.0
28+
kgx >= 0.0
29+
linkml >= 0.0
30+

template/src/ontology/Makefile.jinja2

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ $(ONT).json: $(ONT)-{{ project.primary_release }}.owl
672672
# -----------------------------------------------------
673673
# Release artefacts: variants (base, full, simple, etc)
674674
# -----------------------------------------------------
675+
SHARED_ROBOT_COMMANDS = {% if project.remove_owl_nothing -%}remove --term owl:Nothing{% endif %}
675676

676677
$(ONTOLOGYTERMS): $(SRC) $(OTHER_SRC)
677678
touch $(ONTOLOGYTERMS) && \
@@ -696,7 +697,7 @@ $(ONT).owl: $(ONT)-{{ project.primary_release }}.owl
696697
$(ONT)-base.owl: $(SRC) $(OTHER_SRC)
697698
$(ROBOT) remove --input $< --select imports --trim false \
698699
{% if project.use_dosdps or project.components is defined %}merge $(patsubst %, -i %, $(OTHER_SRC)) \
699-
{% endif %}annotate --link-annotation http://purl.org/dc/elements/1.1/type http://purl.obolibrary.org/obo/IAO_8000001 \
700+
{% endif %} $(SHARED_ROBOT_COMMANDS) annotate --link-annotation http://purl.org/dc/elements/1.1/type http://purl.obolibrary.org/obo/IAO_8000001 \
700701
--ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
701702
{% if project.release_date -%} --annotation oboInOwl:date "$(OBODATE)" {% endif -%}--output $@.tmp.owl && mv $@.tmp.owl $@
702703

@@ -706,13 +707,13 @@ $(ONT)-full.owl: $(SRC) $(OTHER_SRC)
706707
reason --reasoner {{ project.reasoner }} --equivalent-classes-allowed {{ project.allow_equivalents }} --exclude-tautologies {{ project.exclude_tautologies }} \
707708
relax \
708709
reduce -r {{ project.reasoner }} \
709-
annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) {% if project.release_date -%}--annotation oboInOwl:date "$(OBODATE)" {% endif -%}--output $@.tmp.owl && mv $@.tmp.owl $@
710+
$(SHARED_ROBOT_COMMANDS) annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) {% if project.release_date -%}--annotation oboInOwl:date "$(OBODATE)" {% endif -%}--output $@.tmp.owl && mv $@.tmp.owl $@
710711

711712
{% if 'non-classified' in project.release_artefacts or project.primary_release == 'non-classified' -%}
712713
# foo-non-classified: (edit->imports-merged)
713714
$(ONT)-non-classified.owl: $(SRC) $(OTHER_SRC)
714715
$(ROBOT) merge --input $< \
715-
annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) {% if project.release_date -%}--annotation oboInOwl:date "$(OBODATE)" {% endif -%}--output $@.tmp.owl && mv $@.tmp.owl $@
716+
$(SHARED_ROBOT_COMMANDS) annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) {% if project.release_date -%}--annotation oboInOwl:date "$(OBODATE)" {% endif -%}--output $@.tmp.owl && mv $@.tmp.owl $@
716717
{% endif -%}
717718

718719
{% if 'simple' in project.release_artefacts or project.primary_release == 'simple' -%}
@@ -729,7 +730,7 @@ $(ONT)-simple.owl: $(SRC) $(OTHER_SRC) $(SIMPLESEED)
729730
filter --term-file $(SIMPLESEED) --select "annotations ontology anonymous self" --trim true --signature true \
730731
reduce -r {{ project.reasoner }} \
731732
query --update ../sparql/inject-subset-declaration.ru \
732-
annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) {% if project.release_date -%}--annotation oboInOwl:date "$(OBODATE)" {% endif -%}--output $@.tmp.owl && mv $@.tmp.owl $@
733+
$(SHARED_ROBOT_COMMANDS) annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) {% if project.release_date -%}--annotation oboInOwl:date "$(OBODATE)" {% endif -%}--output $@.tmp.owl && mv $@.tmp.owl $@
733734
{% endif -%}
734735

735736
{% if 'simple-non-classified' in project.release_artefacts or project.primary_release == 'simple-non-classified' -%}
@@ -743,7 +744,7 @@ $(ONT)-simple-non-classified.owl: $(SRC) $(OTHER_SRC) $(ONTOLOGYTERMS)
743744
remove --axioms equivalent \
744745
reduce -r {{ project.reasoner }} \
745746
filter --select ontology --term-file $(ONTOLOGYTERMS) --trim false \
746-
annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) {% if project.release_date -%}--annotation oboInOwl:date "$(OBODATE)" {% endif -%}--output $@.tmp.owl && mv $@.tmp.owl $@
747+
$(SHARED_ROBOT_COMMANDS) annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) {% if project.release_date -%}--annotation oboInOwl:date "$(OBODATE)" {% endif -%}--output $@.tmp.owl && mv $@.tmp.owl $@
747748
{% endif -%}
748749

749750
{% if 'basic' in project.release_artefacts or project.primary_release == 'basic' -%}
@@ -760,7 +761,7 @@ $(ONT)-basic.owl: $(SRC) $(OTHER_SRC) $(SIMPLESEED) $(KEEPRELATIONS)
760761
relax \
761762
filter --term-file $(SIMPLESEED) --select "annotations ontology anonymous self" --trim true --signature true \
762763
reduce -r {{ project.reasoner }} \
763-
annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) {% if project.release_date -%}--annotation oboInOwl:date "$(OBODATE)" {% endif -%}--output $@.tmp.owl && mv $@.tmp.owl $@
764+
$(SHARED_ROBOT_COMMANDS) annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) {% if project.release_date -%}--annotation oboInOwl:date "$(OBODATE)" {% endif -%}--output $@.tmp.owl && mv $@.tmp.owl $@
764765
{% endif -%}
765766
{% for r in project.release_artefacts %}
766767
{%- if r.startswith('custom-') %}

0 commit comments

Comments
 (0)