From fdfdd34ae2c97f3ae4d36de7a020aff79282521e Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Mon, 12 Feb 2024 14:27:35 +0100 Subject: [PATCH] MAINT: update pip constraints and pre-commit (#517) Co-authored-by: GitHub Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .constraints/py3.10.txt | 137 +++++++++--------- .constraints/py3.11.txt | 137 +++++++++--------- .constraints/py3.8.txt | 99 ++++++------- .constraints/py3.9.txt | 135 ++++++++--------- .github/dependabot.yml | 10 -- .github/workflows/ci.yml | 3 +- .github/workflows/release-drafter.yml | 2 +- .github/workflows/requirements.yml | 3 +- .gitpod.yml | 3 +- .pre-commit-config.yaml | 93 ++++++------ .vscode/extensions.json | 6 +- .vscode/settings.json | 3 + docs/amplitude-analysis.ipynb | 3 + .../analytic-continuation.ipynb | 1 + docs/conf.py | 2 +- docs/install.md | 8 +- docs/usage.ipynb | 5 + docs/usage/basics.ipynb | 13 ++ docs/usage/binned-fit.ipynb | 1 + docs/usage/caching.ipynb | 1 + docs/usage/chi-squared.ipynb | 3 +- docs/usage/faster-lambdify.ipynb | 3 + docs/usage/unbinned-fit.ipynb | 1 + pyproject.toml | 46 +++++- src/tensorwaves/data/phasespace.py | 2 +- src/tensorwaves/data/rng.py | 4 +- src/tensorwaves/estimator.py | 4 +- src/tensorwaves/interface.py | 2 +- src/tensorwaves/optimizer/callbacks.py | 6 +- src/tensorwaves/optimizer/scipy.py | 2 +- tests/data/test_data.py | 4 +- tests/optimizer/test_fit_simple_model.py | 2 +- 32 files changed, 399 insertions(+), 345 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index 1e6d6643..dd360ae4 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -4,10 +4,10 @@ # # pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.10.txt --strip-extras --unsafe-package=pip --unsafe-package=setuptools --unsafe-package=tensorwaves # -absl-py==2.0.0 +absl-py==2.1.0 accessible-pygments==0.0.4 alabaster==0.7.16 -ampform==0.14.8 +ampform==0.14.10 anyio==4.2.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 @@ -17,12 +17,12 @@ astunparse==1.6.3 async-lru==2.0.4 attrs==23.2.0 babel==2.14.0 -beautifulsoup4==4.12.2 -black==23.12.1 +beautifulsoup4==4.12.3 +black==24.1.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -32,9 +32,9 @@ cloudpickle==3.0.0 colorama==0.4.6 comm==0.2.1 contourpy==1.2.0 -coverage==7.4.0 +coverage==7.4.1 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 @@ -47,39 +47,39 @@ executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 flatbuffers==23.5.26 -fonttools==4.47.2 +fonttools==4.48.1 fqdn==1.5.1 gast==0.5.4 gitdb==4.0.11 gitpython==3.1.41 -google-auth==2.26.2 +google-auth==2.27.0 google-auth-oauthlib==1.2.0 google-pasta==0.2.0 graphviz==0.20.1 greenlet==3.0.3 -grpcio==1.60.0 +grpcio==1.60.1 h5py==3.10.0 hepunits==2.3.3 -identify==2.5.33 +identify==2.5.34 idna==3.6 imagesize==1.4.1 -iminuit==2.24.0 +iminuit==2.25.2 importlib-metadata==7.0.1 iniconfig==2.0.0 -ipykernel==6.28.0 +ipykernel==6.29.2 ipympl==0.9.3 -ipython==8.20.0 +ipython==8.21.0 ipython-genutils==0.2.0 -ipywidgets==8.1.1 +ipywidgets==8.1.2 isoduration==20.11.0 isort==5.13.2 -jax==0.4.23 -jaxlib==0.4.23 +jax==0.4.24 +jaxlib==0.4.24 jedi==0.19.1 jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter==1.0.0 jupyter-cache==1.0.0 @@ -87,27 +87,27 @@ jupyter-client==8.6.0 jupyter-console==6.6.3 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.2 +jupyter-server==2.12.5 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.0.12 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 +jupyterlab-lsp==5.0.3 jupyterlab-myst==2.1.0 jupyterlab-pygments==0.3.0 jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.10 keras==2.15.0 kiwisolver==1.4.5 libclang==16.0.6 livereload==2.6.3 -llvmlite==0.41.1 +llvmlite==0.42.0 lsprotocol==2023.0.1 markdown==3.5.2 markdown-it-py==3.0.0 -markupsafe==2.1.3 +markupsafe==2.1.5 matplotlib==3.8.2 matplotlib-inline==0.1.6 mdit-py-plugins==0.4.0 @@ -120,46 +120,47 @@ mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==2.0.0 nbclient==0.6.8 -nbconvert==7.14.1 +nbconvert==7.16.0 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.0 +nest-asyncio==1.6.0 nodeenv==1.8.0 -notebook==7.0.6 +notebook==7.0.8 notebook-shim==0.2.3 -numba==0.58.1 -numpy==1.26.3 +numba==0.59.0 +numpy==1.26.4 oauthlib==3.2.2 opt-einsum==3.3.0 -overrides==7.4.0 +overrides==7.7.0 packaging==23.2 -pandas==2.1.4 -pandocfilters==1.5.0 +pandas==2.2.0 +pandocfilters==1.5.1 parso==0.8.3 particle==0.23.1 pathspec==0.12.1 pexpect==4.9.0 phasespace==1.9.0 pillow==10.2.0 -platformdirs==4.1.0 -pluggy==1.3.0 -pre-commit==3.6.0 +platformdirs==4.2.0 +pluggy==1.4.0 +pre-commit==3.6.1 prometheus-client==0.19.0 prompt-toolkit==3.0.43 -protobuf==4.23.4 -psutil==5.9.7 +protobuf==4.25.2 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 py-cpuinfo==9.0.0 +pyarrow==15.0.0 pyasn1==0.5.1 pyasn1-modules==0.3.0 pycparser==2.21 -pydata-sphinx-theme==0.15.1 +pydata-sphinx-theme==0.15.2 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.0 pytest-benchmark==4.0.0 pytest-cov==4.1.0 pytest-mock==3.12.0 @@ -168,25 +169,25 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.2 -python-lsp-server==1.9.0 +python-lsp-ruff==2.1.0 +python-lsp-server==1.10.0 pytoolconfig==1.3.1 -pytz==2023.3.post1 +pytz==2024.1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 qtconsole==5.5.1 qtpy==2.4.1 -referencing==0.32.1 +referencing==0.33.0 requests==2.31.0 requests-oauthlib==1.3.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 -rope==1.11.0 -rpds-py==0.16.2 +rope==1.12.0 +rpds-py==0.17.1 rsa==4.9 -ruff==0.1.13 -scipy==1.11.4 +ruff==0.2.1 +scipy==1.12.0 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -195,50 +196,50 @@ snowballstemmer==2.2.0 soupsieve==2.5 sphinx==7.2.6 sphinx-api-relink==0.0.8 -sphinx-autobuild==2021.3.14 +sphinx-autobuild==2024.2.4 sphinx-book-theme==1.1.0 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 -sphinx-thebe==0.3.0 +sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.7 -sphinxcontrib-devhelp==1.0.5 -sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-applehelp==1.0.8 +sphinxcontrib-devhelp==1.0.6 +sphinxcontrib-htmlhelp==2.0.5 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.6 -sphinxcontrib-serializinghtml==1.1.9 +sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-serializinghtml==1.1.10 sphobjinv==2.3.1 -sqlalchemy==2.0.25 +sqlalchemy==2.0.26 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 -tensorboard==2.15.1 +tensorboard==2.15.2 tensorboard-data-server==0.7.2 tensorflow==2.15.0 tensorflow-estimator==2.15.0 -tensorflow-io-gcs-filesystem==0.35.0 +tensorflow-io-gcs-filesystem==0.36.0 tensorflow-probability==0.23.0 termcolor==2.4.0 terminado==0.18.0 tinycss2==1.2.1 tomli==2.0.1 tornado==6.4 -tox==4.12.0 -tqdm==4.66.1 +tox==4.12.1 +tqdm==4.66.2 traitlets==5.14.1 -types-protobuf==4.24.0.20240106 +types-protobuf==4.24.0.20240129 types-python-dateutil==2.8.19.20240106 types-pyyaml==6.0.12.12 -types-requests==2.31.0.20240106 -types-tensorflow==2.12.0.20240106 +types-requests==2.31.0.20240125 +types-tensorflow==2.15.0.20240206 types-tqdm==4.66.0.20240106 typing-extensions==4.9.0 -tzdata==2023.4 +tzdata==2024.1 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 +urllib3==2.2.0 virtualenv==20.25.0 wcwidth==0.2.13 webcolors==1.13 @@ -246,7 +247,7 @@ webencodings==0.5.1 websocket-client==1.7.0 werkzeug==3.0.1 wheel==0.42.0 -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.10 wrapt==1.14.1 zipp==3.17.0 diff --git a/.constraints/py3.11.txt b/.constraints/py3.11.txt index a53e2219..6b4c86bc 100644 --- a/.constraints/py3.11.txt +++ b/.constraints/py3.11.txt @@ -4,10 +4,10 @@ # # pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.11.txt --strip-extras --unsafe-package=pip --unsafe-package=setuptools --unsafe-package=tensorwaves # -absl-py==2.0.0 +absl-py==2.1.0 accessible-pygments==0.0.4 alabaster==0.7.16 -ampform==0.14.8 +ampform==0.14.10 anyio==4.2.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 @@ -17,12 +17,12 @@ astunparse==1.6.3 async-lru==2.0.4 attrs==23.2.0 babel==2.14.0 -beautifulsoup4==4.12.2 -black==23.12.1 +beautifulsoup4==4.12.3 +black==24.1.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -32,9 +32,9 @@ cloudpickle==3.0.0 colorama==0.4.6 comm==0.2.1 contourpy==1.2.0 -coverage==7.4.0 +coverage==7.4.1 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 @@ -46,39 +46,39 @@ executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 flatbuffers==23.5.26 -fonttools==4.47.2 +fonttools==4.48.1 fqdn==1.5.1 gast==0.5.4 gitdb==4.0.11 gitpython==3.1.41 -google-auth==2.26.2 +google-auth==2.27.0 google-auth-oauthlib==1.2.0 google-pasta==0.2.0 graphviz==0.20.1 greenlet==3.0.3 -grpcio==1.60.0 +grpcio==1.60.1 h5py==3.10.0 hepunits==2.3.3 -identify==2.5.33 +identify==2.5.34 idna==3.6 imagesize==1.4.1 -iminuit==2.24.0 +iminuit==2.25.2 importlib-metadata==7.0.1 iniconfig==2.0.0 -ipykernel==6.28.0 +ipykernel==6.29.2 ipympl==0.9.3 -ipython==8.20.0 +ipython==8.21.0 ipython-genutils==0.2.0 -ipywidgets==8.1.1 +ipywidgets==8.1.2 isoduration==20.11.0 isort==5.13.2 -jax==0.4.23 -jaxlib==0.4.23 +jax==0.4.24 +jaxlib==0.4.24 jedi==0.19.1 jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter==1.0.0 jupyter-cache==1.0.0 @@ -86,27 +86,27 @@ jupyter-client==8.6.0 jupyter-console==6.6.3 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.2 +jupyter-server==2.12.5 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.0.12 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 +jupyterlab-lsp==5.0.3 jupyterlab-myst==2.1.0 jupyterlab-pygments==0.3.0 jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.10 keras==2.15.0 kiwisolver==1.4.5 libclang==16.0.6 livereload==2.6.3 -llvmlite==0.41.1 +llvmlite==0.42.0 lsprotocol==2023.0.1 markdown==3.5.2 markdown-it-py==3.0.0 -markupsafe==2.1.3 +markupsafe==2.1.5 matplotlib==3.8.2 matplotlib-inline==0.1.6 mdit-py-plugins==0.4.0 @@ -119,46 +119,47 @@ mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==2.0.0 nbclient==0.6.8 -nbconvert==7.14.1 +nbconvert==7.16.0 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.0 +nest-asyncio==1.6.0 nodeenv==1.8.0 -notebook==7.0.6 +notebook==7.0.8 notebook-shim==0.2.3 -numba==0.58.1 -numpy==1.26.3 +numba==0.59.0 +numpy==1.26.4 oauthlib==3.2.2 opt-einsum==3.3.0 -overrides==7.4.0 +overrides==7.7.0 packaging==23.2 -pandas==2.1.4 -pandocfilters==1.5.0 +pandas==2.2.0 +pandocfilters==1.5.1 parso==0.8.3 particle==0.23.1 pathspec==0.12.1 pexpect==4.9.0 phasespace==1.9.0 pillow==10.2.0 -platformdirs==4.1.0 -pluggy==1.3.0 -pre-commit==3.6.0 +platformdirs==4.2.0 +pluggy==1.4.0 +pre-commit==3.6.1 prometheus-client==0.19.0 prompt-toolkit==3.0.43 -protobuf==4.23.4 -psutil==5.9.7 +protobuf==4.25.2 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 py-cpuinfo==9.0.0 +pyarrow==15.0.0 pyasn1==0.5.1 pyasn1-modules==0.3.0 pycparser==2.21 -pydata-sphinx-theme==0.15.1 +pydata-sphinx-theme==0.15.2 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.0 pytest-benchmark==4.0.0 pytest-cov==4.1.0 pytest-mock==3.12.0 @@ -167,25 +168,25 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.2 -python-lsp-server==1.9.0 +python-lsp-ruff==2.1.0 +python-lsp-server==1.10.0 pytoolconfig==1.3.1 -pytz==2023.3.post1 +pytz==2024.1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 qtconsole==5.5.1 qtpy==2.4.1 -referencing==0.32.1 +referencing==0.33.0 requests==2.31.0 requests-oauthlib==1.3.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 -rope==1.11.0 -rpds-py==0.16.2 +rope==1.12.0 +rpds-py==0.17.1 rsa==4.9 -ruff==0.1.13 -scipy==1.11.4 +ruff==0.2.1 +scipy==1.12.0 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -194,49 +195,49 @@ snowballstemmer==2.2.0 soupsieve==2.5 sphinx==7.2.6 sphinx-api-relink==0.0.8 -sphinx-autobuild==2021.3.14 +sphinx-autobuild==2024.2.4 sphinx-book-theme==1.1.0 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 -sphinx-thebe==0.3.0 +sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.7 -sphinxcontrib-devhelp==1.0.5 -sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-applehelp==1.0.8 +sphinxcontrib-devhelp==1.0.6 +sphinxcontrib-htmlhelp==2.0.5 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.6 -sphinxcontrib-serializinghtml==1.1.9 +sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-serializinghtml==1.1.10 sphobjinv==2.3.1 -sqlalchemy==2.0.25 +sqlalchemy==2.0.26 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 -tensorboard==2.15.1 +tensorboard==2.15.2 tensorboard-data-server==0.7.2 tensorflow==2.15.0 tensorflow-estimator==2.15.0 -tensorflow-io-gcs-filesystem==0.35.0 +tensorflow-io-gcs-filesystem==0.36.0 tensorflow-probability==0.23.0 termcolor==2.4.0 terminado==0.18.0 tinycss2==1.2.1 tornado==6.4 -tox==4.12.0 -tqdm==4.66.1 +tox==4.12.1 +tqdm==4.66.2 traitlets==5.14.1 -types-protobuf==4.24.0.20240106 +types-protobuf==4.24.0.20240129 types-python-dateutil==2.8.19.20240106 types-pyyaml==6.0.12.12 -types-requests==2.31.0.20240106 -types-tensorflow==2.12.0.20240106 +types-requests==2.31.0.20240125 +types-tensorflow==2.15.0.20240206 types-tqdm==4.66.0.20240106 typing-extensions==4.9.0 -tzdata==2023.4 +tzdata==2024.1 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 +urllib3==2.2.0 virtualenv==20.25.0 wcwidth==0.2.13 webcolors==1.13 @@ -244,7 +245,7 @@ webencodings==0.5.1 websocket-client==1.7.0 werkzeug==3.0.1 wheel==0.42.0 -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.10 wrapt==1.14.1 zipp==3.17.0 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index 3183348d..bdc179e5 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -4,10 +4,10 @@ # # pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.8.txt --strip-extras --unsafe-package=pip --unsafe-package=setuptools --unsafe-package=tensorwaves # -absl-py==2.0.0 +absl-py==2.1.0 accessible-pygments==0.0.4 alabaster==0.7.13 -ampform==0.14.8 +ampform==0.14.10 anyio==4.2.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 @@ -18,12 +18,12 @@ async-lru==2.0.4 attrs==23.2.0 babel==2.14.0 backcall==0.2.0 -beautifulsoup4==4.12.2 -black==23.12.1 +beautifulsoup4==4.12.3 +black==24.1.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -33,9 +33,9 @@ cloudpickle==3.0.0 colorama==0.4.6 comm==0.2.1 contourpy==1.1.1 -coverage==7.4.0 +coverage==7.4.1 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 @@ -48,31 +48,31 @@ executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 flatbuffers==23.5.26 -fonttools==4.47.2 +fonttools==4.48.1 fqdn==1.5.1 gast==0.4.0 gitdb==4.0.11 gitpython==3.1.41 -google-auth==2.26.2 +google-auth==2.27.0 google-auth-oauthlib==0.4.6 google-pasta==0.2.0 graphviz==0.20.1 greenlet==3.0.3 -grpcio==1.60.0 +grpcio==1.60.1 h5py==3.10.0 hepunits==2.3.3 -identify==2.5.33 +identify==2.5.34 idna==3.6 imagesize==1.4.1 -iminuit==2.24.0 +iminuit==2.25.2 importlib-metadata==7.0.1 importlib-resources==6.1.1 iniconfig==2.0.0 -ipykernel==6.28.0 +ipykernel==6.29.2 ipympl==0.9.3 ipython==8.12.3 ipython-genutils==0.2.0 -ipywidgets==8.1.1 +ipywidgets==8.1.2 isoduration==20.11.0 isort==5.13.2 jax==0.4.13 @@ -81,7 +81,7 @@ jedi==0.19.1 jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter==1.0.0 jupyter-cache==0.6.1 @@ -89,18 +89,18 @@ jupyter-client==8.6.0 jupyter-console==6.6.3 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.2 +jupyter-server==2.12.5 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.0.12 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 +jupyterlab-lsp==5.0.3 jupyterlab-myst==2.1.0 jupyterlab-pygments==0.3.0 jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.10 keras==2.11.0 kiwisolver==1.4.5 libclang==16.0.6 @@ -109,7 +109,7 @@ llvmlite==0.41.1 lsprotocol==2023.0.1 markdown==3.5.2 markdown-it-py==2.2.0 -markupsafe==2.1.3 +markupsafe==2.1.5 matplotlib==3.7.4 matplotlib-inline==0.1.6 mdit-py-plugins==0.3.5 @@ -122,22 +122,22 @@ mypy-extensions==1.0.0 myst-nb==0.17.2 myst-parser==0.18.1 nbclient==0.6.8 -nbconvert==7.14.1 +nbconvert==7.16.0 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.0 +nest-asyncio==1.6.0 nodeenv==1.8.0 -notebook==7.0.6 +notebook==7.0.8 notebook-shim==0.2.3 numba==0.58.1 numpy==1.24.4 oauthlib==3.2.2 opt-einsum==3.3.0 -overrides==7.4.0 +overrides==7.7.0 packaging==23.2 pandas==2.0.3 -pandocfilters==1.5.0 +pandocfilters==1.5.1 parso==0.8.3 particle==0.23.1 pathspec==0.12.1 @@ -146,16 +146,17 @@ phasespace==1.9.0 pickleshare==0.7.5 pillow==10.2.0 pkgutil-resolve-name==1.3.10 -platformdirs==4.1.0 -pluggy==1.3.0 +platformdirs==4.2.0 +pluggy==1.4.0 pre-commit==3.5.0 prometheus-client==0.19.0 prompt-toolkit==3.0.43 protobuf==3.19.6 -psutil==5.9.7 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 py-cpuinfo==9.0.0 +pyarrow==15.0.0 pyasn1==0.5.1 pyasn1-modules==0.3.0 pycparser==2.21 @@ -163,7 +164,7 @@ pydata-sphinx-theme==0.14.4 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.0 pytest-benchmark==4.0.0 pytest-cov==4.1.0 pytest-mock==3.12.0 @@ -172,24 +173,24 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.2 -python-lsp-server==1.9.0 +python-lsp-ruff==2.1.0 +python-lsp-server==1.10.0 pytoolconfig==1.3.1 -pytz==2023.3.post1 +pytz==2024.1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 qtconsole==5.5.1 qtpy==2.4.1 -referencing==0.32.1 +referencing==0.33.0 requests==2.31.0 requests-oauthlib==1.3.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 -rope==1.11.0 -rpds-py==0.16.2 +rope==1.12.0 +rpds-py==0.17.1 rsa==4.9 -ruff==0.1.13 +ruff==0.2.1 scipy==1.10.1 send2trash==1.8.2 six==1.16.0 @@ -205,7 +206,7 @@ sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 -sphinx-thebe==0.3.0 +sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 @@ -214,7 +215,7 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 sphobjinv==2.3.1 -sqlalchemy==2.0.25 +sqlalchemy==2.0.26 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 @@ -230,20 +231,20 @@ terminado==0.18.0 tinycss2==1.2.1 tomli==2.0.1 tornado==6.4 -tox==4.12.0 -tqdm==4.66.1 +tox==4.12.1 +tqdm==4.66.2 traitlets==5.14.1 -types-protobuf==4.24.0.20240106 +types-protobuf==4.24.0.20240129 types-python-dateutil==2.8.19.20240106 types-pyyaml==6.0.12.12 -types-requests==2.31.0.20240106 -types-tensorflow==2.12.0.20240106 +types-requests==2.31.0.20240125 +types-tensorflow==2.15.0.20240206 types-tqdm==4.66.0.20240106 typing-extensions==4.9.0 -tzdata==2023.4 +tzdata==2024.1 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 +urllib3==2.2.0 virtualenv==20.25.0 wcwidth==0.2.13 webcolors==1.13 @@ -251,7 +252,7 @@ webencodings==0.5.1 websocket-client==1.7.0 werkzeug==3.0.1 wheel==0.42.0 -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.10 wrapt==1.16.0 zipp==3.17.0 diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index e84b422b..59f2a779 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -4,10 +4,10 @@ # # pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.9.txt --strip-extras --unsafe-package=pip --unsafe-package=setuptools --unsafe-package=tensorwaves # -absl-py==2.0.0 +absl-py==2.1.0 accessible-pygments==0.0.4 alabaster==0.7.16 -ampform==0.14.8 +ampform==0.14.10 anyio==4.2.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 @@ -17,12 +17,12 @@ astunparse==1.6.3 async-lru==2.0.4 attrs==23.2.0 babel==2.14.0 -beautifulsoup4==4.12.2 -black==23.12.1 +beautifulsoup4==4.12.3 +black==24.1.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -32,9 +32,9 @@ cloudpickle==3.0.0 colorama==0.4.6 comm==0.2.1 contourpy==1.2.0 -coverage==7.4.0 +coverage==7.4.1 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 @@ -47,40 +47,40 @@ executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 flatbuffers==23.5.26 -fonttools==4.47.2 +fonttools==4.48.1 fqdn==1.5.1 gast==0.5.4 gitdb==4.0.11 gitpython==3.1.41 -google-auth==2.26.2 +google-auth==2.27.0 google-auth-oauthlib==1.2.0 google-pasta==0.2.0 graphviz==0.20.1 greenlet==3.0.3 -grpcio==1.60.0 +grpcio==1.60.1 h5py==3.10.0 hepunits==2.3.3 -identify==2.5.33 +identify==2.5.34 idna==3.6 imagesize==1.4.1 -iminuit==2.24.0 +iminuit==2.25.2 importlib-metadata==7.0.1 importlib-resources==6.1.1 iniconfig==2.0.0 -ipykernel==6.28.0 +ipykernel==6.29.2 ipympl==0.9.3 ipython==8.18.1 ipython-genutils==0.2.0 -ipywidgets==8.1.1 +ipywidgets==8.1.2 isoduration==20.11.0 isort==5.13.2 -jax==0.4.23 -jaxlib==0.4.23 +jax==0.4.24 +jaxlib==0.4.24 jedi==0.19.1 jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter==1.0.0 jupyter-cache==1.0.0 @@ -88,27 +88,27 @@ jupyter-client==8.6.0 jupyter-console==6.6.3 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.2 +jupyter-server==2.12.5 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.0.12 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 +jupyterlab-lsp==5.0.3 jupyterlab-myst==2.1.0 jupyterlab-pygments==0.3.0 jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.10 keras==2.15.0 kiwisolver==1.4.5 libclang==16.0.6 livereload==2.6.3 -llvmlite==0.41.1 +llvmlite==0.42.0 lsprotocol==2023.0.1 markdown==3.5.2 markdown-it-py==3.0.0 -markupsafe==2.1.3 +markupsafe==2.1.5 matplotlib==3.8.2 matplotlib-inline==0.1.6 mdit-py-plugins==0.4.0 @@ -121,46 +121,47 @@ mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==2.0.0 nbclient==0.6.8 -nbconvert==7.14.1 +nbconvert==7.16.0 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.0 +nest-asyncio==1.6.0 nodeenv==1.8.0 -notebook==7.0.6 +notebook==7.0.8 notebook-shim==0.2.3 -numba==0.58.1 -numpy==1.26.3 +numba==0.59.0 +numpy==1.26.4 oauthlib==3.2.2 opt-einsum==3.3.0 -overrides==7.4.0 +overrides==7.7.0 packaging==23.2 -pandas==2.1.4 -pandocfilters==1.5.0 +pandas==2.2.0 +pandocfilters==1.5.1 parso==0.8.3 particle==0.23.1 pathspec==0.12.1 pexpect==4.9.0 phasespace==1.9.0 pillow==10.2.0 -platformdirs==4.1.0 -pluggy==1.3.0 -pre-commit==3.6.0 +platformdirs==4.2.0 +pluggy==1.4.0 +pre-commit==3.6.1 prometheus-client==0.19.0 prompt-toolkit==3.0.43 -protobuf==4.23.4 -psutil==5.9.7 +protobuf==4.25.2 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 py-cpuinfo==9.0.0 +pyarrow==15.0.0 pyasn1==0.5.1 pyasn1-modules==0.3.0 pycparser==2.21 -pydata-sphinx-theme==0.15.1 +pydata-sphinx-theme==0.15.2 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.0 pytest-benchmark==4.0.0 pytest-cov==4.1.0 pytest-mock==3.12.0 @@ -169,25 +170,25 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.2 -python-lsp-server==1.9.0 +python-lsp-ruff==2.1.0 +python-lsp-server==1.10.0 pytoolconfig==1.3.1 -pytz==2023.3.post1 +pytz==2024.1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 qtconsole==5.5.1 qtpy==2.4.1 -referencing==0.32.1 +referencing==0.33.0 requests==2.31.0 requests-oauthlib==1.3.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 -rope==1.11.0 -rpds-py==0.16.2 +rope==1.12.0 +rpds-py==0.17.1 rsa==4.9 -ruff==0.1.13 -scipy==1.11.4 +ruff==0.2.1 +scipy==1.12.0 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -196,50 +197,50 @@ snowballstemmer==2.2.0 soupsieve==2.5 sphinx==7.2.6 sphinx-api-relink==0.0.8 -sphinx-autobuild==2021.3.14 +sphinx-autobuild==2024.2.4 sphinx-book-theme==1.1.0 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 -sphinx-thebe==0.3.0 +sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.7 -sphinxcontrib-devhelp==1.0.5 -sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-applehelp==1.0.8 +sphinxcontrib-devhelp==1.0.6 +sphinxcontrib-htmlhelp==2.0.5 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.6 -sphinxcontrib-serializinghtml==1.1.9 +sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-serializinghtml==1.1.10 sphobjinv==2.3.1 -sqlalchemy==2.0.25 +sqlalchemy==2.0.26 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 -tensorboard==2.15.1 +tensorboard==2.15.2 tensorboard-data-server==0.7.2 tensorflow==2.15.0 tensorflow-estimator==2.15.0 -tensorflow-io-gcs-filesystem==0.35.0 +tensorflow-io-gcs-filesystem==0.36.0 tensorflow-probability==0.23.0 termcolor==2.4.0 terminado==0.18.0 tinycss2==1.2.1 tomli==2.0.1 tornado==6.4 -tox==4.12.0 -tqdm==4.66.1 +tox==4.12.1 +tqdm==4.66.2 traitlets==5.14.1 -types-protobuf==4.24.0.20240106 +types-protobuf==4.24.0.20240129 types-python-dateutil==2.8.19.20240106 types-pyyaml==6.0.12.12 -types-requests==2.31.0.20240106 -types-tensorflow==2.12.0.20240106 +types-requests==2.31.0.20240125 +types-tensorflow==2.15.0.20240206 types-tqdm==4.66.0.20240106 typing-extensions==4.9.0 -tzdata==2023.4 +tzdata==2024.1 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 +urllib3==2.2.0 virtualenv==20.25.0 wcwidth==0.2.13 webcolors==1.13 @@ -247,7 +248,7 @@ webencodings==0.5.1 websocket-client==1.7.0 werkzeug==3.0.1 wheel==0.42.0 -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.10 wrapt==1.14.1 zipp==3.17.0 diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index a1322e2d..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,10 +0,0 @@ -version: 2 -updates: - - package-ecosystem: github-actions - directory: "/" - assignees: - - redeboer - labels: - - 🖱️ DX - schedule: - interval: monthly diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0615dfa..5a5998fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,8 @@ name: CI concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: |- + ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }} env: PYTHONHASHSEED: "0" diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index d64f197b..52340935 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -11,6 +11,6 @@ jobs: update_release_draft: runs-on: ubuntu-22.04 steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/requirements.yml b/.github/workflows/requirements.yml index 32b95f19..6716e974 100644 --- a/.github/workflows/requirements.yml +++ b/.github/workflows/requirements.yml @@ -2,7 +2,8 @@ name: Requirements concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: |- + ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }} on: pull_request: diff --git a/.gitpod.yml b/.gitpod.yml index 17bad74a..66885089 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -30,9 +30,8 @@ vscode: - ms-vsliveshare.vsliveshare - redhat.vscode-yaml - ryanluker.vscode-coverage-gutters - - Soulcode.vscode-unwanted-extensions + - soulcode.vscode-unwanted-extensions - stkb.rewrap - streetsidesoftware.code-spell-checker - tamasfe.even-better-toml - - tyriar.sort-lines - yzhang.markdown-all-in-one diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 65d7f9e2..54895f99 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,8 +14,33 @@ repos: - id: check-hooks-apply - id: check-useless-excludes + - repo: https://github.com/kynan/nbstripout + rev: 0.7.1 + hooks: + - id: nbstripout + args: + - --extra-keys + - | + cell.attachments + cell.metadata.code_folding + cell.metadata.id + cell.metadata.pycharm + cell.metadata.user_expressions + metadata.celltoolbar + metadata.colab.name + metadata.colab.provenance + metadata.interpreter + metadata.notify_time + metadata.toc + metadata.toc-autonumbering + metadata.toc-showcode + metadata.toc-showmarkdowntxt + metadata.toc-showtags + metadata.varInspector + metadata.vscode + - repo: https://github.com/ComPWA/policy - rev: 0.2.0 + rev: 0.2.4 hooks: - id: check-dev-files args: @@ -62,7 +87,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black - id: black-jupyter @@ -74,8 +99,24 @@ repos: hooks: - id: blacken-docs + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v4.0.0-alpha.8 + hooks: + - id: prettier + + - repo: https://github.com/ComPWA/mirrors-taplo + rev: v0.8.1 + hooks: + - id: taplo + + - repo: https://github.com/pappasam/toml-sort + rev: v0.23.1 + hooks: + - id: toml-sort + args: + - --in-place - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.27.3 + rev: 0.28.0 hooks: - id: check-jsonschema name: Check CITATION.cff @@ -113,56 +154,14 @@ repos: types: - python - - repo: https://github.com/kynan/nbstripout - rev: 0.6.1 - hooks: - - id: nbstripout - args: - - --extra-keys - - | - cell.attachments - cell.metadata.code_folding - cell.metadata.id - cell.metadata.pycharm - cell.metadata.user_expressions - metadata.celltoolbar - metadata.colab.name - metadata.colab.provenance - metadata.interpreter - metadata.notify_time - metadata.toc - metadata.toc-autonumbering - metadata.toc-showcode - metadata.toc-showmarkdowntxt - metadata.toc-showtags - metadata.varInspector - metadata.vscode - - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.8 - hooks: - - id: prettier - - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.345 + rev: v1.1.350 hooks: - id: pyright - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.13 + rev: v0.2.1 hooks: - id: ruff args: [--fix] types_or: [python, pyi, jupyter] - - - repo: https://github.com/ComPWA/mirrors-taplo - rev: v0.8.1 - hooks: - - id: taplo - - - repo: https://github.com/pappasam/toml-sort - rev: v0.23.1 - hooks: - - id: toml-sort - args: - - --in-place diff --git a/.vscode/extensions.json b/.vscode/extensions.json index a90a5fa2..0b9a95b2 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -16,11 +16,10 @@ "ms-vsliveshare.vsliveshare", "redhat.vscode-yaml", "ryanluker.vscode-coverage-gutters", - "Soulcode.vscode-unwanted-extensions", + "soulcode.vscode-unwanted-extensions", "stkb.rewrap", "streetsidesoftware.code-spell-checker", "tamasfe.even-better-toml", - "tyriar.sort-lines", "yzhang.markdown-all-in-one" ], "unwantedRecommendations": [ @@ -30,6 +29,7 @@ "ms-python.flake8", "ms-python.isort", "ms-python.pylint", - "travisillig.vscode-json-stable-stringify" + "travisillig.vscode-json-stable-stringify", + "tyriar.sort-lines" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index dec80666..442ff76b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -42,6 +42,7 @@ "git.rebaseWhenSync": true, "github-actions.workflows.pinned.refresh.enabled": true, "github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"], + "gitlens.telemetry.enabled": false, "json.schemas": [ { "fileMatch": ["*particle*.json"], @@ -63,6 +64,7 @@ "python.testing.pytestArgs": ["--color=no", "--no-cov"], "python.testing.pytestEnabled": true, "python.testing.unittestEnabled": false, + "redhat.telemetry.enabled": false, "rewrap.wrappingColumn": 88, "ruff.enable": true, "ruff.organizeImports": true, @@ -71,6 +73,7 @@ "benchmarks/**/__init__.py": true, "tests/**/__init__.py": true }, + "telemetry.telemetryLevel": "off", "yaml.schemas": { "https://citation-file-format.github.io/1.2.0/schema.json": "CITATION.cff", "https://json.schemastore.org/github-workflow.json": "./.github/workflows/requirements.yml" diff --git a/docs/amplitude-analysis.ipynb b/docs/amplitude-analysis.ipynb index bbbe9506..cebc5954 100644 --- a/docs/amplitude-analysis.ipynb +++ b/docs/amplitude-analysis.ipynb @@ -749,6 +749,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "import matplotlib.pyplot as plt\n", "\n", "resonances = sorted(\n", @@ -1217,6 +1218,7 @@ "outputs": [], "source": [ "%timeit -n1 intensity_func(data)\n", + "\n", "%timeit -n1 optimized_function(data_real)" ] }, @@ -1384,6 +1386,7 @@ "outputs": [], "source": [ "%timeit -n1 intensity_func(data_real)\n", + "\n", "%timeit -n1 cached_function(cached_data)" ] }, diff --git a/docs/amplitude-analysis/analytic-continuation.ipynb b/docs/amplitude-analysis/analytic-continuation.ipynb index c2df027e..d7c06870 100644 --- a/docs/amplitude-analysis/analytic-continuation.ipynb +++ b/docs/amplitude-analysis/analytic-continuation.ipynb @@ -257,6 +257,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "import numpy as np\n", "\n", "phsp = helicity_transformer(phsp_momenta)\n", diff --git a/docs/conf.py b/docs/conf.py index 50cf8789..3ba765a6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -198,7 +198,7 @@ def get_tensorflow_url() -> str: "ampform": (f"https://ampform.readthedocs.io/en/{pin('ampform')}", None), "compwa": ("https://compwa.github.io", None), "graphviz": ("https://graphviz.readthedocs.io/en/stable", None), - "iminuit": ("https://iminuit.readthedocs.io/en/stable", None), + "iminuit": ("https://scikit-hep.org/iminuit", None), "jax": ("https://jax.readthedocs.io/en/latest", None), "matplotlib": (f"https://matplotlib.org/{pin('matplotlib')}", None), "numpy": (f"https://numpy.org/doc/{pin_minor('numpy')}", None), diff --git a/docs/install.md b/docs/install.md index 9218d906..08f44931 100644 --- a/docs/install.md +++ b/docs/install.md @@ -104,15 +104,13 @@ run into trouble. ``` 4. Download and install cuDNN following - [these instructions](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html). + [these instructions](https://docs.nvidia.com/deeplearning/cudnn/installation/overview.html). Make sure that you download cuDNN **for CUDA 11.x**! In Ubuntu (Debian), there are two convenient options: (1) - [installing through `apt`](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#package-manager-ubuntu-install) + [installing through `apt`](https://docs.nvidia.com/deeplearning/cudnn/installation/linux.html#package-manager-installation) or (2) - [using a local installer](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux-deb). - You may need to - [create an NVIDIA account](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#download). + [using a local installer](https://docs.nvidia.com/deeplearning/cudnn/installation/linux.html#package-manager-local-installation). 5. **[Recommended]** Install JAX with GPU binaries in your {ref}`virtual environment ` following diff --git a/docs/usage.ipynb b/docs/usage.ipynb index 1186e491..8299c192 100644 --- a/docs/usage.ipynb +++ b/docs/usage.ipynb @@ -192,6 +192,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "import matplotlib.pyplot as plt\n", "\n", "fig, ax = plt.subplots(figsize=(5, 3))\n", @@ -247,6 +248,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "%matplotlib widget\n", "import matplotlib.pyplot as plt\n", "from matplotlib.animation import PillowWriter\n", @@ -376,6 +378,7 @@ "outputs": [], "source": [ "%%capture\n", + "\n", "plt.ion()" ] }, @@ -545,6 +548,7 @@ "outputs": [], "source": [ "%timeit -n3 numpy_function(data)\n", + "\n", "%timeit -n3 tf_function(data)\n", "%timeit -n3 jax_function(data)" ] @@ -774,6 +778,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['png']\n", + "\n", "%matplotlib widget\n", "import ipywidgets\n", "import matplotlib.pyplot as plt\n", diff --git a/docs/usage/basics.ipynb b/docs/usage/basics.ipynb index edf7cc0f..97452502 100644 --- a/docs/usage/basics.ipynb +++ b/docs/usage/basics.ipynb @@ -226,6 +226,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "parameter_defaults = {\n", " a: 0.15,\n", " b: 0.05,\n", @@ -369,6 +370,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "fig, ax = plt.subplots()\n", "ax.scatter(x_values, y_values)\n", "ax.set_xlabel(\"$x$\")\n", @@ -425,6 +427,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "x_domain = np.linspace(0, 5, num=200)\n", "y_values = function_1d({\"x\": x_domain})\n", "fig, ax = plt.subplots(figsize=(8, 5))\n", @@ -570,6 +573,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['png']\n", + "\n", "plt.hist(\n", " domain[\"x\"],\n", " bins=200,\n", @@ -643,6 +647,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['png']\n", + "\n", "plt.hist(data[\"x\"], bins=200);" ] }, @@ -702,6 +707,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['png']\n", + "\n", "plt.hist(data[\"x\"], bins=200, density=True)\n", "plt.hist(\n", " domain[\"x\"],\n", @@ -812,6 +818,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['png']\n", + "\n", "plt.hist(data[\"x\"], bins=200, density=True)\n", "plt.hist(\n", " domain[\"x\"],\n", @@ -884,6 +891,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "fit_traceback = pd.read_csv(\"traceback-1D.csv\")\n", "fig, (ax1, ax2) = plt.subplots(\n", " nrows=2, figsize=(7, 9), sharex=True, gridspec_kw={\"height_ratios\": [1, 2]}\n", @@ -974,6 +982,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['png']\n", + "\n", "y_range = (y, -sp.pi, +sp.pi)\n", "substituted_expr_2d = expression_2d.subs(parameter_defaults)\n", "plot3d(substituted_expr_2d, x_range, y_range);" @@ -1028,6 +1037,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "fig, axes = plt.subplots(1, 2, figsize=(8, 3))\n", "intensities = np.array(function_2d(domain_2d))\n", "kwargs = {\n", @@ -1086,6 +1096,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['png']\n", + "\n", "fig, axes = plt.subplots(ncols=2, figsize=(9, 4), sharey=True, tight_layout=True)\n", "axes[0].hist2d(**data_2d, bins=50)\n", "axes[1].hist2d(**domain_2d, weights=function_2d(domain_2d), bins=50)\n", @@ -1240,6 +1251,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['png']\n", + "\n", "fig, axes = plt.subplots(1, 2, figsize=(9, 4), sharey=True, tight_layout=True)\n", "fig.suptitle(\"Final fit result\")\n", "axes[0].hist2d(**data_2d, bins=50)\n", @@ -1275,6 +1287,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "minuit_traceback = pd.read_csv(\"traceback.csv\")\n", "scipy_traceback = pd.read_csv(\"traceback-scipy.csv\")\n", "fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(\n", diff --git a/docs/usage/binned-fit.ipynb b/docs/usage/binned-fit.ipynb index 27784202..24cb1cd8 100644 --- a/docs/usage/binned-fit.ipynb +++ b/docs/usage/binned-fit.ipynb @@ -107,6 +107,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "import matplotlib.pyplot as plt\n", "\n", "fig, ax = plt.subplots(figsize=(8, 5))\n", diff --git a/docs/usage/caching.ipynb b/docs/usage/caching.ipynb index 0af1235e..25d94174 100644 --- a/docs/usage/caching.ipynb +++ b/docs/usage/caching.ipynb @@ -527,6 +527,7 @@ "outputs": [], "source": [ "%timeit -n100 original_func(domain)\n", + "\n", "%timeit -n100 cached_func(cached_domain)" ] } diff --git a/docs/usage/chi-squared.ipynb b/docs/usage/chi-squared.ipynb index 81b15450..36c259b0 100644 --- a/docs/usage/chi-squared.ipynb +++ b/docs/usage/chi-squared.ipynb @@ -170,11 +170,12 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['svg']\n", + "\n", "import matplotlib.pyplot as plt\n", "\n", "\n", "def compare_model(function, x_values, observed_y):\n", - " fig, ax = plt.subplots(figsize=(8, 4))\n", + " _, ax = plt.subplots(figsize=(8, 4))\n", " linear_domain = {\"x\": np.linspace(x_min, x_max, 100)}\n", " ax.plot(\n", " linear_domain[\"x\"],\n", diff --git a/docs/usage/faster-lambdify.ipynb b/docs/usage/faster-lambdify.ipynb index 403308d0..8f55f4be 100644 --- a/docs/usage/faster-lambdify.ipynb +++ b/docs/usage/faster-lambdify.ipynb @@ -310,6 +310,7 @@ "outputs": [], "source": [ "%%time\n", + "\n", "split_function = fast_lambdify(\n", " expression,\n", " sorted_symbols,\n", @@ -351,6 +352,7 @@ "outputs": [], "source": [ "%%time\n", + "\n", "normal_function = sp.lambdify(sorted_symbols, expression)" ] }, @@ -394,6 +396,7 @@ "outputs": [], "source": [ "%%time\n", + "\n", "function = create_parametrized_function(\n", " expression=model.expression.doit(),\n", " parameters=model.parameter_defaults,\n", diff --git a/docs/usage/unbinned-fit.ipynb b/docs/usage/unbinned-fit.ipynb index 35eb9c4a..cc36b67c 100644 --- a/docs/usage/unbinned-fit.ipynb +++ b/docs/usage/unbinned-fit.ipynb @@ -110,6 +110,7 @@ "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['png']\n", + "\n", "import matplotlib as mpl\n", "import matplotlib.pyplot as plt\n", "\n", diff --git a/pyproject.toml b/pyproject.toml index 8fc469ec..cebb7688 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -146,6 +146,7 @@ tensorflow = [ test = [ "ampform >=0.13", # https://github.com/ComPWA/ampform/issues/208 "nbmake", + "pyarrow", # https://github.com/pandas-dev/pandas/issues/54466 "pytest-benchmark", "pytest-cov", "pytest-xdist", @@ -263,11 +264,15 @@ exclude = [ "**/__pycache__", "**/_build", ] +reportArgumentType = false +reportAttributeAccessIssue = false reportGeneralTypeIssues = false reportMissingParameterType = false reportMissingTypeArgument = false reportMissingTypeStubs = false +reportOperatorIssue = false reportPrivateImportUsage = false +reportReturnType = false reportUnboundVariable = false reportUnknownArgumentType = false reportUnknownLambdaType = false @@ -300,6 +305,7 @@ filterwarnings = [ "ignore:ml_dtypes\\.float8.*:DeprecationWarning", "ignore:module 'sre_constants' is deprecated:DeprecationWarning", "ignore:numpy.ufunc size changed, may indicate binary incompatibility.*:RuntimeWarning", + "ignore:os\\.fork\\(\\) was called\\. os\\.fork\\(\\) is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock\\.:RuntimeWarning", "ignore:unclosed .*:ResourceWarning", ] markers = ["slow: marks tests as slow (select with '-m slow')"] @@ -317,6 +323,15 @@ testpaths = [ [tool.ruff] extend-exclude = ["typings"] extend-include = ["*.ipynb"] +preview = true +show-fixes = true +src = [ + "src", + "tests", +] +target-version = "py38" + +[tool.ruff.lint] extend-select = [ "A", "B", @@ -361,19 +376,17 @@ ignore = [ "D407", "D416", "E501", + "PLW1514", "RUF012", "S307", "SIM108", ] -show-fixes = true -src = [ - "src", - "tests", -] -target-version = "py38" task-tags = ["cspell"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.isort] +split-on-trailing-comma = false + +[tool.ruff.lint.per-file-ignores] "*.ipynb" = [ "B018", "C90", @@ -388,6 +401,7 @@ task-tags = ["cspell"] "PLW0603", "S101", "S301", + "S403", "T20", "TCH00", ] @@ -397,8 +411,11 @@ task-tags = ["cspell"] ] "benchmarks/*" = [ "D", + "PLC0415", "PLR0913", + "PLR0917", "PLR2004", + "PLR6301", "S101", ] "docs/*" = [ @@ -411,21 +428,34 @@ task-tags = ["cspell"] "docs/conf.py" = [ "A001", "D100", + "S404", ] "setup.py" = ["D100"] +"src/tensorwaves/function/_backend.py" = ["PLC0415"] +"src/tensorwaves/function/sympy/__init__.py" = ["PLC0415"] "tests/*" = [ "D", "INP001", "PGH001", + "PLC0415", + "PLC2701", "PLR0913", + "PLR0914", + "PLR0917", "PLR2004", + "PLR6301", "S101", "T20", ] -[tool.ruff.pydocstyle] +[tool.ruff.lint.pydocstyle] convention = "google" +[tool.ruff.lint.pylint] +allow-dunder-method-names = [ + "_repr_pretty_", +] + [tool.tomlsort] all = false ignore_case = true diff --git a/src/tensorwaves/data/phasespace.py b/src/tensorwaves/data/phasespace.py index 09d4fc87..f72fd9a0 100644 --- a/src/tensorwaves/data/phasespace.py +++ b/src/tensorwaves/data/phasespace.py @@ -101,7 +101,7 @@ def __init__( final_state_masses: Mapping[int, float], ) -> None: try: - import phasespace + import phasespace # noqa: PLC0415 except ImportError: # pragma: no cover raise_missing_module_error("phasespace", extras_require="phsp") diff --git a/src/tensorwaves/data/rng.py b/src/tensorwaves/data/rng.py index 9ff2c546..a85b9bc3 100644 --- a/src/tensorwaves/data/rng.py +++ b/src/tensorwaves/data/rng.py @@ -47,7 +47,7 @@ class TFUniformRealNumberGenerator(RealNumberGenerator): def __init__(self, seed: float | None = None): try: - from tensorflow import float64 + from tensorflow import float64 # noqa: PLC0415 except ImportError: # pragma: no cover raise_missing_module_error("tensorflow", extras_require="tf") @@ -80,7 +80,7 @@ def _get_tensorflow_rng(seed: SeedLike | None = None) -> tf.random.Generator: https://github.com/zfit/phasespace/blob/5998e2b/phasespace/random.py#L15-L41 """ try: - import tensorflow as tf + import tensorflow as tf # noqa: PLC0415 except ImportError: # pragma: no cover raise_missing_module_error("tensorflow", extras_require="tf") diff --git a/src/tensorwaves/estimator.py b/src/tensorwaves/estimator.py index d3ac9816..7f75b54b 100644 --- a/src/tensorwaves/estimator.py +++ b/src/tensorwaves/estimator.py @@ -78,7 +78,7 @@ def gradient_creator( ) -> Callable[[Mapping[str, ParameterValue]], dict[str, ParameterValue]]: if backend == "jax": try: - import jax + import jax # noqa: PLC0415 except ImportError: # pragma: no cover raise_missing_module_error("jax", extras_require="jax") @@ -86,7 +86,7 @@ def gradient_creator( return jax.grad(function) def raise_gradient_not_implemented( - parameters: Mapping[str, ParameterValue] + parameters: Mapping[str, ParameterValue], ) -> dict[str, ParameterValue]: msg = f"Gradient not implemented for back-end {backend}." raise NotImplementedError(msg) diff --git a/src/tensorwaves/interface.py b/src/tensorwaves/interface.py index 0ea1345d..3e0777d3 100644 --- a/src/tensorwaves/interface.py +++ b/src/tensorwaves/interface.py @@ -137,7 +137,7 @@ def _check_parameter_errors( def _repr_pretty_(self, p: PrettyPrinter, cycle: bool) -> None: class_name = type(self).__name__ - if cycle: + if cycle: # noqa: PLR1702 p.text(f"{class_name}(...)") else: with p.group(indent=1, open=f"{class_name}("): diff --git a/src/tensorwaves/optimizer/callbacks.py b/src/tensorwaves/optimizer/callbacks.py index 277dcd4b..34b93c90 100644 --- a/src/tensorwaves/optimizer/callbacks.py +++ b/src/tensorwaves/optimizer/callbacks.py @@ -47,7 +47,7 @@ def on_function_call_end( ) -> None: ... -class CallbackList(Callback): +class CallbackList(Callback): # noqa: PLW1641 """Class for combining `Callback` s. Combine different `Callback` classes in to a chain as follows: @@ -238,7 +238,7 @@ def __init__( def on_optimize_start(self, logs: dict[str, Any] | None = None) -> None: try: - import tensorflow as tf + import tensorflow as tf # noqa: PLC0415 except ImportError: # pragma: no cover raise_missing_module_error("tensorflow", extras_require="tf") @@ -261,7 +261,7 @@ def on_function_call_end( self, function_call: int, logs: dict[str, Any] | None = None ) -> None: try: - import tensorflow as tf + import tensorflow as tf # noqa: PLC0415 except ImportError: # pragma: no cover raise_missing_module_error("tensorflow", extras_require="tf") diff --git a/src/tensorwaves/optimizer/scipy.py b/src/tensorwaves/optimizer/scipy.py index c3c293a8..24cada82 100644 --- a/src/tensorwaves/optimizer/scipy.py +++ b/src/tensorwaves/optimizer/scipy.py @@ -43,7 +43,7 @@ def optimize( # noqa: C901 initial_parameters: Mapping[str, ParameterValue], ) -> FitResult: try: - from scipy.optimize import minimize + from scipy.optimize import minimize # noqa: PLC0415 except ImportError: # pragma: no cover raise_missing_module_error("scipy", extras_require="scipy") diff --git a/tests/data/test_data.py b/tests/data/test_data.py index 0c6ca3d6..18ba420a 100644 --- a/tests/data/test_data.py +++ b/tests/data/test_data.py @@ -121,7 +121,7 @@ def generate(self, size: int, rng: RealNumberGenerator) -> DataSample: sample = gen_with_progress.generate(10, rng) assert sample == {"x": 1} captured = capsys.readouterr() - assert captured.err != "" + assert captured.err for show_progress in [False, True]: gen_with_progress.show_progress = show_progress @@ -129,7 +129,7 @@ def generate(self, size: int, rng: RealNumberGenerator) -> DataSample: assert gen_with_progress.show_progress is show_progress assert sample == {"x": 1} captured = capsys.readouterr() - assert captured.err == "" + assert not captured.err generator = SilentGenerator() sample = _generate_without_progress_bar(generator, 10, rng) diff --git a/tests/optimizer/test_fit_simple_model.py b/tests/optimizer/test_fit_simple_model.py index 89a9a5f8..5ff89525 100644 --- a/tests/optimizer/test_fit_simple_model.py +++ b/tests/optimizer/test_fit_simple_model.py @@ -92,7 +92,7 @@ def expression_and_parameters() -> tuple[sp.Expr, dict[sp.Symbol, float]]: @pytest.fixture(scope="session") def domain_and_data_sample( - expression_and_parameters: tuple[sp.Expr, dict[sp.Symbol, float]] + expression_and_parameters: tuple[sp.Expr, dict[sp.Symbol, float]], ) -> tuple[DataSample, DataSample]: expression, parameter_defaults = expression_and_parameters function = create_parametrized_function(