From 25ffe4ba74f17a548c5a43f4094968580709b200 Mon Sep 17 00:00:00 2001 From: Theodore Chang <theodore.chang@physik.hu-berlin.de> Date: Wed, 22 Mar 2023 03:24:28 +0000 Subject: [PATCH] Update some vulnerable and obsolete packages --- CHANGELOG.md | 45 +++++++++++++++--------------------- nomad/app/v1/routers/auth.py | 2 +- nomad/files.py | 9 +------- pyproject.toml | 12 ++++------ requirements-dev.txt | 45 +++++++++++++++++++----------------- requirements.txt | 39 ++++++++++++++++--------------- tests/conftest.py | 3 ++- 7 files changed, 72 insertions(+), 83 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b84088a737..10a0fd1bd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,7 @@ -## v1.1.6 (2022-12-23) -### fixed (1 change) - -- [Fixed failing plot annotation valiation.](nomad-lab/nomad-FAIR@3cd5d0635566d9882e1c44cd922e113dfbeb1292) ([merge request](nomad-lab/nomad-FAIR!1005)) - -### feature (1 change) - -- [Added a way to define formal models for metainfo annotations.](nomad-lab/nomad-FAIR@6a84b55e17dd5cd41cb5ba571f2451d528dbe6a0) ([merge request](nomad-lab/nomad-FAIR!990)) - -### added (1 change) - -- [Replaced config object with pydantic models.](nomad-lab/nomad-FAIR@b9c1e023d95d14fd337b98a7ac895f505d4715a9) ([merge request](nomad-lab/nomad-FAIR!981)) ## 1.1.8 (2023-03-10) -### Fixed (8 changes) +### Fixed (9 changes) - [Fixed a bug in handling UI load errors.](nomad-lab/nomad-FAIR@bc01f359fbd55048fff0c7213ba42ae53451add3) ([merge request](nomad-lab/nomad-FAIR!1143)) - [Add parsers](nomad-lab/nomad-FAIR@b1c177f75cd72dfabaea6137d93375357857b3a6) ([merge request](nomad-lab/nomad-FAIR!1136)) @@ -23,6 +11,7 @@ - [ability to reference to the other uploads properly](nomad-lab/nomad-FAIR@8befc8efe92218aa63a63c562ac8057de54e5ba2) ([merge request](nomad-lab/nomad-FAIR!1070)) - [Added the staging url](nomad-lab/nomad-FAIR@5a0b31a7cff12106a28f0fc02bba7fda764d4708) ([merge request](nomad-lab/nomad-FAIR!1086)) - [Workflow fix](nomad-lab/nomad-FAIR@75170b392d779cf9a27880fd83433c3d47a85b37) ([merge request](nomad-lab/nomad-FAIR!1113)) +- [Fixed the availability of the beta/test snack in the UI.](nomad-lab/nomad-FAIR@a3f29510858bf6ba6056f1c52af177e70d24eacc) ([merge request](nomad-lab/nomad-FAIR!1134)) ### Added (10 changes) @@ -43,13 +32,9 @@ - [Upgraded nomad-lab to Python 3.9 and bumped a few dependency version.](nomad-lab/nomad-FAIR@5cb6d4a46c5ac6c4809e66cc288dee32a68721de) ([merge request](nomad-lab/nomad-FAIR!1125)) - [Changed the config to use Pydantic models for UI aspects.](nomad-lab/nomad-FAIR@de1ed6ffb8db168f6f7ae4f6e9addd59879f552f) ([merge request](nomad-lab/nomad-FAIR!1104)) -### Fixed. (1 change) - -- [Fixed the availability of the beta/test snack in the UI.](nomad-lab/nomad-FAIR@a3f29510858bf6ba6056f1c52af177e70d24eacc) ([merge request](nomad-lab/nomad-FAIR!1134)) - ## 1.1.7 (2023-02-20) -### Added (17 changes) +### Added (18 changes) - [Added a config switch to enable disable north tools.](nomad-lab/nomad-FAIR@37d9b6db1e8044ae28476488e8c3ae1896e149ad) ([merge request](nomad-lab/nomad-FAIR!1099)) - [Refactor NORTH and Jupyterhub deployment. Add a new north API endpoint. Mount...](nomad-lab/nomad-FAIR@b0e28fa7fd3f47fcd538f33bd84bad659ee6549a) ([merge request](nomad-lab/nomad-FAIR!996)) @@ -68,8 +53,9 @@ - [Added a automatically generated changelog to our git.](nomad-lab/nomad-FAIR@fe795eff97145e0e28d61ca840cbb3069217d24a) ([merge request](nomad-lab/nomad-FAIR!1016)) - [Added a glossary to the documentation.](nomad-lab/nomad-FAIR@aa42834ed51b3d231a8edc58b00ea1f2dddc21f5) ([merge request](nomad-lab/nomad-FAIR!1024)) - [Added dropdown list to select from sections.](nomad-lab/nomad-FAIR@a332abed1318f60078463e2ee71ae68b2086ef1a) ([merge request](nomad-lab/nomad-FAIR!992)) +- [Implement extended matching of h5 files.](nomad-lab/nomad-FAIR@96372aa26a0675a0bbae99b8e5059f5e0f1a5f3a) ([merge request](nomad-lab/nomad-FAIR!1023)) -### Fixed (16 changes) +### Fixed (18 changes) - [Fixed wrong property inheritance base section order in UI metainfo.](nomad-lab/nomad-FAIR@9cbd6d9c37d21f06cf9fc3f5d9fbde746d7873b3) ([merge request](nomad-lab/nomad-FAIR!1098)) - [Fixed the build-in schema entry create to use the right definitions.](nomad-lab/nomad-FAIR@8db7bb1be8ab502f4aef178107f50d27297123a2) ([merge request](nomad-lab/nomad-FAIR!1095)) @@ -87,21 +73,28 @@ - [Fixed the README batches and changed pipeline to push tags to github.](nomad-lab/nomad-FAIR@8c42e102387b2d0c5f0a55fd368b266306b705f1) ([merge request](nomad-lab/nomad-FAIR!1057)) - [Fixed issue with optimade filter menu performing premature API calls.](nomad-lab/nomad-FAIR@7c4ad789591ce6a30cb6236825798e440711ce21) ([merge request](nomad-lab/nomad-FAIR!1048)) - [Fixed generation of duplicated subsections on updating an entry that triggers tabular parser](nomad-lab/nomad-FAIR@e91176fe2a197f9d8450e29dc8b599f669ecad1d) ([merge request](nomad-lab/nomad-FAIR!1033)) +- [Fix the select feature of the Datatable component](nomad-lab/nomad-FAIR@8fd52ed7bccc14c13c6c83d90e3a931df3cf9d25) ([merge request](nomad-lab/nomad-FAIR!1060)) +- [Datafile quantity containing `tabular_parser` annotation can be referenced](nomad-lab/nomad-FAIR@8ad191bf7f37b9c1286200127f6f5b2f0cf3701a) ([merge request](nomad-lab/nomad-FAIR!1017)) ### Changed (2 changes) - [Small UX changes to the upload interface.](nomad-lab/nomad-FAIR@5e18b0e12d4ce4d608a5cd68efbeb02ee2d51f04) ([merge request](nomad-lab/nomad-FAIR!1085)) - [Refactored the overview UI code to optimise loading performance.](nomad-lab/nomad-FAIR@161051655e8b9406197247ed943e027fdd13771b) ([merge request](nomad-lab/nomad-FAIR!1075)) -### fixed (2 changes) +### Feature (1 change) -- [Fix the select feature of the Datatable component](nomad-lab/nomad-FAIR@8fd52ed7bccc14c13c6c83d90e3a931df3cf9d25) ([merge request](nomad-lab/nomad-FAIR!1060)) -- [Datafile quantity containing `tabular_parser` annotation can be referenced](nomad-lab/nomad-FAIR@8ad191bf7f37b9c1286200127f6f5b2f0cf3701a) ([merge request](nomad-lab/nomad-FAIR!1017)) +- [Adds an ELN schema that allows to create entries that clone data from a labfolder project.](nomad-lab/nomad-FAIR@166a8aaa65f63bf368453365689e1dab577fc94d) ([merge request](nomad-lab/nomad-FAIR!948)) -### added (1 change) +## 1.1.6 (2022-12-23) -- [Implement extended matching of h5 files.](nomad-lab/nomad-FAIR@96372aa26a0675a0bbae99b8e5059f5e0f1a5f3a) ([merge request](nomad-lab/nomad-FAIR!1023)) +### Fixed (1 change) -### feature (1 change) +- [Fixed failing plot annotation valiation.](nomad-lab/nomad-FAIR@3cd5d0635566d9882e1c44cd922e113dfbeb1292) ([merge request](nomad-lab/nomad-FAIR!1005)) -- [Adds an ELN schema that allows to create entries that clone data from a labfolder project.](nomad-lab/nomad-FAIR@166a8aaa65f63bf368453365689e1dab577fc94d) ([merge request](nomad-lab/nomad-FAIR!948)) +### Feature (1 change) + +- [Added a way to define formal models for metainfo annotations.](nomad-lab/nomad-FAIR@6a84b55e17dd5cd41cb5ba571f2451d528dbe6a0) ([merge request](nomad-lab/nomad-FAIR!990)) + +### Added (1 change) + +- [Replaced config object with pydantic models.](nomad-lab/nomad-FAIR@b9c1e023d95d14fd337b98a7ac895f505d4715a9) ([merge request](nomad-lab/nomad-FAIR!981)) diff --git a/nomad/app/v1/routers/auth.py b/nomad/app/v1/routers/auth.py index 0cb6910761..f5c88d6e6a 100644 --- a/nomad/app/v1/routers/auth.py +++ b/nomad/app/v1/routers/auth.py @@ -337,7 +337,7 @@ async def get_signature_token(user: User = Depends(create_user_dependency())): expires_at = datetime.datetime.utcnow() + datetime.timedelta(seconds=10) signature_token = jwt.encode( dict(user=user.user_id, exp=expires_at), - config.services.api_secret, 'HS256').decode('utf-8') + config.services.api_secret, 'HS256') return {'signature_token': signature_token} diff --git a/nomad/files.py b/nomad/files.py index 0059926c4e..01446aad78 100644 --- a/nomad/files.py +++ b/nomad/files.py @@ -44,7 +44,6 @@ original mainfile, and vice versa. ''' from abc import ABCMeta -import sys from typing import IO, Set, Dict, Iterable, Iterator, List, Tuple, Any, NamedTuple from functools import lru_cache from pydantic import BaseModel @@ -59,18 +58,12 @@ import io import json import yaml import magic +import zipfile from nomad import config, utils, datamodel from nomad.config.models import BundleImportSettings, BundleExportSettings from nomad.archive import write_archive, read_archive, ArchiveReader -# TODO this should become obsolete, once we are going beyong python 3.6. For now -# python 3.6's zipfile does not allow to seek/tell within a file-like opened from a -# file in a zipfile. -if sys.version_info >= (3, 7): - import zipfile -else: - import zipfile37 as zipfile decompress_file_extensions = ('.zip', '.tgz', '.gz', '.tar.gz', '.tar.bz2', '.tar') bundle_info_filename = 'bundle_info.json' diff --git a/pyproject.toml b/pyproject.toml index 2f39ca01aa..e8040fc41a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ dependencies = [ 'orjson==3.6.0', 'click>=7.1.2', 'requests==2.28.2', - 'pytz==2021.1', + 'pytz==2022.7.1', 'aniso8601==7.0.0', 'ase==3.19.0', 'python-keycloak==0.26.1', @@ -28,7 +28,7 @@ dependencies = [ 'pydantic==1.10.5', 'jmespath==0.10.0', 'h5grove>=1.0.0', - 'httpx==0.22.0', + 'httpx==0.23.3', 'memoization==0.4.0', 'rfc3161ng==2.1.3', 'lxml~=4.6', @@ -66,7 +66,7 @@ infrastructure = [ 'structlog', 'elasticsearch==7.17.1', 'msgpack', - 'celery[redis]==4.4.7', + 'celery[redis]==5.2.7', 'asgiref~=3.5', 'mongoengine>=0.20', 'pymongo==3.12.1', @@ -79,14 +79,13 @@ infrastructure = [ 'bagit==1.8.1', 'bcrypt==3.2.0', 'filelock==3.3.1', - 'pyjwt[crypto]==1.7.1', + 'pyjwt[crypto]==2.6.0', 'cryptography', 'jsonschema[format]==4.1.2', 'runstats==2.0.0', 'tabulate==0.8.9', 'bs4==0.0.1', 'html5lib==1.1', - 'zipfile37==0.1.3', 'basicauth==0.4.1', 'inflection==0.5.1', 'unidecode==1.3.2', @@ -99,9 +98,8 @@ infrastructure = [ 'python-multipart==0.0.5', 'jupyterhub==1.4.2', 'dockerspawner==12.1.0', - 'oauthenticator==14.2.0', + 'oauthenticator==15.1.0', 'validators==0.18.2', - 'aiofiles==0.8.0', 'joblib>=1.1.0', 'importlib-metadata~=4.13.0' # Needed because of https://github.com/python/importlib_metadata/issues/411 ] diff --git a/requirements-dev.txt b/requirements-dev.txt index b44223e29c..a21d7fb8ad 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,10 +4,9 @@ # # pip-compile --annotation-style=line --extra=dev --extra=infrastructure --extra=parsing --output-file=requirements-dev.txt dependencies/matid/pyproject.toml dependencies/nomad-dos-fingerprints/pyproject.toml dependencies/parsers/atomistic/pyproject.toml dependencies/parsers/database/pyproject.toml dependencies/parsers/eelsdb/pyproject.toml dependencies/parsers/electronic/pyproject.toml dependencies/parsers/nexus/pyproject.toml dependencies/parsers/workflow/pyproject.toml pyproject.toml requirements.txt # -aiofiles==0.8.0 # via -r requirements.txt, nomad-lab (pyproject.toml) alabaster==0.7.12 # via -r requirements.txt, sphinx alembic==1.9.1 # via -r requirements.txt, jupyterhub -amqp==2.6.1 # via -r requirements.txt, kombu +amqp==5.1.1 # via -r requirements.txt, kombu aniso8601==7.0.0 # via -r requirements.txt, nomad-lab (pyproject.toml) anyio==3.6.2 # via -r requirements.txt, httpcore, jupyter-server, starlette, watchfiles appnope==0.1.3 # via -r requirements.txt, ipykernel, ipython @@ -38,18 +37,21 @@ bleach==5.0.1 # via -r requirements.txt, nbconvert, readme-renderer bs4==0.0.1 # via -r requirements.txt, nomad-lab (pyproject.toml) build==0.9.0 # via nomad-lab (pyproject.toml), pip-tools cachetools==4.2.4 # via -r requirements.txt, nomad-lab (pyproject.toml) -celery[redis]==4.4.7 # via -r requirements.txt, nomad-lab (pyproject.toml) +celery[redis]==5.2.7 # via -r requirements.txt, nomad-lab (pyproject.toml) certifi==2022.12.7 # via -r requirements.txt, elasticsearch, httpcore, httpx, requests certipy==0.1.3 # via -r requirements.txt, jupyterhub cffi==1.15.1 # via -r requirements.txt, argon2-cffi-bindings, bcrypt, cryptography cftime==1.6.2 # via -r requirements.txt, netcdf4 -charset-normalizer==2.0.12 # via -r requirements.txt, httpx, requests -click==8.1.3 # via -r requirements.txt, asr, flask, mkdocs, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), pip-tools, uvicorn +charset-normalizer==2.0.12 # via -r requirements.txt, requests +click==8.1.3 # via -r requirements.txt, asr, celery, click-didyoumean, click-plugins, click-repl, flask, mkdocs, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), pip-tools, uvicorn +click-didyoumean==0.3.0 # via -r requirements.txt, celery +click-plugins==1.1.1 # via -r requirements.txt, celery +click-repl==0.2.0 # via -r requirements.txt, celery cloudpickle==2.2.0 # via -r requirements.txt, dask colorama==0.4.6 # via twine commonmark==0.9.1 # via -r requirements.txt, recommonmark coverage==6.5.0 # via pytest-cov -cryptography==39.0.0 # via -r requirements.txt, nomad-lab (pyproject.toml), pyjwt, pyopenssl, rfc3161ng +cryptography==39.0.0 # via -r requirements.txt, nomad-lab (pyproject.toml), pyjwt, pyopenssl, rfc3161ng, secretstorage cycler==0.11.0 # via -r requirements.txt, matplotlib dask[array]==2022.2.0 # via -r requirements.txt, hyperspy debugpy==1.6.5 # via -r requirements.txt, ipykernel @@ -88,16 +90,16 @@ gitpython==3.1.24 # via -r requirements.txt, nomad-lab (pyproject.toml) greenlet==2.0.1 # via -r requirements.txt, sqlalchemy griddataformats==0.7.0 # via -r requirements.txt, mdanalysis gsd==2.7.0 # via -r requirements.txt, mdanalysis -h11==0.12.0 # via -r requirements.txt, httpcore, uvicorn +h11==0.14.0 # via -r requirements.txt, httpcore, uvicorn h5grove==1.2.0 # via -r requirements.txt, jupyterlab-h5web, nomad-lab (pyproject.toml) h5py==3.6.0 # via -r requirements.txt, electronicparsers (dependencies/parsers/electronic/pyproject.toml), h5grove, h5py-wrapper, hyperspy, jupyterlab-h5web, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), phonopy, pyscf, workflowparsers (dependencies/parsers/workflow/pyproject.toml) h5py-wrapper==1.1.0 # via -r requirements.txt, hdfdict hdfdict @ git+https://github.com/shabihsherjeel/hdfdict@f48a586 # via -r requirements.txt, nexusutils (dependencies/parsers/nexus/pyproject.toml) hjson==3.0.2 # via -r requirements.txt, nomad-lab (pyproject.toml) html5lib==1.1 # via -r requirements.txt, nomad-lab (pyproject.toml) -httpcore==0.14.7 # via -r requirements.txt, httpx +httpcore==0.16.3 # via -r requirements.txt, httpx httptools==0.5.0 # via -r requirements.txt, uvicorn -httpx==0.22.0 # via -r requirements.txt, nomad-lab (pyproject.toml) +httpx==0.23.3 # via -r requirements.txt, nomad-lab (pyproject.toml) hyperspy==1.7.3 # via -r requirements.txt, nexusutils (dependencies/parsers/nexus/pyproject.toml) idna==3.4 # via -r requirements.txt, anyio, email-validator, jsonschema, requests, rfc3986 imageio==2.24.0 # via -r requirements.txt, hyperspy, scikit-image @@ -113,11 +115,12 @@ isort==4.3.21 # via pylint itsdangerous==2.0.1 # via -r requirements.txt, flask, nomad-lab (pyproject.toml) jaraco-classes==3.2.3 # via keyring jedi==0.18.2 # via -r requirements.txt, ipython +jeepney==0.8.0 # via keyring, secretstorage jinja2==3.0.3 # via -r requirements.txt, flask, hyperspy, jupyter-server, jupyterhub, mkdocs, mkdocs-macros-plugin, mkdocs-material, nbconvert, nomad-lab (pyproject.toml), sphinx jmespath==0.10.0 # via -r requirements.txt, nomad-lab (pyproject.toml) joblib==1.1.0 # via -r requirements.txt, mdanalysis, nomad-lab (pyproject.toml), scikit-learn jsonpointer==2.3 # via -r requirements.txt, jsonschema -jsonschema[format]==4.1.2 # via -r requirements.txt, jupyter-telemetry, nbformat, nomad-lab (pyproject.toml) +jsonschema[format]==4.1.2 # via -r requirements.txt, jupyter-telemetry, nbformat, nomad-lab (pyproject.toml), oauthenticator jupyter-client==7.4.8 # via -r requirements.txt, ipykernel, ipyparallel, jupyter-server, nbclient jupyter-core==4.12.0 # via -r requirements.txt, jupyter-client, jupyter-server, nbclient, nbconvert, nbformat jupyter-server==1.23.4 # via -r requirements.txt, jupyterlab-h5web @@ -127,7 +130,7 @@ jupyterlab-h5web==6.5.0 # via -r requirements.txt, nexusutils (dependencies/pa jupyterlab-pygments==0.2.2 # via -r requirements.txt, nbconvert keyring==23.11.0 # via twine kiwisolver==1.4.4 # via -r requirements.txt, matplotlib -kombu==4.6.11 # via -r requirements.txt, celery +kombu==5.2.4 # via -r requirements.txt, celery lark==1.1.5 # via -r requirements.txt, optimade latexcodec==2.0.1 # via -r requirements.txt, pybtex lazy-object-proxy==1.9.0 # via astroid @@ -154,7 +157,7 @@ mmtf-python==1.1.3 # via -r requirements.txt, mdanalysis mongoengine==0.25.0 # via -r requirements.txt, nomad-lab (pyproject.toml) mongomock==4.1.2 # via -r requirements.txt, optimade monty==2022.9.9 # via -r requirements.txt, emmet-core, mp-api, pymatgen -more-itertools==9.0.0 # via pytest +more-itertools==9.0.0 # via jaraco-classes, pytest mp-api==0.30.10 # via -r requirements.txt, pymatgen mpmath==1.2.1 # via -r requirements.txt, sympy mrcfile==1.4.3 # via -r requirements.txt, griddataformats @@ -174,7 +177,7 @@ numba==0.56.4 # via -r requirements.txt, hyperspy, sparse numcodecs==0.10.2 # via -r requirements.txt, zarr numexpr==2.8.4 # via -r requirements.txt, hyperspy numpy==1.21.6 # via -r requirements.txt, ase, biopython, cftime, dask, griddataformats, gsd, h5grove, h5py, hyperspy, imageio, matid (dependencies/matid/pyproject.toml), matplotlib, mdanalysis, mdtraj, mrcfile, netcdf4, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-dos-fingerprints (dependencies/nomad-dos-fingerprints/pyproject.toml), nptyping, numba, numcodecs, numexpr, pandas, phonopy, pymatgen, pyscf, pywavelets, scikit-image, scikit-learn, scipy, sparse, spglib, tifffile, xarray, xrdtools, zarr -oauthenticator==14.2.0 # via -r requirements.txt, nomad-lab (pyproject.toml) +oauthenticator==15.1.0 # via -r requirements.txt, nomad-lab (pyproject.toml) oauthlib==3.2.2 # via -r requirements.txt, jupyterhub openpyxl==3.0.9 # via -r requirements.txt, nomad-lab (pyproject.toml) optimade[mongo]==0.22.1 # via -r requirements.txt, nomad-lab (pyproject.toml) @@ -202,7 +205,7 @@ plotly==5.11.0 # via -r requirements.txt, asr, pymatgen pluggy==1.0.0 # via pytest prettytable==3.6.0 # via -r requirements.txt, hyperspy prometheus-client==0.15.0 # via -r requirements.txt, jupyter-server, jupyterhub -prompt-toolkit==3.0.36 # via -r requirements.txt, ipython +prompt-toolkit==3.0.36 # via -r requirements.txt, click-repl, ipython psutil==5.9.4 # via -r requirements.txt, ipykernel, ipyparallel ptyprocess==0.7.0 # via -r requirements.txt, pexpect, terminado py==1.11.0 # via pytest @@ -213,7 +216,7 @@ pycodestyle==2.8.0 # via nexusutils (dependencies/parsers/nexus/pyproject pycparser==2.21 # via -r requirements.txt, cffi pydantic==1.10.5 # via -r requirements.txt, emmet-core, fastapi, nomad-lab (pyproject.toml), optimade pygments==2.14.0 # via -r requirements.txt, ipython, mkdocs-material, nbconvert, readme-renderer, sphinx -pyjwt[crypto]==1.7.1 # via -r requirements.txt, nomad-lab (pyproject.toml) +pyjwt[crypto]==2.6.0 # via -r requirements.txt, nomad-lab (pyproject.toml) pylint==2.13.9 # via nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), pylint-mongoengine, pylint-plugin-utils pylint-mongoengine==0.4.0 # via nomad-lab (pyproject.toml) pylint-plugin-utils==0.7 # via nomad-lab (pyproject.toml), pylint-mongoengine @@ -237,7 +240,7 @@ python-keycloak==0.26.1 # via -r requirements.txt, nomad-lab (pyproject.toml) python-logstash==0.4.6 # via -r requirements.txt, nomad-lab (pyproject.toml) python-magic==0.4.24 # via -r requirements.txt, nomad-lab (pyproject.toml) python-multipart==0.0.5 # via -r requirements.txt, nomad-lab (pyproject.toml) -pytz==2021.1 # via -r requirements.txt, babel, celery, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), pandas +pytz==2022.7.1 # via -r requirements.txt, babel, celery, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), pandas pywavelets==1.3.0 # via -r requirements.txt, scikit-image pyyaml==6.0 # via -r requirements.txt, dask, hdfdict, hyperspy, mkdocs, mkdocs-macros-plugin, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), phonopy, pybtex, pyyaml-env-tag, uvicorn pyyaml-env-tag==0.1 # via mkdocs @@ -246,7 +249,7 @@ rdflib==5.0.0 # via -r requirements.txt, nomad-lab (pyproject.toml) readme-renderer==37.3 # via twine recommonmark==0.7.1 # via -r requirements.txt, nomad-lab (pyproject.toml) redis==4.4.2 # via -r requirements.txt, celery -requests==2.28.2 # via -r requirements.txt, docker, hyperspy, jupyterhub, mp-api, nomad-lab (pyproject.toml), optimade, pymatgen, python-gitlab, python-keycloak, requests-toolbelt, rfc3161ng, sphinx, twine +requests==2.28.2 # via -r requirements.txt, docker, hyperspy, jupyterhub, mp-api, nomad-lab (pyproject.toml), oauthenticator, optimade, pymatgen, python-gitlab, python-keycloak, requests-toolbelt, rfc3161ng, sphinx, twine requests-toolbelt==0.10.1 # via python-gitlab, twine rfc3161ng==2.1.3 # via -r requirements.txt, nomad-lab (pyproject.toml) rfc3339-validator==0.1.4 # via -r requirements.txt, jsonschema @@ -254,15 +257,16 @@ rfc3986[idna2008]==1.5.0 # via -r requirements.txt, httpx, twine rfc3987==1.3.8 # via -r requirements.txt, jsonschema rope==0.21.0 # via nomad-lab (pyproject.toml) rsa==4.9 # via -r requirements.txt, python-jose -ruamel-yaml==0.17.21 # via -r requirements.txt, jupyter-telemetry, pymatgen +ruamel-yaml==0.17.21 # via -r requirements.txt, jupyter-telemetry, oauthenticator, pymatgen ruamel-yaml-clib==0.2.7 # via -r requirements.txt, ruamel-yaml runstats==2.0.0 # via -r requirements.txt, nomad-lab (pyproject.toml) scikit-image==0.19.3 # via -r requirements.txt, hyperspy scikit-learn==1.0.2 # via -r requirements.txt, matid (dependencies/matid/pyproject.toml) scipy==1.7.1 # via -r requirements.txt, ase, atomisticparsers (dependencies/parsers/atomistic/pyproject.toml), griddataformats, hyperspy, matid (dependencies/matid/pyproject.toml), mdanalysis, mdtraj, nomad-lab (pyproject.toml), pymatgen, pyscf, scikit-image, scikit-learn, sparse +secretstorage==3.3.3 # via keyring send2trash==1.8.0 # via -r requirements.txt, jupyter-server sentinels==1.0.0 # via -r requirements.txt, mongomock -six==1.16.0 # via -r requirements.txt, asttokens, astunparse, basicauth, bcrypt, bleach, ecdsa, elasticsearch-dsl, griddataformats, html5lib, isodate, latexcodec, pybtex, pytest, python-dateutil, python-multipart, rdflib, rfc3339-validator, validators +six==1.16.0 # via -r requirements.txt, asttokens, astunparse, basicauth, bcrypt, bleach, click-repl, ecdsa, elasticsearch-dsl, griddataformats, html5lib, isodate, latexcodec, pybtex, pytest, python-dateutil, python-multipart, rdflib, rfc3339-validator, validators smmap==5.0.0 # via -r requirements.txt, gitdb sniffio==1.3.0 # via -r requirements.txt, anyio, httpcore, httpx snowballstemmer==2.2.0 # via -r requirements.txt, sphinx @@ -307,7 +311,7 @@ urllib3==1.26.14 # via -r requirements.txt, docker, elasticsearch, requ uvicorn[standard]==0.20.0 # via -r requirements.txt, nomad-lab (pyproject.toml) uvloop==0.17.0 # via -r requirements.txt, uvicorn validators==0.18.2 # via -r requirements.txt, nomad-lab (pyproject.toml) -vine==1.3.0 # via -r requirements.txt, amqp, celery +vine==5.0.0 # via -r requirements.txt, amqp, celery, kombu watchdog==2.1.9 # via mkdocs watchfiles==0.18.1 # via -r requirements.txt, uvicorn wcwidth==0.2.5 # via -r requirements.txt, prettytable, prompt-toolkit @@ -321,7 +325,6 @@ wrapt==1.12.1 # via -r requirements.txt, astroid, nomad-lab (pyproje xarray==0.20.2 # via -r requirements.txt, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), workflowparsers (dependencies/parsers/workflow/pyproject.toml) xrdtools==0.1.1 # via -r requirements.txt, nomad-lab (pyproject.toml) zarr==2.12.0 # via -r requirements.txt, hyperspy -zipfile37==0.1.3 # via -r requirements.txt, nomad-lab (pyproject.toml) zipp==3.11.0 # via -r requirements.txt, importlib-metadata zipstream-new==1.1.5 # via -r requirements.txt, nomad-lab (pyproject.toml) diff --git a/requirements.txt b/requirements.txt index 46e3dda812..892cb1a622 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,10 +4,9 @@ # # pip-compile --annotation-style=line --extra=infrastructure --extra=parsing --output-file=requirements.txt dependencies/matid/pyproject.toml dependencies/nomad-dos-fingerprints/pyproject.toml dependencies/parsers/atomistic/pyproject.toml dependencies/parsers/database/pyproject.toml dependencies/parsers/eelsdb/pyproject.toml dependencies/parsers/electronic/pyproject.toml dependencies/parsers/nexus/pyproject.toml dependencies/parsers/workflow/pyproject.toml pyproject.toml # -aiofiles==0.8.0 # via nomad-lab (pyproject.toml) alabaster==0.7.12 # via sphinx alembic==1.9.1 # via jupyterhub -amqp==2.6.1 # via kombu +amqp==5.1.1 # via kombu aniso8601==7.0.0 # via nomad-lab (pyproject.toml) anyio==3.6.2 # via httpcore, jupyter-server, starlette, watchfiles appnope==0.1.3 # via ipykernel, ipython @@ -34,13 +33,16 @@ bitarray==2.3.5 # via nomad-dos-fingerprints (dependencies/nomad-dos-f bleach==5.0.1 # via nbconvert bs4==0.0.1 # via nomad-lab (pyproject.toml) cachetools==4.2.4 # via nomad-lab (pyproject.toml) -celery[redis]==4.4.7 # via nomad-lab (pyproject.toml) +celery[redis]==5.2.7 # via nomad-lab (pyproject.toml) certifi==2022.12.7 # via elasticsearch, httpcore, httpx, requests certipy==0.1.3 # via jupyterhub cffi==1.15.1 # via argon2-cffi-bindings, bcrypt, cryptography cftime==1.6.2 # via netcdf4 -charset-normalizer==2.0.12 # via httpx, requests -click==8.1.3 # via asr, flask, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), uvicorn +charset-normalizer==2.0.12 # via requests +click==8.1.3 # via asr, celery, click-didyoumean, click-plugins, click-repl, flask, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), uvicorn +click-didyoumean==0.3.0 # via celery +click-plugins==1.1.1 # via celery +click-repl==0.2.0 # via celery cloudpickle==2.2.0 # via dask commonmark==0.9.1 # via recommonmark cryptography==39.0.0 # via nomad-lab (pyproject.toml), pyjwt, pyopenssl, rfc3161ng @@ -78,16 +80,16 @@ gitpython==3.1.24 # via nomad-lab (pyproject.toml) greenlet==2.0.1 # via sqlalchemy griddataformats==0.7.0 # via mdanalysis gsd==2.7.0 # via mdanalysis -h11==0.12.0 # via httpcore, uvicorn +h11==0.14.0 # via httpcore, uvicorn h5grove==1.2.0 # via jupyterlab-h5web, nomad-lab (pyproject.toml) h5py==3.6.0 # via electronicparsers (dependencies/parsers/electronic/pyproject.toml), h5grove, h5py-wrapper, hyperspy, jupyterlab-h5web, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), phonopy, pyscf, workflowparsers (dependencies/parsers/workflow/pyproject.toml) h5py-wrapper==1.1.0 # via hdfdict hdfdict @ git+https://github.com/shabihsherjeel/hdfdict@f48a586 # via nexusutils (dependencies/parsers/nexus/pyproject.toml) hjson==3.0.2 # via nomad-lab (pyproject.toml) html5lib==1.1 # via nomad-lab (pyproject.toml) -httpcore==0.14.7 # via httpx +httpcore==0.16.3 # via httpx httptools==0.5.0 # via uvicorn -httpx==0.22.0 # via nomad-lab (pyproject.toml) +httpx==0.23.3 # via nomad-lab (pyproject.toml) hyperspy==1.7.3 # via nexusutils (dependencies/parsers/nexus/pyproject.toml) idna==3.4 # via anyio, email-validator, jsonschema, requests, rfc3986 imageio==2.24.0 # via hyperspy, scikit-image @@ -105,7 +107,7 @@ jinja2==3.0.3 # via flask, hyperspy, jupyter-server, jupyterhub, nbc jmespath==0.10.0 # via nomad-lab (pyproject.toml) joblib==1.1.0 # via mdanalysis, nomad-lab (pyproject.toml), scikit-learn jsonpointer==2.3 # via jsonschema -jsonschema[format]==4.1.2 # via jupyter-telemetry, nbformat, nomad-lab (pyproject.toml) +jsonschema[format]==4.1.2 # via jupyter-telemetry, nbformat, nomad-lab (pyproject.toml), oauthenticator jupyter-client==7.4.8 # via ipykernel, ipyparallel, jupyter-server, nbclient jupyter-core==4.12.0 # via jupyter-client, jupyter-server, nbclient, nbconvert, nbformat jupyter-server==1.23.4 # via jupyterlab-h5web @@ -114,7 +116,7 @@ jupyterhub==1.4.2 # via dockerspawner, nomad-lab (pyproject.toml), oauth jupyterlab-h5web==6.5.0 # via nexusutils (dependencies/parsers/nexus/pyproject.toml) jupyterlab-pygments==0.2.2 # via nbconvert kiwisolver==1.4.4 # via matplotlib -kombu==4.6.11 # via celery +kombu==5.2.4 # via celery lark==1.1.5 # via optimade latexcodec==2.0.1 # via pybtex llvmlite==0.39.1 # via numba @@ -149,7 +151,7 @@ numba==0.56.4 # via hyperspy, sparse numcodecs==0.10.2 # via zarr numexpr==2.8.4 # via hyperspy numpy==1.21.6 # via ase, biopython, cftime, dask, griddataformats, gsd, h5grove, h5py, hyperspy, imageio, matid (dependencies/matid/pyproject.toml), matplotlib, mdanalysis, mdtraj, mrcfile, netcdf4, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-dos-fingerprints (dependencies/nomad-dos-fingerprints/pyproject.toml), nptyping, numba, numcodecs, numexpr, pandas, phonopy, pymatgen, pyscf, pywavelets, scikit-image, scikit-learn, scipy, sparse, spglib, tifffile, xarray, xrdtools, zarr -oauthenticator==14.2.0 # via nomad-lab (pyproject.toml) +oauthenticator==15.1.0 # via nomad-lab (pyproject.toml) oauthlib==3.2.2 # via jupyterhub openpyxl==3.0.9 # via nomad-lab (pyproject.toml) optimade[mongo]==0.22.1 # via nomad-lab (pyproject.toml) @@ -172,7 +174,7 @@ pint==0.17 # via hyperspy, nomad-lab (pyproject.toml) plotly==5.11.0 # via asr, pymatgen prettytable==3.6.0 # via hyperspy prometheus-client==0.15.0 # via jupyter-server, jupyterhub -prompt-toolkit==3.0.36 # via ipython +prompt-toolkit==3.0.36 # via click-repl, ipython psutil==5.9.4 # via ipykernel, ipyparallel ptyprocess==0.7.0 # via pexpect, terminado pyasn1==0.4.8 # via pyasn1-modules, python-jose, rfc3161ng, rsa @@ -181,7 +183,7 @@ pybtex==0.24.0 # via emmet-core, pymatgen pycparser==2.21 # via cffi pydantic==1.10.5 # via emmet-core, fastapi, nomad-lab (pyproject.toml), optimade pygments==2.14.0 # via ipython, nbconvert, sphinx -pyjwt[crypto]==1.7.1 # via nomad-lab (pyproject.toml) +pyjwt[crypto]==2.6.0 # via nomad-lab (pyproject.toml) pymatgen==2023.2.28 # via asr, emmet-core, mp-api, nomad-lab (pyproject.toml) pymongo==3.12.1 # via mongoengine, nomad-lab (pyproject.toml), optimade pyopenssl==23.0.0 # via certipy @@ -197,20 +199,20 @@ python-keycloak==0.26.1 # via nomad-lab (pyproject.toml) python-logstash==0.4.6 # via nomad-lab (pyproject.toml) python-magic==0.4.24 # via nomad-lab (pyproject.toml) python-multipart==0.0.5 # via nomad-lab (pyproject.toml) -pytz==2021.1 # via babel, celery, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), pandas +pytz==2022.7.1 # via babel, celery, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), pandas pywavelets==1.3.0 # via scikit-image pyyaml==6.0 # via dask, hdfdict, hyperspy, nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), phonopy, pybtex, uvicorn pyzmq==25.0.0 # via ipykernel, ipyparallel, jupyter-client, jupyter-server rdflib==5.0.0 # via nomad-lab (pyproject.toml) recommonmark==0.7.1 # via nomad-lab (pyproject.toml) redis==4.4.2 # via celery -requests==2.28.2 # via docker, hyperspy, jupyterhub, mp-api, nomad-lab (pyproject.toml), optimade, pymatgen, python-keycloak, rfc3161ng, sphinx +requests==2.28.2 # via docker, hyperspy, jupyterhub, mp-api, nomad-lab (pyproject.toml), oauthenticator, optimade, pymatgen, python-keycloak, rfc3161ng, sphinx rfc3161ng==2.1.3 # via nomad-lab (pyproject.toml) rfc3339-validator==0.1.4 # via jsonschema rfc3986[idna2008]==1.5.0 # via httpx rfc3987==1.3.8 # via jsonschema rsa==4.9 # via python-jose -ruamel-yaml==0.17.21 # via jupyter-telemetry, pymatgen +ruamel-yaml==0.17.21 # via jupyter-telemetry, oauthenticator, pymatgen ruamel-yaml-clib==0.2.7 # via ruamel-yaml runstats==2.0.0 # via nomad-lab (pyproject.toml) scikit-image==0.19.3 # via hyperspy @@ -218,7 +220,7 @@ scikit-learn==1.0.2 # via matid (dependencies/matid/pyproject.toml) scipy==1.7.1 # via ase, atomisticparsers (dependencies/parsers/atomistic/pyproject.toml), griddataformats, hyperspy, matid (dependencies/matid/pyproject.toml), mdanalysis, mdtraj, nomad-lab (pyproject.toml), pymatgen, pyscf, scikit-image, scikit-learn, sparse send2trash==1.8.0 # via jupyter-server sentinels==1.0.0 # via mongomock -six==1.16.0 # via astunparse, basicauth, bcrypt, bleach, ecdsa, elasticsearch-dsl, griddataformats, html5lib, isodate, latexcodec, pybtex, python-dateutil, python-multipart, rdflib, rfc3339-validator, validators +six==1.16.0 # via astunparse, basicauth, bcrypt, bleach, click-repl, ecdsa, elasticsearch-dsl, griddataformats, html5lib, isodate, latexcodec, pybtex, python-dateutil, python-multipart, rdflib, rfc3339-validator, validators smmap==5.0.0 # via gitdb sniffio==1.3.0 # via anyio, httpcore, httpx snowballstemmer==2.2.0 # via sphinx @@ -257,7 +259,7 @@ urllib3==1.26.14 # via docker, elasticsearch, requests uvicorn[standard]==0.20.0 # via nomad-lab (pyproject.toml) uvloop==0.17.0 # via uvicorn validators==0.18.2 # via nomad-lab (pyproject.toml) -vine==1.3.0 # via amqp, celery +vine==5.0.0 # via amqp, celery, kombu watchfiles==0.18.1 # via uvicorn wcwidth==0.2.5 # via prettytable, prompt-toolkit webcolors==1.12 # via jsonschema @@ -270,7 +272,6 @@ wrapt==1.12.1 # via nomad-lab (pyproject.toml) xarray==0.20.2 # via nexusutils (dependencies/parsers/nexus/pyproject.toml), nomad-lab (pyproject.toml), workflowparsers (dependencies/parsers/workflow/pyproject.toml) xrdtools==0.1.1 # via nomad-lab (pyproject.toml) zarr==2.12.0 # via hyperspy -zipfile37==0.1.3 # via nomad-lab (pyproject.toml) zipp==3.11.0 # via importlib-metadata zipstream-new==1.1.5 # via nomad-lab (pyproject.toml) diff --git a/tests/conftest.py b/tests/conftest.py index 79593cb47c..cffde080ba 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -70,10 +70,11 @@ indices = [elastic_test_entries_index, elastic_test_materials_index] warnings.simplefilter("ignore") - structlogging.ConsoleFormatter.short_format = True setattr(logging, 'Formatter', structlogging.ConsoleFormatter) +pytest_plugins = ("celery.contrib.pytest", ) + @pytest.fixture(scope='function') def tmp(): -- GitLab