Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace SPARQL queries and OWLTools by a ROBOT plugin #1174

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ENV KGCL_JAVA_VERSION=0.5.1
ENV SSSOM_JAVA_VERSION=1.1.1
ENV AMMONITE_VERSION=2.5.9
ENV SCALA_CLI_VERSION=1.5.4
ENV OWLTOOLS_VERSION=2020-04-06

# Avoid repeated downloads of script dependencies by mounting the local coursier cache:
# docker run -v $HOME/.coursier/cache/v1:/tools/.coursier-cache ...
Expand Down Expand Up @@ -83,6 +84,17 @@ RUN test "x$TARGETARCH" = xamd64 && ( \
rm Konclude.zip \
)

# Install OWLTOOLS.
RUN wget -nv https://github.com/owlcollab/owltools/releases/download/$OWLTOOLS_VERSION/owltools \
-O /tools/owltools && \
wget -nv https://github.com/owlcollab/owltools/releases/download/$OWLTOOLS_VERSION/ontology-release-runner \
-O /tools/ontology-release-runner && \
wget -nv https://github.com/owlcollab/owltools/releases/download/$OWLTOOLS_VERSION/owltools-oort-all.jar \
-O /tools/owltools-oort-all.jar && \
chmod +x /tools/owltools && \
chmod +x /tools/ontology-release-runner && \
chmod +x /tools/owltools-oort-all.jar

# Install Jena.
RUN wget -nv http://archive.apache.org/dist/jena/binaries/apache-jena-$JENA_VERSION.tar.gz -O- | tar xzC /tools && \
mv /tools/apache-jena-$JENA_VERSION /tools/apache-jena
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ test_go_mini:
test_odklite_programs:
@./tests/test-program.sh ROBOT robot --version
@./tests/test-program.sh DOSDP-TOOLS dosdp-tools -v
@./tests/test-program.sh OWLTOOLS owltools --version
@./tests/test-program.sh OORT ontology-release-runner --help
@./tests/test-program.sh JINJANATOR jinjanate --version
@./tests/test-program.sh DICER-CLI dicer-cli --version
Expand All @@ -43,6 +42,7 @@ test_odkfull_programs: test_odklite_programs
@./tests/test-program.sh KONCLUDE Konclude -h
@./tests/test-program.sh SOUFFLE souffle --version
@./tests/test-program.sh JENA jena
@./tests/test-program.sh OWLTOOLS owltools --version
@./tests/test-program.sh AMMONITE sh amm --help
@./tests/test-program.sh SCALA-CLI scala-cli --version
@./tests/test-program.sh SPARQL sparql --version
Expand Down
15 changes: 4 additions & 11 deletions docker/odklite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ LABEL maintainer="[email protected]"

ENV ROBOT_VERSION=1.9.7
ENV DOSDP_VERSION=0.19.3
ENV OWLTOOLS_VERSION=2020-04-06
ENV RELATION_GRAPH=2.3.2
ENV DICER_VERSION=0.1.0
ENV ODK_ROBOT_PLUGIN_VERSION=0.1.0

WORKDIR /tools
ENV JAVA_HOME="/usr"
Expand Down Expand Up @@ -58,16 +58,9 @@ RUN wget -nv https://github.com/INCATools/dosdp-tools/releases/download/v$DOSDP_
-O /tools/simple_pattern_tester.py && \
chmod 755 /tools/simple_pattern_tester.py

# Install OWLTOOLS.
RUN wget -nv https://github.com/owlcollab/owltools/releases/download/$OWLTOOLS_VERSION/owltools \
-O /tools/owltools && \
wget -nv https://github.com/owlcollab/owltools/releases/download/$OWLTOOLS_VERSION/ontology-release-runner \
-O /tools/ontology-release-runner && \
wget -nv https://github.com/owlcollab/owltools/releases/download/$OWLTOOLS_VERSION/owltools-oort-all.jar \
-O /tools/owltools-oort-all.jar && \
chmod +x /tools/owltools && \
chmod +x /tools/ontology-release-runner && \
chmod +x /tools/owltools-oort-all.jar
# Install ODK plugin for ROBOT
RUN mkdir -p /tools/robot-plugins && \
wget -nv -O /tools/robot-plugins/odk.jar https://github.com/gouttegd/exp-robot-plugin/releases/download/exp-robot-plugin-$ODK_ROBOT_PLUGIN_VERSION/exp.jar

# Install relation-graph
RUN wget -nv https://github.com/balhoff/relation-graph/releases/download/v$RELATION_GRAPH/relation-graph-cli-$RELATION_GRAPH.tgz && \
Expand Down
3 changes: 3 additions & 0 deletions odk/odk.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ class ReportConfig(JsonSchemaMixin):
sparql_test_on: List[str] = field(default_factory=lambda: ['edit'])
"""Chose which file to run the custom sparql checks. Supported 'edit', any release artefact."""

upper_ontology: Optional[str] = None
"""IRI of an upper ontology to check the current ontology against."""

@dataclass_json
@dataclass
class DocumentationGroup(JsonSchemaMixin):
Expand Down
Loading