Skip to content

Commit

Permalink
Merge branch 'master' into international-edition
Browse files Browse the repository at this point in the history
  • Loading branch information
matentzn authored Feb 29, 2024
2 parents 510a7dc + fe6869a commit de8f6b1
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 17 deletions.
24 changes: 12 additions & 12 deletions constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ beautifulsoup4==4.12.3
bidict==0.23.1
bleach==6.1.0
bmt==1.1.4
cachetools==5.3.2
cachetools==5.3.3
cattrs==23.2.3
certifi==2024.2.2
cffi==1.16.0
Expand Down Expand Up @@ -85,7 +85,7 @@ importlib-metadata==7.0.1
importlib_resources==6.1.2
inflection==0.5.1
iniconfig==2.0.0
ipykernel==6.29.2
ipykernel==6.29.3
ipython==8.22.1
ipywidgets==8.1.2
isodate==0.6.1
Expand Down Expand Up @@ -114,7 +114,7 @@ jsonstreams==0.6.0
jupyter==1.0.0
jupyter-console==6.6.3
jupyter-events==0.9.0
jupyter-lsp==2.2.2
jupyter-lsp==2.2.3
jupyter_client==8.6.0
jupyter_core==5.7.1
jupyter_server==2.12.5
Expand All @@ -123,14 +123,14 @@ jupyterlab==4.1.2
jupyterlab_pygments==0.3.0
jupyterlab_server==2.25.3
jupyterlab_widgets==3.0.10
keyring==24.3.0
keyring==24.3.1
kgcl-rdflib==0.5.0
kgcl_schema==0.6.4
kgx==2.2.5
kiwisolver==1.4.5
lark==1.1.9
lightrdf==0.4.0
linkml==1.7.4
linkml==1.7.5
linkml-dataops==0.1.0
linkml-renderer==0.3.0
linkml-runtime==1.7.2
Expand All @@ -139,15 +139,15 @@ lxml==5.1.0
Markdown==3.5.2
markdown-it-py==3.0.0
MarkupSafe==2.1.5
marshmallow==3.20.2
marshmallow==3.21.0
matplotlib==3.8.3
matplotlib-inline==0.1.6
matplotlib-venn==0.11.10
mdurl==0.1.2
mergedeep==1.3.4
mistune==3.0.2
mkdocs==1.5.3
mkdocs-material==9.5.11
mkdocs-material==9.5.12
mkdocs-material-extensions==1.3.1
mkdocs-mermaid2-plugin==0.6.0
mkdocs-table-reader-plugin==2.1.0
Expand All @@ -163,7 +163,7 @@ neo4j==4.4.11
nest-asyncio==1.6.0
networkx==3.2.1
nh3==0.2.15
notebook==7.1.0
notebook==7.1.1
notebook_shim==0.2.4
numpy==1.26.4
oaklib==0.5.25
Expand All @@ -173,7 +173,7 @@ ontobio==2.8.22
ontodev-cogs==0.3.3
ontodev-gizmos==0.3.2
ontoportal-client==0.0.4
openai==1.12.0
openai==1.13.3
openpyxl==3.1.2
ordered-set==4.1.0
overrides==7.7.0
Expand Down Expand Up @@ -206,7 +206,7 @@ py==1.11.0
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycparser==2.21
pydantic==2.6.2
pydantic==2.6.3
pydantic_core==2.16.3
pydotplus==2.0.2
PyGithub==2.2.0
Expand Down Expand Up @@ -238,7 +238,7 @@ ratelimit==2.2.1
rdflib==7.0.0
rdflib-jsonld==0.6.1
rdflib-shim==1.0.3
readme-renderer==42.0
readme_renderer==43.0
recommonmark==0.7.1
referencing==0.33.0
regex==2023.12.25
Expand All @@ -250,7 +250,7 @@ rfc3339-validator==0.1.4
rfc3986==2.0.0
rfc3986-validator==0.1.1
rfc3987==1.3.8
rich==13.7.0
rich==13.7.1
rpds-py==0.18.0
rsa==4.9
ruamel.yaml==0.18.6
Expand Down
5 changes: 5 additions & 0 deletions docker/odklite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ ENTRYPOINT ["/usr/local/sbin/odkuser-entrypoint.sh"]
# secure_path is enabled by default in Debian/Ubuntu, disable it
RUN sed -i '/secure_path/d' /etc/sudoers

