diff --git a/CHANGELOG.md b/CHANGELOG.md index 81170beb..f5becd0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ For more detailed changes see: ## New and updated tooling - New [ROBOT Version 1.9.6](https://github.com/ontodev/robot/releases/tag/v1.9.6). This came with a great number of updates and upgrades, see release notes. +- J2cli, a command-line tool to process Jinja2 templates, has been replaced by [Jinjanator](https://github.com/kpfleming/jinjanator). If your custom workflows invoke the `j2` tool, you will need to update them to use `jinjanate` instead. ## New configuration options diff --git a/Dockerfile b/Dockerfile index a8db6e6f..27372a41 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,9 +40,11 @@ RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-i xlsx2csv \ gh \ nodejs \ + npm \ graphviz \ python3-psycopg2 \ - swi-prolog + swi-prolog \ + libpcre3 # Install run-time dependencies for Soufflé. RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \ @@ -95,7 +97,7 @@ COPY scripts/obodash /tools RUN chmod +x /tools/obodash && \ git clone --depth 1 https://github.com/OBOFoundry/OBO-Dashboard.git && \ cd OBO-Dashboard && \ - python3 -m pip install -r requirements.txt && \ + python3 -m pip install -r requirements.txt --break-system-packages && \ echo " " >> Makefile && \ echo "build/robot.jar:" >> Makefile && \ echo " echo 'skipped ROBOT jar download.....' && touch \$@" >> Makefile && \ diff --git a/Makefile b/Makefile index 92b38e5d..5061d951 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,7 @@ test_odklite_programs: @./tests/test-program.sh DOSDP-TOOLS dosdp-tools -v @./tests/test-program.sh OWLTOOLS owltools --version @./tests/test-program.sh AMMONITE sh amm --help + @./tests/test-program.sh JINJANATOR jinjanate --version @./tests/test-program.sh ODK odk.py test_odkfull_programs: test_odklite_programs @@ -168,7 +169,7 @@ publish-multiarch-dev: . constraints.txt: requirements.txt.full - docker run -v $$PWD:/work -w /work --rm -ti obolibrary/odkbuild:latest /work/update-constraints.sh + docker run -v $$PWD:/work -w /work --rm -ti obolibrary/odkbuild:latest /work/update-constraints.sh --install-virtualenv clean-tests: rm -rf target/* diff --git a/constraints.txt b/constraints.txt index 2f2d4e24..e52f3d94 100644 --- a/constraints.txt +++ b/constraints.txt @@ -12,13 +12,12 @@ async-lru==2.0.4 attrs==23.2.0 Babel==2.15.0 babelon==0.2.9 -backports.tarfile==1.2.0 bcp47==0.1.0 beautifulsoup4==4.12.3 bidict==0.23.1 bleach==6.1.0 -bmt==1.4.3 -cachetools==5.3.3 +bmt==1.4.4 +cachetools==5.4.0 cattrs==23.2.3 certifi==2024.7.4 cffi==1.16.0 @@ -32,8 +31,8 @@ colorama==0.4.6 comm==0.2.2 commonmark==0.9.1 contourpy==1.2.1 -cryptography==42.0.8 -curies==0.7.9 +cryptography==43.0.0 +curies==0.7.10 cycler==0.12.1 dacite==1.8.1 daff==1.3.46 @@ -49,26 +48,25 @@ diskcache==5.6.3 distlib==0.3.8 distro==1.9.0 docker==6.1.3 -docutils==0.18.1 +docutils==0.21.2 dosdp==0.1.10.dev1 EditorConfig==0.12.4 et-xmlfile==1.1.0 eutils==0.6.0 -exceptiongroup==1.2.1 executing==2.0.1 fastjsonschema==2.20.0 fastobo==0.12.3 filelock==3.15.4 -fonttools==4.53.0 +fonttools==4.53.1 fqdn==1.5.1 funowl==0.2.3 ghp-import==2.1.0 google==3.0.0 google-api-core==2.19.1 -google-api-python-client==2.136.0 -google-auth==2.31.0 +google-api-python-client==2.138.0 +google-auth==2.32.0 google-auth-httplib2==0.2.0 -google-auth-oauthlib==1.2.0 +google-auth-oauthlib==1.2.1 googleapis-common-protos==1.63.2 graphviz==0.20.3 greenlet==3.0.3 @@ -82,7 +80,7 @@ httpx==0.27.0 idna==3.7 ijson==3.3.0 imagesize==1.4.1 -importlib_metadata==8.0.0 +importlib_metadata==8.2.0 importlib_resources==6.4.0 inflection==0.5.1 iniconfig==2.0.0 @@ -91,13 +89,14 @@ ipython==8.26.0 ipywidgets==8.1.3 isodate==0.6.1 isoduration==20.11.0 -j2cli==0.3.10 jaraco.classes==3.4.0 jaraco.context==5.3.0 jaraco.functools==4.0.1 jedi==0.19.1 jeepney==0.8.0 Jinja2==3.1.4 +jinjanator==24.2.0 +jinjanator-plugins==24.1.0 jsbeautifier==1.15.1 jsobject==0.10.2 json-flattener==0.1.9 @@ -110,7 +109,7 @@ jsonpath-ng==1.6.1 jsonpath-rw==1.4.0 jsonpickle==3.2.2 jsonpointer==3.0.0 -jsonschema==4.22.0 +jsonschema==4.23.0 jsonschema-specifications==2023.12.1 jsonschema2md==1.1.0 jsonstreams==0.6.0 @@ -120,16 +119,16 @@ jupyter-events==0.10.0 jupyter-lsp==2.2.5 jupyter_client==8.6.2 jupyter_core==5.7.2 -jupyter_server==2.14.1 +jupyter_server==2.14.2 jupyter_server_terminals==0.5.3 -jupyterlab==4.2.3 +jupyterlab==4.2.4 jupyterlab_pygments==0.3.0 -jupyterlab_server==2.27.2 +jupyterlab_server==2.27.3 jupyterlab_widgets==3.0.11 keyring==25.2.1 kgcl-rdflib==0.5.0 kgcl_schema==0.6.8 -kgx==2.4.0 +kgx==2.4.2 kiwisolver==1.4.5 lark==1.1.9 lightrdf==0.4.0 @@ -145,39 +144,39 @@ MarkupSafe==2.1.5 marshmallow==3.21.3 matplotlib==3.9.1 matplotlib-inline==0.1.7 -matplotlib-venn==0.11.10 +matplotlib-venn==1.0.0 mdurl==0.1.2 mergedeep==1.3.4 mistune==3.0.2 mkdocs==1.6.0 mkdocs-get-deps==0.2.0 -mkdocs-material==9.5.28 +mkdocs-material==9.5.30 mkdocs-material-extensions==1.3.1 mkdocs-mermaid2-plugin==1.1.1 mkdocs-table-reader-plugin==2.2.2 more-click==0.1.2 more-itertools==10.3.0 -mypy==1.10.1 +mypy==1.11.0 mypy-extensions==1.0.0 nbclient==0.10.0 nbconvert==7.16.4 nbformat==5.10.4 ndex2==3.9.0 -neo4j==4.4.12 +neo4j==5.23.0 nest-asyncio==1.6.0 networkx==3.3 -nh3==0.2.17 +nh3==0.2.18 notebook==7.2.1 notebook_shim==0.2.4 numpy==1.26.4 -oaklib==0.6.11 +oaklib==0.6.12 oauthlib==3.2.2 ols-client==0.1.4 -ontobio==2.9.1 +ontobio==2.9.3 ontodev-cogs==0.3.3 ontodev-gizmos==0.3.2 ontoportal-client==0.0.4 -openai==1.35.10 +openai==1.37.1 openpyxl==3.1.5 ordered-set==4.1.0 overrides==7.7.0 @@ -193,11 +192,11 @@ pexpect==4.9.0 pillow==10.4.0 pkginfo==1.10.0 platformdirs==4.2.2 -plotly==5.22.0 +plotly==5.23.0 pluggy==1.5.0 ply==3.11 prefixcommons==0.1.12 -prefixmaps==0.2.4 +prefixmaps==0.2.5 prologterms==0.0.6 prometheus_client==0.20.0 prompt_toolkit==3.0.47 @@ -206,7 +205,7 @@ proto-plus==1.24.0 protobuf==5.27.2 psutil==6.0.0 ptyprocess==0.7.0 -pure-eval==0.2.2 +pure_eval==0.2.3 pyarrow==15.0.2 pyasn1==0.6.0 pyasn1_modules==0.4.0 @@ -218,7 +217,7 @@ PyGithub==2.3.0 Pygments==2.18.0 PyJSG==0.11.10 PyJWT==2.8.0 -pymdown-extensions==10.8.1 +pymdown-extensions==10.9 PyNaCl==1.5.0 pyparsing==2.4.7 pyproject-api==1.7.1 @@ -227,7 +226,7 @@ PyShExC==0.9.1 pysolr==3.9.0 pyspellchecker==0.8.1 pystow==0.5.4 -pytest==8.2.2 +pytest==8.3.2 pytest-logging==2015.11.4 python-dateutil==2.9.0.post0 python-dotenv==1.0.1 @@ -244,10 +243,10 @@ ratelimit==2.2.1 rdflib==7.0.0 rdflib-jsonld==0.6.1 rdflib-shim==1.0.3 -readme_renderer==43.0 +readme_renderer==44.0 recommonmark==0.7.1 referencing==0.35.1 -regex==2024.5.15 +regex==2024.7.24 requests==2.32.3 requests-cache==1.2.1 requests-oauthlib==2.0.0 @@ -257,14 +256,14 @@ rfc3986==2.0.0 rfc3986-validator==0.1.1 rfc3987==1.3.8 rich==13.7.1 -rpds-py==0.18.1 +rpds-py==0.19.1 rsa==4.9 ruamel.yaml==0.18.6 ruamel.yaml.clib==0.2.8 scipy==1.14.0 seaborn==0.13.2 SecretStorage==3.3.3 -semsimian==0.2.16 +semsimian==0.2.17 semsql==0.3.3 Send2Trash==1.8.3 ShExJSG==0.8.2 @@ -275,29 +274,28 @@ sortedcontainers==2.4.0 soupsieve==2.5 sparqlslurper==0.5.1 SPARQLWrapper==2.0.0 -Sphinx==7.3.7 -sphinxcontrib-applehelp==1.0.8 -sphinxcontrib-devhelp==1.0.6 -sphinxcontrib-htmlhelp==2.0.5 +Sphinx==7.4.7 +sphinxcontrib-applehelp==2.0.0 +sphinxcontrib-devhelp==2.0.0 +sphinxcontrib-htmlhelp==2.1.0 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.7 -sphinxcontrib-serializinghtml==1.1.10 +sphinxcontrib-qthelp==2.0.0 +sphinxcontrib-serializinghtml==2.0.0 SQLAlchemy==2.0.31 SQLAlchemy-Utils==0.38.3 sqlite-fts4==1.0.3 sqlite-migrate==0.1b0 -sqlite-utils==3.36 +sqlite-utils==3.37 sssom==0.4.11 sssom-schema==0.15.2 stack-data==0.6.3 stringcase==1.2.0 tabulate==0.9.0 -tenacity==8.4.2 +tenacity==9.0.0 termcolor==2.4.0 terminado==0.18.1 terminaltables==3.1.10 tinycss2==1.3.0 -tomli==2.0.1 tornado==6.4.1 tox==4.16.0 tqdm==4.66.4 diff --git a/docker/builder/Dockerfile b/docker/builder/Dockerfile index f94e3290..31f58786 100644 --- a/docker/builder/Dockerfile +++ b/docker/builder/Dockerfile @@ -3,7 +3,7 @@ # (typically because pre-compiled binaries don't exist for arm64) and # we don't want to build directly on the final image (to avoid # cluttering the image with build-time dependencies). -FROM ubuntu:22.04 +FROM ubuntu:24.04 WORKDIR /build # Software versions @@ -27,8 +27,7 @@ RUN apt-get update && \ rustc \ cargo \ python3-dev \ - python3-pip \ - python3-virtualenv + python3-pip # Build the Python packages. # On x86_64, most if not all of these packages should be available as @@ -41,19 +40,22 @@ RUN apt-get update && \ COPY requirements.txt.full /build/requirements.txt COPY requirements.txt.lite /build/requirements.txt.lite COPY constraints.txt /build/constraints.txt +RUN echo "setuptools<72" > /build/pip-constraints.txt # First the packages needed by the odklite image. -RUN python3 -m pip install \ +RUN PIP_CONSTRAINT=/build/pip-constraints.txt python3 -m pip install \ -r /build/requirements.txt.lite \ -c /build/constraints.txt \ + --no-warn-script-location \ --root /staging/lite # Then those needed by the odkfull image. # After installing those packages, we forcibly remove from the odkfull # staging tree any file already present in the odklite staging tree # (caused by packages installed in both trees) to avoid needlessly # increasing the size of the odkfull image. -RUN python3 -m pip install \ +RUN PIP_CONSTRAINT=/build/pip-constraints.txt python3 -m pip install \ -c /build/constraints.txt \ -r /build/requirements.txt \ + --no-warn-script-location \ --root /staging/full && \ cd /staging/lite && \ find . -type f | while read f ; do rm -f /staging/full/$f ; done && \ diff --git a/docker/odklite/Dockerfile b/docker/odklite/Dockerfile index 42a7c092..51cf5eb7 100644 --- a/docker/odklite/Dockerfile +++ b/docker/odklite/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 LABEL maintainer="obo-tools@googlegroups.com" ENV ROBOT_VERSION=1.9.6 diff --git a/docker/robot/Dockerfile b/docker/robot/Dockerfile index 60a44dee..b6f29826 100644 --- a/docker/robot/Dockerfile +++ b/docker/robot/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 LABEL maintainer="obo-tools@googlegroups.com" WORKDIR /tools diff --git a/odk/odk.py b/odk/odk.py index 014c7080..84d832d6 100755 --- a/odk/odk.py +++ b/odk/odk.py @@ -778,7 +778,7 @@ class ExecutionContext(JsonSchemaMixin): project : Optional[OntologyProject] = None meta : str = "" - + @dataclass class Generator(object): """ @@ -787,7 +787,7 @@ class Generator(object): """ ## TODO: consider merging Generator and ExecutionContext? - context : ExecutionContext = ExecutionContext() + context : ExecutionContext = field(default_factory=ExecutionContext) def generate(self, input : str) -> str: """ @@ -1083,7 +1083,7 @@ def seed(config, clean, outdir, templatedir, dependencies, title, user, source, print(" 5. See the section under '…or push an existing repository from the command line'") print(" E.g.:") print("cd {}".format(outdir)) - print("git remote add origin git\@github.com:{org}/{repo}.git".format(org=project.github_org, repo=project.repo)) + print("git remote add origin git@github.com:{org}/{repo}.git".format(org=project.github_org, repo=project.repo)) print("git branch -M {branch}\n".format(branch=project.git_main_branch)) print("git push -u origin {branch}\n".format(branch=project.git_main_branch)) print("BE BOLD: you can always delete your repo and start again\n") diff --git a/requirements.txt.full b/requirements.txt.full index a792dbe0..1ec0ac41 100644 --- a/requirements.txt.full +++ b/requirements.txt.full @@ -40,8 +40,7 @@ mkdocs-table-reader-plugin funowl kgx tsvalid -j2cli[yaml] -j2cli +jinjanator pyspellchecker jsonschema2md curies diff --git a/requirements.txt.lite b/requirements.txt.lite index 5268d309..d9ebc1f6 100644 --- a/requirements.txt.lite +++ b/requirements.txt.lite @@ -11,8 +11,7 @@ pyyaml ruamel.yaml dosdp tsvalid -j2cli[yaml] -j2cli +jinjanator lightrdf sssom babelon diff --git a/update-constraints.sh b/update-constraints.sh index 89a2cd78..2882d9e6 100755 --- a/update-constraints.sh +++ b/update-constraints.sh @@ -2,6 +2,11 @@ set -e +if [ "x$1" = x--install-virtualenv ]; then + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3-virtualenv +fi + virtualenv tmpdir . tmpdir/bin/activate python3 -m pip install -U pip