From 55ac0948d2fb8a9af4c0845ee4140dcc8b6ce936 Mon Sep 17 00:00:00 2001 From: Florian Dobener Date: Thu, 30 Nov 2023 11:59:53 +0100 Subject: [PATCH] Python 3.11 support (#177) * Adds python 3.11 and 3.12 to tests and metadata * Fix testing ci and update dev-reqs * Fix pytest.yml * Updates dev-reqs * Let ci fail slowly * Don't pin nionswift dependency * Remove python 3.12 support * Don't break ci with coveralls * Refine project description --- .github/workflows/pytest.yml | 9 +- dev-requirements.txt | 344 ++++++++++++++++++++--------------- pyproject.toml | 7 +- 3 files changed, 206 insertions(+), 154 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 47bf354f3..ce6cd000e 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -13,8 +13,9 @@ jobs: pytest: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - python_version: ["3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3 @@ -31,14 +32,12 @@ jobs: python -m pip install coverage coveralls - name: Install package run: | - python -m pip install --no-deps . - - name: Install dev requirements - run: | - python -m pip install -r dev-requirements.txt + pip install ".[dev]" - name: Test with pytest run: | coverage run -m pytest -sv --show-capture=no tests - name: Submit to coveralls + continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | diff --git a/dev-requirements.txt b/dev-requirements.txt index 3ba04e52f..4e82c3866 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,52 +1,72 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # pip-compile --extra=dev --output-file=dev-requirements.txt pyproject.toml # -appdirs==1.4.4 - # via requests-cache +appnope==0.1.3 + # via + # ipykernel + # ipython asciitree==0.3.3 # via zarr -ase==3.19.0 +ase==3.22.1 # via # ifes-apt-tc-data-modeling # pynxtools (pyproject.toml) -asteval==0.9.29 +asteval==0.9.31 # via lmfit -astroid==2.15.5 +astroid==3.0.1 # via pylint -attrs==22.1.0 +asttokens==2.4.1 + # via stack-data +attrs==23.1.0 # via # cattrs # requests-cache backcall==0.2.0 # via ipython -build==0.10.0 +backports-zoneinfo==0.2.1 + # via + # pytz-deprecation-shim + # tzlocal +blosc2==2.0.0 + # via tables +build==1.0.3 # via pip-tools -cattrs==22.2.0 +cattrs==23.2.2 # via requests-cache -certifi==2022.9.24 +certifi==2023.11.17 # via requests -charset-normalizer==2.1.1 +charset-normalizer==3.3.2 # via requests -click==8.1.3 +click==8.1.7 # via + # dask # pip-tools # pynxtools (pyproject.toml) -cloudpickle==2.2.0 +cloudpickle==3.0.0 # via dask -coverage[toml]==6.5.0 - # via pytest-cov -cycler==0.11.0 +comm==0.2.0 + # via ipykernel +contourpy==1.1.1 + # via matplotlib +coverage[toml]==7.3.2 + # via + # coverage + # pytest-cov +cycler==0.12.1 # via matplotlib -dask[array]==2022.2.0 +cython==3.0.6 + # via tables +dask[array]==2023.5.0 # via + # dask # hyperspy # kikuchipy # orix # pyxem -debugpy==1.6.3 +debugpy==1.8.0 # via ipykernel decorator==5.1.1 # via @@ -57,45 +77,46 @@ diffpy-structure==3.1.0 # diffsims # kikuchipy # orix -diffsims==0.5.1 +diffsims==0.5.2 # via # kikuchipy # pyxem -dill==0.3.5.1 +dill==0.3.7 # via # hyperspy # pylint entrypoints==0.4 - # via - # ipyparallel - # jupyter-client - # numcodecs -exceptiongroup==1.1.0 + # via ipyparallel +exceptiongroup==1.2.0 # via # cattrs # pytest -fabio==2023.4.1 +executing==2.0.1 + # via stack-data +fabio==2023.10.0 # via # pyfai # silx -fasteners==0.18 +fasteners==0.19 # via zarr flatdict==4.0.1 # via pynxtools (pyproject.toml) -fonttools==4.37.4 +fonttools==4.45.1 # via matplotlib -fsspec==2022.8.2 +fsspec==2023.10.0 # via # dask # hyperspy future==0.18.3 # via uncertainties -gitdb==4.0.10 +gitdb==4.0.11 # via gitpython -gitpython==3.1.30 +gitpython==3.1.40 # via pynxtools (pyproject.toml) -h5py==3.7.0 +h5py==3.10.0 # via + # fabio + # hdf5plugin # hyperspy # ifes-apt-tc-data-modeling # kikuchipy @@ -103,17 +124,20 @@ h5py==3.7.0 # orix # pyfai # pynxtools (pyproject.toml) + # pyxem # silx -hyperspy==1.7.4 +hdf5plugin==4.3.0 + # via fabio +hyperspy==1.7.6 # via # kikuchipy # pynxtools (pyproject.toml) # pyxem -idna==3.4 +idna==3.6 # via requests -ifes-apt-tc-data-modeling==0.0.9 +ifes-apt-tc-data-modeling==0.1 # via pynxtools (pyproject.toml) -imageio==2.22.1 +imageio==2.27.0 # via # hyperspy # kikuchipy @@ -121,57 +145,63 @@ imageio==2.22.1 # nionswift-io # nionui # scikit-image -importlib-metadata==5.0.0 - # via hyperspy +importlib-metadata==6.8.0 + # via + # build + # dask + # hyperspy + # jupyter-client + # numba +importlib-resources==6.1.1 + # via + # matplotlib + # radioactivedecay iniconfig==2.0.0 # via pytest -ipykernel==6.16.0 - # via - # ipyparallel - # ipywidgets -ipyparallel==8.4.1 +ipykernel==6.27.1 + # via ipyparallel +ipyparallel==8.6.1 # via hyperspy -ipython==7.34.0 +ipython==8.12.3 # via # hyperspy # ipykernel # ipyparallel - # ipywidgets -ipywidgets==8.0.6 - # via pyxem -isort==5.10.1 +isort==5.12.0 # via pylint -jedi==0.18.1 +jedi==0.19.1 # via ipython jinja2==3.1.2 # via hyperspy -joblib==1.2.0 +joblib==1.3.2 # via scikit-learn -jupyter-client==7.3.5 +jupyter-client==8.6.0 # via # ipykernel # ipyparallel -jupyter-core==5.1.5 - # via jupyter-client -jupyterlab-widgets==3.0.7 - # via ipywidgets -kikuchipy==0.8.4 +jupyter-core==5.5.0 + # via + # ipykernel + # jupyter-client +kikuchipy==0.9.0 # via pynxtools (pyproject.toml) -kiwisolver==1.4.4 +kiwisolver==1.4.5 # via matplotlib -lark==1.1.5 +lark==1.1.8 # via pynxtools (pyproject.toml) -lazy-object-proxy==1.9.0 - # via astroid -llvmlite==0.39.1 +lazy-loader==0.3 + # via scikit-image +llvmlite==0.41.1 # via numba -lmfit==1.2.0 +lmfit==1.2.2 # via pyxem locket==1.0.0 # via partd -markupsafe==2.1.1 +lxml==4.9.3 + # via fabio +markupsafe==2.1.3 # via jinja2 -matplotlib==3.5.3 +matplotlib==3.7.4 # via # ase # diffsims @@ -192,21 +222,21 @@ mccabe==0.7.0 # via pylint mergedeep==1.3.4 # via pynxtools (pyproject.toml) -mpmath==1.2.1 +mpmath==1.3.0 # via sympy -mypy==1.2.0 +msgpack==1.0.7 + # via blosc2 +mypy==1.7.1 # via pynxtools (pyproject.toml) mypy-extensions==1.0.0 # via mypy nanonispy @ git+https://github.com/ramav87/nanonispy.git@a0da87c58482d29624a2bf5deecb763dd1274212 # via pynxtools (pyproject.toml) -natsort==8.2.0 +natsort==8.4.0 # via hyperspy -nest-asyncio==1.5.6 - # via - # ipykernel - # jupyter-client -networkx==2.6.3 +nest-asyncio==1.5.8 + # via ipykernel +networkx==3.1 # via # radioactivedecay # scikit-image @@ -226,7 +256,7 @@ nionutils==0.4.6 # nionswift # nionswift-io # nionui -numba==0.56.2 +numba==0.58.1 # via # diffsims # hyperspy @@ -234,15 +264,18 @@ numba==0.56.2 # orix # pyxem # sparse -numcodecs==0.10.2 +numcodecs==0.12.1 # via zarr -numexpr==2.8.3 +numexpr==2.8.5 # via # hyperspy # pyfai -numpy==1.21.6 + # pyxem + # tables +numpy==1.24.4 # via # ase + # contourpy # dask # diffsims # fabio @@ -264,6 +297,7 @@ numpy==1.21.6 # numpy-quaternion # orix # pandas + # pycifrw # pyfai # pynxtools (pyproject.toml) # pywavelets @@ -274,6 +308,7 @@ numpy==1.21.6 # scipy # silx # sparse + # tables # tifffile # xarray # zarr @@ -284,57 +319,62 @@ orix==0.11.1 # diffsims # kikuchipy # pyxem -packaging==21.3 +packaging==23.2 # via # build # dask # hyperspy # ipykernel # matplotlib - # numexpr - # pint # pooch # pytest # scikit-image -pandas==1.3.5 + # tables + # xarray +pandas==2.0.3 # via # ifes-apt-tc-data-modeling # pynxtools (pyproject.toml) # xarray parso==0.8.3 # via jedi -partd==1.3.0 +partd==1.4.1 # via dask -pexpect==4.8.0 +pexpect==4.9.0 # via ipython pickleshare==0.7.5 # via ipython -pillow==9.2.0 +pillow==10.0.1 # via + # fabio + # hyperspy # imageio # matplotlib # nionswift # scikit-image -pint==0.18 +pint==0.21.1 # via hyperspy -pip-tools==6.13.0 +pip-tools==7.3.0 # via pynxtools (pyproject.toml) -platformdirs==2.5.2 +platformdirs==4.0.0 # via # jupyter-core # pooch # pylint -pluggy==1.0.0 + # requests-cache +pluggy==1.3.0 # via pytest -pooch==1.7.0 +ply==3.11 + # via pycifrw +pooch==1.8.0 # via # kikuchipy # orix -prettytable==3.4.1 +prettytable==3.9.0 # via hyperspy -prompt-toolkit==3.0.31 +prompt-toolkit==3.0.41 # via ipython -psutil==5.9.2 +psutil==5.9.6 # via # diffsims # ipykernel @@ -342,30 +382,32 @@ psutil==5.9.2 # pyxem ptyprocess==0.7.0 # via pexpect -pycifrw==4.4.5 +pure-eval==0.2.2 + # via stack-data +py-cpuinfo==9.0.0 + # via tables +pycifrw==4.4.6 # via diffpy-structure -pycodestyle==2.9.1 +pycodestyle==2.11.1 # via pynxtools (pyproject.toml) -pyfai==2023.3.0 +pyfai==2023.9.0 # via pyxem -pygments==2.13.0 +pygments==2.17.2 # via ipython -pylint==2.17.2 +pylint==3.0.2 # via pynxtools (pyproject.toml) -pyparsing==3.0.9 - # via - # matplotlib - # packaging +pyparsing==3.1.1 + # via matplotlib pyproject-hooks==1.0.0 # via build -pytest==7.3.1 +pytest==7.4.3 # via # pynxtools (pyproject.toml) # pytest-cov # pytest-timeout -pytest-cov==4.0.0 +pytest-cov==4.1.0 # via pynxtools (pyproject.toml) -pytest-timeout==2.1.0 +pytest-timeout==2.2.0 # via pynxtools (pyproject.toml) python-dateutil==2.8.2 # via @@ -374,48 +416,48 @@ python-dateutil==2.8.2 # jupyter-client # matplotlib # pandas -pytz==2022.4 +pytz==2023.3.post1 # via # nionswift # pandas # pynxtools (pyproject.toml) pytz-deprecation-shim==0.1.0.post0 # via tzlocal -pywavelets==1.3.0 +pywavelets==1.4.1 # via scikit-image -pyxem==0.15.0 +pyxem==0.16.0 # via pynxtools (pyproject.toml) -pyyaml==6.0 +pyyaml==6.0.1 # via # dask # hyperspy # kikuchipy # pynxtools (pyproject.toml) -pyzmq==24.0.1 +pyzmq==25.1.1 # via # ipykernel # ipyparallel # jupyter-client -radioactivedecay==0.4.16 +radioactivedecay==0.4.21 # via ifes-apt-tc-data-modeling -requests==2.28.1 +requests==2.31.0 # via # hyperspy # pooch # pynxtools (pyproject.toml) # requests-cache -requests-cache==0.9.8 +requests-cache==1.1.1 # via pynxtools (pyproject.toml) -scikit-image==0.19.3 +scikit-image==0.20.0 # via # hyperspy # kikuchipy # pyxem -scikit-learn==1.2.2 +scikit-learn==1.3.2 # via # kikuchipy # pyxem -scipy==1.7.3 +scipy==1.9.1 # via # ase # diffsims @@ -436,22 +478,27 @@ silx==1.1.2 # via pyfai six==1.16.0 # via + # asttokens # diffpy-structure # python-dateutil # url-normalize -smmap==5.0.0 +smmap==5.0.1 # via gitdb -sparse==0.13.0 +sparse==0.14.0 # via hyperspy -structlog==23.1.0 +stack-data==0.6.3 + # via ipython +structlog==23.2.0 # via pynxtools (pyproject.toml) -sympy==1.10.1 +sympy==1.12 # via # hyperspy # radioactivedecay -threadpoolctl==3.1.0 +tables==3.8.0 + # via ifes-apt-tc-data-modeling +threadpoolctl==3.2.0 # via scikit-learn -tifffile==2021.11.2 +tifffile==2023.7.10 # via # hyperspy # scikit-image @@ -460,58 +507,64 @@ tomli==2.0.1 # build # coverage # mypy + # pip-tools # pylint # pyproject-hooks # pytest -tomlkit==0.11.7 +tomlkit==0.12.3 # via pylint toolz==0.12.0 # via # dask # hyperspy # partd -tornado==6.2 +tornado==6.3.3 # via # ipykernel # ipyparallel # jupyter-client -tqdm==4.64.1 +tqdm==4.66.1 # via # diffsims # hyperspy # ipyparallel # kikuchipy # orix -traitlets==5.4.0 + # pyxem +traitlets==5.14.0 # via + # comm # ipykernel # ipyparallel # ipython - # ipywidgets # jupyter-client # jupyter-core # matplotlib-inline -traits==6.4.1 - # via hyperspy +traits==6.4.3 + # via + # hyperspy + # pyxem transforms3d==0.4.1 # via # diffsims # pyxem -types-pytz==2022.6.0.1 +types-pytz==2023.3.1.1 # via pynxtools (pyproject.toml) -types-pyyaml==6.0.12 +types-pyyaml==6.0.12.12 # via pynxtools (pyproject.toml) -types-requests==2.28.11.12 +types-requests==2.31.0.10 # via pynxtools (pyproject.toml) -types-urllib3==1.26.25.5 - # via types-requests -typing-extensions==4.3.0 +typing-extensions==4.8.0 # via # astroid + # cattrs + # ipython # mypy - # numcodecs + # pylint tzdata==2023.3 - # via pytz-deprecation-shim + # via + # pandas + # pytz-deprecation-shim tzlocal==4.3 # via # nionswift @@ -520,28 +573,27 @@ uncertainties==3.1.7 # via lmfit url-normalize==1.4.3 # via requests-cache -urllib3==1.26.12 +urllib3==2.1.0 # via # requests # requests-cache -wcwidth==0.2.5 + # types-requests +wcwidth==0.2.12 # via # prettytable # prompt-toolkit -wheel==0.40.0 +wheel==0.42.0 # via pip-tools -widgetsnbextension==4.0.7 - # via ipywidgets -wrapt==1.14.1 - # via astroid -xarray==0.20.2 +xarray==2023.1.0 # via pynxtools (pyproject.toml) -zarr==2.12.0 +zarr==2.16.1 # via hyperspy zipfile37==0.1.3 # via pynxtools (pyproject.toml) -zipp==3.8.1 - # via importlib-metadata +zipp==3.17.0 + # via + # importlib-metadata + # importlib-resources # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/pyproject.toml b/pyproject.toml index 60baa601a..4d3911480 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,14 +9,15 @@ dynamic = ["version"] authors = [ { name = "The NOMAD Authors" }, ] -description = "Extend NeXus for materials science experiment and serve as a NOMAD parser implementation for NeXus." +description = "Extend NeXus for experiments and characterization in Materials Science and Materials Engineering and serve as a NOMAD parser implementation for NeXus." readme = "README.md" license = { file = "LICENSE" } -requires-python = ">=3.8,<3.11" +requires-python = ">=3.8,!=3.12" classifiers = [ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", ] @@ -36,7 +37,7 @@ dependencies = [ "kikuchipy>=0.8.2", "pyxem>=0.14.2", "zipfile37==0.1.3", - "nionswift==0.16.8", + "nionswift>=0.16.8", "tzlocal<=4.3", "scipy>=1.7.1", "lark>=1.1.5",