# Install a script that provides information about the ODK and its tools
COPY scripts/odk-info.sh /tools/odk-info
RUN chmod 755 /tools/odk-info
RUN sed -i s/@@ODK_IMAGE_VERSION@@/$ODK_VERSION/ /tools/odk-info

# Install the ODK itself.
COPY odk/make-release-assets.py /tools
COPY odk/odk.py /tools
Expand Down
3 changes: 3 additions & 0 deletions odk/odk.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,9 @@ class OntologyProject(JsonSchemaMixin):

edit_format : str = "owl"
"""Format in which the edit file is managed, either obo or owl"""

run_as_root: bool = False
"""if true, all commands will be executed into the container under the identity of the super-user. Use this if you have custom workflows that require admin rights (e.g. to install Debian packages not provided in the ODK)."""

robot_version: Optional[str] = None
"""Only set this if you want to pin to a specific robot version"""
Expand Down
57 changes: 57 additions & 0 deletions scripts/odk-info.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash

show_odk_version=1
show_tools_version=0
show_all_python_packages=0

while [ -n "$1" ]; do
case $1 in
--tools)
show_tools_version=1
shift
;;

--all-python)
show_all_python_packages=1
shift
;;

--all)
show_tools_version=1
show_all_python_packages=1
shift
;;

*)
echo "Usage: odkinfo [--tools|--all-python|--all]"
exit
;;
esac
done

if [ $show_odk_version -eq 1 ]; then
echo "ODK Image @@ODK_IMAGE_VERSION@@"
fi

if [ $show_tools_version -eq 1 ]; then
robot --version
amm --version
echo "DOSDP-Tools v$(dosdp-tools --version | sed -ne 's/^.*version: //;s/,.*$//p')"
if type -p Konclude > /dev/null ; then
echo "Konclude $(Konclude -h | sed -nre 's/^.*Version (.*) - .*$/\1/p')"
fi
if type -p jena.version > /dev/null ; then
echo "Jena v$(jena.version)"
fi
if type -p relation-graph > /dev/null ; then
echo "Relation-Graph v$(relation-graph --version | sed -ne 's/^.*version: //;s/,.*$//p')"
fi
if type -p runoak > /dev/null ; then
echo "Ontology Access Kit v$(python3 -m pip show oaklib | sed -ne 's/^Version: //p')"
fi
fi

if [ $show_all_python_packages -eq 1 ]; then
echo "Python packages:"
python3 -m pip list
fi
5 changes: 2 additions & 3 deletions template/src/ontology/Makefile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,8 @@ reason_test: $(EDIT_PREPROCESSED)

.PHONY: odkversion
odkversion:
echo "ODK Makefile version: $(ODK_VERSION_MAKEFILE) (this is the version of the ODK with which this Makefile was generated, \
not the version of the ODK you are running)" &&\
echo "ROBOT version (ODK): " && $(ROBOT) --version
@echo "ODK Makefile $(ODK_VERSION_MAKEFILE)"
@odk-info --tools

{%- if project.config_hash %}
.PHONY: config_check
Expand Down
4 changes: 2 additions & 2 deletions template/src/ontology/run.sh.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ ODK_TAG=${ODK_TAG:-latest}
ODK_JAVA_OPTS={% if project.robot_java_args is defined and project.robot_java_args|length %}${ODK_JAVA_OPTS:-{{ project.robot_java_args }}}{% else %}${ODK_JAVA_OPTS:--Xmx8G}{% endif %}
ODK_DEBUG=${ODK_DEBUG:-no}

ODK_USER_ID=${ODK_USER_ID:-$(id -u)}
ODK_GROUP_ID=${ODK_GROUP_ID:-$(id -g)}
ODK_USER_ID=${ODK_USER_ID:-{% if project.run_as_root %}0{% else %}$(id -u){% endif %}}
ODK_GROUP_ID=${ODK_GROUP_ID:-{% if project.run_as_root %}0{% else %}$(id -g){% endif %}}

# Convert OWLAPI_* environment variables to the OWLAPI as Java options
# See http://owlcs.github.io/owlapi/apidocs_4/org/semanticweb/owlapi/model/parameters/ConfigurationOptions.html
Expand Down

0 comments on commit de8f6b1

Please sign in to comment.