From f85df896c4175cfddaf724d6f42a7b5a3719d9a4 Mon Sep 17 00:00:00 2001 From: GitHub Date: Thu, 7 Mar 2024 03:08:38 +0000 Subject: [PATCH 1/4] MAINT: update pip constraints and pre-commit --- .constraints/py3.10.txt | 170 ++++++++++++++++++++-------------------- .constraints/py3.11.txt | 170 ++++++++++++++++++++-------------------- .constraints/py3.8.txt | 159 ++++++++++++++++++------------------- .constraints/py3.9.txt | 170 ++++++++++++++++++++-------------------- .pre-commit-config.yaml | 12 +-- 5 files changed, 341 insertions(+), 340 deletions(-) diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index 05870954..25cce144 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -1,14 +1,10 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.10.txt --strip-extras --unsafe-package=ampform-dpd --unsafe-package=pip --unsafe-package=setuptools -# -absl-py==2.0.0 +# This file was autogenerated by uv via the following command: +# uv pip compile pyproject.toml -o .constraints/py3.10.txt --all-extras --no-annotate --python-version=3.10 --no-emit-package setuptools +absl-py==2.1.0 accessible-pygments==0.0.4 alabaster==0.7.16 -ampform==0.14.8 -anyio==4.2.0 +ampform==0.14.11 +anyio==4.3.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 @@ -17,12 +13,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.2.0 bleach==6.1.0 -cachetools==5.3.2 +cachetools==5.3.3 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,14 +28,14 @@ cloudpickle==3.0.0 colorama==0.4.6 comm==0.2.1 contourpy==1.2.0 -coverage==7.4.0 +coverage==7.4.3 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 dm-tree==0.1.8 -docstring-to-markdown==0.13 +docstring-to-markdown==0.15 docutils==0.20.1 exceptiongroup==1.2.0 execnet==2.0.2 @@ -47,66 +43,70 @@ executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 flatbuffers==23.5.26 -fonttools==4.47.2 +fonttools==4.49.0 fqdn==1.5.1 gast==0.5.4 gitdb==4.0.11 -gitpython==3.1.41 -google-auth==2.26.2 +gitpython==3.1.42 +google-auth==2.28.1 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.62.0 +h11==0.14.0 h5py==3.10.0 hepunits==2.3.3 -identify==2.5.33 +httpcore==1.0.4 +httpx==0.27.0 +identify==2.5.35 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.3 ipympl==0.9.3 -ipython==8.20.0 +ipython==8.22.2 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.25 +jaxlib==0.4.25 jedi==0.19.1 jinja2==3.1.3 -json5==0.9.14 +json5==0.9.22 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.4 +jupyter-server==2.13.0 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.1.3 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 -jupyterlab-myst==2.1.0 +jupyterlab-lsp==5.1.0 +jupyterlab-myst==2.3.1 jupyterlab-pygments==0.3.0 -jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 +jupyterlab-server==2.25.3 +jupyterlab-widgets==3.0.10 keras==2.15.0 kiwisolver==1.4.5 -latexcodec==2.0.1 +latexcodec==3.0.0 libclang==16.0.6 livereload==2.6.3 +llvmlite==0.42.0 lsprotocol==2023.0.1 markdown==3.5.2 markdown-it-py==3.0.0 -markupsafe==2.1.3 -matplotlib==3.8.2 +markupsafe==2.1.5 +matplotlib==3.8.3 matplotlib-inline==0.1.6 mdit-py-plugins==0.4.0 mdurl==0.1.2 @@ -117,32 +117,33 @@ 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.2 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.2 +nest-asyncio==1.6.0 nodeenv==1.8.0 -notebook-shim==0.2.3 -numpy==1.26.3 +notebook-shim==0.2.4 +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 -pandocfilters==1.5.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 -prometheus-client==0.19.0 +platformdirs==4.2.0 +pluggy==1.4.0 +pre-commit==3.6.2 +prometheus-client==0.20.0 prompt-toolkit==3.0.43 -protobuf==4.23.4 -psutil==5.9.7 +protobuf==4.25.3 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 pyasn1==0.5.1 @@ -150,64 +151,64 @@ pyasn1-modules==0.3.0 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.15.1 +pydata-sphinx-theme==0.15.2 pygments==2.17.2 -pyparsing==3.1.1 +pyparsing==3.1.2 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.2 pytest-cov==4.1.0 pytest-xdist==3.5.0 -python-constraint==1.4.0 -python-dateutil==2.8.2 +python-constraint==1.3.1 +python-dateutil==2.9.0.post0 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.2.0 +python-lsp-server==1.10.0 pytoolconfig==1.3.1 pyyaml==6.0.1 pyzmq==25.1.2 -qrules==0.9.8 -referencing==0.32.1 +qrules==0.10.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.18.0 rsa==4.9 -ruff==0.1.13 -scipy==1.11.4 +ruff==0.3.1 +scipy==1.12.0 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 -sniffio==1.3.0 +sniffio==1.3.1 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==7.2.6 sphinx-api-relink==0.0.8 -sphinx-autobuild==2021.3.14 -sphinx-book-theme==1.1.0 +sphinx-autobuild==2024.2.4 +sphinx-book-theme==1.1.2 sphinx-codeautolink==0.15.0 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-pybtex-etal-style==0.0.2 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-applehelp==1.0.8 sphinxcontrib-bibtex==2.6.2 -sphinxcontrib-devhelp==1.0.5 -sphinxcontrib-htmlhelp==2.0.4 +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 -sqlalchemy==2.0.25 +sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-serializinghtml==1.1.10 +sqlalchemy==2.0.28 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.post1 tensorflow-estimator==2.15.0 -tensorflow-io-gcs-filesystem==0.35.0 +tensorflow-io-gcs-filesystem==0.36.0 tensorflow-probability==0.23.0 tensorwaves==0.4.11 termcolor==2.4.0 @@ -215,25 +216,24 @@ 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.14.1 +tqdm==4.66.2 traitlets==5.14.1 types-python-dateutil==2.8.19.20240106 -typing-extensions==4.9.0 +typing-extensions==4.10.0 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 -virtualenv==20.25.0 +urllib3==2.2.1 +virtualenv==20.25.1 wcwidth==0.2.13 webcolors==1.13 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 -# The following packages are considered to be unsafe in a requirements file: -# ampform-dpd +# The following packages were excluded from the output: # setuptools diff --git a/.constraints/py3.11.txt b/.constraints/py3.11.txt index 1c5a43f1..afe43b64 100644 --- a/.constraints/py3.11.txt +++ b/.constraints/py3.11.txt @@ -1,14 +1,10 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.11.txt --strip-extras --unsafe-package=ampform-dpd --unsafe-package=pip --unsafe-package=setuptools -# -absl-py==2.0.0 +# This file was autogenerated by uv via the following command: +# uv pip compile pyproject.toml -o .constraints/py3.11.txt --all-extras --no-annotate --python-version=3.11 --no-emit-package setuptools +absl-py==2.1.0 accessible-pygments==0.0.4 alabaster==0.7.16 -ampform==0.14.8 -anyio==4.2.0 +ampform==0.14.11 +anyio==4.3.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 @@ -17,12 +13,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.2.0 bleach==6.1.0 -cachetools==5.3.2 +cachetools==5.3.3 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,80 +28,84 @@ cloudpickle==3.0.0 colorama==0.4.6 comm==0.2.1 contourpy==1.2.0 -coverage==7.4.0 +coverage==7.4.3 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 dm-tree==0.1.8 -docstring-to-markdown==0.13 +docstring-to-markdown==0.15 docutils==0.20.1 execnet==2.0.2 executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 flatbuffers==23.5.26 -fonttools==4.47.2 +fonttools==4.49.0 fqdn==1.5.1 gast==0.5.4 gitdb==4.0.11 -gitpython==3.1.41 -google-auth==2.26.2 +gitpython==3.1.42 +google-auth==2.28.1 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.62.0 +h11==0.14.0 h5py==3.10.0 hepunits==2.3.3 -identify==2.5.33 +httpcore==1.0.4 +httpx==0.27.0 +identify==2.5.35 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.3 ipympl==0.9.3 -ipython==8.20.0 +ipython==8.22.2 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.25 +jaxlib==0.4.25 jedi==0.19.1 jinja2==3.1.3 -json5==0.9.14 +json5==0.9.22 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.4 +jupyter-server==2.13.0 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.1.3 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 -jupyterlab-myst==2.1.0 +jupyterlab-lsp==5.1.0 +jupyterlab-myst==2.3.1 jupyterlab-pygments==0.3.0 -jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 +jupyterlab-server==2.25.3 +jupyterlab-widgets==3.0.10 keras==2.15.0 kiwisolver==1.4.5 -latexcodec==2.0.1 +latexcodec==3.0.0 libclang==16.0.6 livereload==2.6.3 +llvmlite==0.42.0 lsprotocol==2023.0.1 markdown==3.5.2 markdown-it-py==3.0.0 -markupsafe==2.1.3 -matplotlib==3.8.2 +markupsafe==2.1.5 +matplotlib==3.8.3 matplotlib-inline==0.1.6 mdit-py-plugins==0.4.0 mdurl==0.1.2 @@ -116,32 +116,33 @@ 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.2 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.2 +nest-asyncio==1.6.0 nodeenv==1.8.0 -notebook-shim==0.2.3 -numpy==1.26.3 +notebook-shim==0.2.4 +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 -pandocfilters==1.5.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 -prometheus-client==0.19.0 +platformdirs==4.2.0 +pluggy==1.4.0 +pre-commit==3.6.2 +prometheus-client==0.20.0 prompt-toolkit==3.0.43 -protobuf==4.23.4 -psutil==5.9.7 +protobuf==4.25.3 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 pyasn1==0.5.1 @@ -149,89 +150,88 @@ pyasn1-modules==0.3.0 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.15.1 +pydata-sphinx-theme==0.15.2 pygments==2.17.2 -pyparsing==3.1.1 +pyparsing==3.1.2 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.2 pytest-cov==4.1.0 pytest-xdist==3.5.0 -python-constraint==1.4.0 -python-dateutil==2.8.2 +python-constraint==1.3.1 +python-dateutil==2.9.0.post0 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.2.0 +python-lsp-server==1.10.0 pytoolconfig==1.3.1 pyyaml==6.0.1 pyzmq==25.1.2 -qrules==0.9.8 -referencing==0.32.1 +qrules==0.10.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.18.0 rsa==4.9 -ruff==0.1.13 -scipy==1.11.4 +ruff==0.3.1 +scipy==1.12.0 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 -sniffio==1.3.0 +sniffio==1.3.1 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==7.2.6 sphinx-api-relink==0.0.8 -sphinx-autobuild==2021.3.14 -sphinx-book-theme==1.1.0 +sphinx-autobuild==2024.2.4 +sphinx-book-theme==1.1.2 sphinx-codeautolink==0.15.0 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-pybtex-etal-style==0.0.2 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-applehelp==1.0.8 sphinxcontrib-bibtex==2.6.2 -sphinxcontrib-devhelp==1.0.5 -sphinxcontrib-htmlhelp==2.0.4 +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 -sqlalchemy==2.0.25 +sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-serializinghtml==1.1.10 +sqlalchemy==2.0.28 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.post1 tensorflow-estimator==2.15.0 -tensorflow-io-gcs-filesystem==0.35.0 +tensorflow-io-gcs-filesystem==0.36.0 tensorflow-probability==0.23.0 tensorwaves==0.4.11 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.14.1 +tqdm==4.66.2 traitlets==5.14.1 types-python-dateutil==2.8.19.20240106 -typing-extensions==4.9.0 +typing-extensions==4.10.0 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 -virtualenv==20.25.0 +urllib3==2.2.1 +virtualenv==20.25.1 wcwidth==0.2.13 webcolors==1.13 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 -# The following packages are considered to be unsafe in a requirements file: -# ampform-dpd +# The following packages were excluded from the output: # setuptools diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index f9d60663..1130639b 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -1,14 +1,10 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.8.txt --strip-extras --unsafe-package=ampform-dpd --unsafe-package=pip --unsafe-package=setuptools -# -absl-py==2.0.0 +# This file was autogenerated by uv via the following command: +# uv pip compile pyproject.toml -o .constraints/py3.8.txt --all-extras --no-annotate --python-version=3.8 --no-emit-package setuptools +absl-py==2.1.0 accessible-pygments==0.0.4 alabaster==0.7.13 -ampform==0.14.8 -anyio==4.2.0 +ampform==0.14.11 +anyio==4.3.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 @@ -18,12 +14,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.2.0 bleach==6.1.0 -cachetools==5.3.2 +cachetools==5.3.3 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,14 +29,14 @@ cloudpickle==3.0.0 colorama==0.4.6 comm==0.2.1 contourpy==1.1.1 -coverage==7.4.0 +coverage==7.4.3 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 dm-tree==0.1.8 -docstring-to-markdown==0.13 +docstring-to-markdown==0.15 docutils==0.17.1 exceptiongroup==1.2.0 execnet==2.0.2 @@ -48,67 +44,71 @@ executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 flatbuffers==23.5.26 -fonttools==4.47.2 +fonttools==4.49.0 fqdn==1.5.1 gast==0.4.0 gitdb==4.0.11 -gitpython==3.1.41 -google-auth==2.26.2 -google-auth-oauthlib==1.0.0 +gitpython==3.1.42 +google-auth==2.28.1 +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.62.0 +h11==0.14.0 h5py==3.10.0 hepunits==2.3.3 -identify==2.5.33 +httpcore==1.0.4 +httpx==0.27.0 +identify==2.5.35 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 +importlib-resources==6.1.2 iniconfig==2.0.0 -ipykernel==6.28.0 +ipykernel==6.29.3 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 jaxlib==0.4.13 jedi==0.19.1 jinja2==3.1.3 -json5==0.9.14 +json5==0.9.22 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter-cache==0.6.1 jupyter-client==8.6.0 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.4 +jupyter-server==2.13.0 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.1.3 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 -jupyterlab-myst==2.1.0 +jupyterlab-lsp==5.1.0 +jupyterlab-myst==2.3.1 jupyterlab-pygments==0.3.0 -jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 -keras==2.12.0 +jupyterlab-server==2.25.3 +jupyterlab-widgets==3.0.10 +keras==2.11.0 kiwisolver==1.4.5 -latexcodec==2.0.1 +latexcodec==3.0.0 libclang==16.0.6 livereload==2.6.3 +llvmlite==0.41.1 lsprotocol==2023.0.1 markdown==3.5.2 markdown-it-py==2.2.0 -markupsafe==2.1.3 -matplotlib==3.7.4 +markupsafe==2.1.5 +matplotlib==3.7.5 matplotlib-inline==0.1.6 mdit-py-plugins==0.3.5 mdurl==0.1.2 @@ -119,19 +119,20 @@ 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.2 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.2 +nest-asyncio==1.6.0 nodeenv==1.8.0 -notebook-shim==0.2.3 -numpy==1.23.5 +notebook-shim==0.2.4 +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 -pandocfilters==1.5.0 +pandocfilters==1.5.1 parso==0.8.3 particle==0.23.1 pathspec==0.12.1 @@ -140,13 +141,13 @@ 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 +prometheus-client==0.20.0 prompt-toolkit==3.0.43 -protobuf==4.25.2 -psutil==5.9.7 +protobuf==3.19.6 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 pyasn1==0.5.1 @@ -156,36 +157,36 @@ pybtex-docutils==1.0.3 pycparser==2.21 pydata-sphinx-theme==0.14.4 pygments==2.17.2 -pyparsing==3.1.1 +pyparsing==3.1.2 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.2 pytest-cov==4.1.0 pytest-xdist==3.5.0 -python-constraint==1.4.0 -python-dateutil==2.8.2 +python-constraint==1.3.1 +python-dateutil==2.9.0.post0 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.2.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 -referencing==0.32.1 +qrules==0.10.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.18.0 rsa==4.9 -ruff==0.1.13 +ruff==0.3.1 scipy==1.10.1 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 -sniffio==1.3.0 +sniffio==1.3.1 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==5.3.0 @@ -204,14 +205,15 @@ sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -sqlalchemy==2.0.25 +sqlalchemy==2.0.28 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 -tensorboard==2.12.3 -tensorboard-data-server==0.7.2 -tensorflow==2.12.0 -tensorflow-estimator==2.12.0 +tensorboard==2.11.2 +tensorboard-data-server==0.6.1 +tensorboard-plugin-wit==1.8.1 +tensorflow==2.11.1 +tensorflow-estimator==2.11.0 tensorflow-io-gcs-filesystem==0.34.0 tensorflow-probability==0.20.1 tensorwaves==0.4.11 @@ -220,25 +222,24 @@ 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.14.1 +tqdm==4.66.2 traitlets==5.14.1 types-python-dateutil==2.8.19.20240106 -typing-extensions==4.9.0 +typing-extensions==4.10.0 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 -virtualenv==20.25.0 +urllib3==2.2.1 +virtualenv==20.25.1 wcwidth==0.2.13 webcolors==1.13 webencodings==0.5.1 websocket-client==1.7.0 werkzeug==3.0.1 wheel==0.42.0 -widgetsnbextension==4.0.9 -wrapt==1.14.1 +widgetsnbextension==4.0.10 +wrapt==1.16.0 zipp==3.17.0 -# The following packages are considered to be unsafe in a requirements file: -# ampform-dpd +# The following packages were excluded from the output: # setuptools diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index 6709092d..f4a5df2e 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -1,14 +1,10 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --extra=dev --no-annotate --output-file=.constraints/py3.9.txt --strip-extras --unsafe-package=ampform-dpd --unsafe-package=pip --unsafe-package=setuptools -# -absl-py==2.0.0 +# This file was autogenerated by uv via the following command: +# uv pip compile pyproject.toml -o .constraints/py3.9.txt --all-extras --no-annotate --python-version=3.9 --no-emit-package setuptools +absl-py==2.1.0 accessible-pygments==0.0.4 alabaster==0.7.16 -ampform==0.14.8 -anyio==4.2.0 +ampform==0.14.11 +anyio==4.3.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 @@ -17,12 +13,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.2.0 bleach==6.1.0 -cachetools==5.3.2 +cachetools==5.3.3 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,14 +28,14 @@ cloudpickle==3.0.0 colorama==0.4.6 comm==0.2.1 contourpy==1.2.0 -coverage==7.4.0 +coverage==7.4.3 cycler==0.12.1 -debugpy==1.8.0 +debugpy==1.8.1 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 dm-tree==0.1.8 -docstring-to-markdown==0.13 +docstring-to-markdown==0.15 docutils==0.20.1 exceptiongroup==1.2.0 execnet==2.0.2 @@ -47,67 +43,71 @@ executing==2.0.1 fastjsonschema==2.19.1 filelock==3.13.1 flatbuffers==23.5.26 -fonttools==4.47.2 +fonttools==4.49.0 fqdn==1.5.1 gast==0.5.4 gitdb==4.0.11 -gitpython==3.1.41 -google-auth==2.26.2 +gitpython==3.1.42 +google-auth==2.28.1 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.62.0 +h11==0.14.0 h5py==3.10.0 hepunits==2.3.3 -identify==2.5.33 +httpcore==1.0.4 +httpx==0.27.0 +identify==2.5.35 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 +importlib-resources==6.1.2 iniconfig==2.0.0 -ipykernel==6.28.0 +ipykernel==6.29.3 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.25 +jaxlib==0.4.25 jedi==0.19.1 jinja2==3.1.3 -json5==0.9.14 +json5==0.9.22 jsonpointer==2.4 -jsonschema==4.20.0 +jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-core==5.7.1 jupyter-events==0.9.0 -jupyter-lsp==2.2.1 -jupyter-server==2.12.4 +jupyter-lsp==2.2.4 +jupyter-server==2.13.0 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.5.1 -jupyterlab==4.0.10 +jupyter-server-terminals==0.5.2 +jupyterlab==4.1.3 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 -jupyterlab-lsp==5.0.1 -jupyterlab-myst==2.1.0 +jupyterlab-lsp==5.1.0 +jupyterlab-myst==2.3.1 jupyterlab-pygments==0.3.0 -jupyterlab-server==2.25.2 -jupyterlab-widgets==3.0.9 +jupyterlab-server==2.25.3 +jupyterlab-widgets==3.0.10 keras==2.15.0 kiwisolver==1.4.5 -latexcodec==2.0.1 +latexcodec==3.0.0 libclang==16.0.6 livereload==2.6.3 +llvmlite==0.42.0 lsprotocol==2023.0.1 markdown==3.5.2 markdown-it-py==3.0.0 -markupsafe==2.1.3 -matplotlib==3.8.2 +markupsafe==2.1.5 +matplotlib==3.8.3 matplotlib-inline==0.1.6 mdit-py-plugins==0.4.0 mdurl==0.1.2 @@ -118,32 +118,33 @@ 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.2 nbdime==4.0.1 nbformat==5.9.2 -nbmake==1.4.6 -nest-asyncio==1.5.8 +nbmake==1.5.2 +nest-asyncio==1.6.0 nodeenv==1.8.0 -notebook-shim==0.2.3 -numpy==1.26.3 +notebook-shim==0.2.4 +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 -pandocfilters==1.5.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 -prometheus-client==0.19.0 +platformdirs==4.2.0 +pluggy==1.4.0 +pre-commit==3.6.2 +prometheus-client==0.20.0 prompt-toolkit==3.0.43 -protobuf==4.23.4 -psutil==5.9.7 +protobuf==4.25.3 +psutil==5.9.8 ptyprocess==0.7.0 pure-eval==0.2.2 pyasn1==0.5.1 @@ -151,64 +152,64 @@ pyasn1-modules==0.3.0 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.15.1 +pydata-sphinx-theme==0.15.2 pygments==2.17.2 -pyparsing==3.1.1 +pyparsing==3.1.2 pyproject-api==1.6.1 -pytest==7.4.4 +pytest==8.0.2 pytest-cov==4.1.0 pytest-xdist==3.5.0 -python-constraint==1.4.0 -python-dateutil==2.8.2 +python-constraint==1.3.1 +python-dateutil==2.9.0.post0 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.2.0 +python-lsp-server==1.10.0 pytoolconfig==1.3.1 pyyaml==6.0.1 pyzmq==25.1.2 -qrules==0.9.8 -referencing==0.32.1 +qrules==0.10.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.18.0 rsa==4.9 -ruff==0.1.13 -scipy==1.11.4 +ruff==0.3.1 +scipy==1.12.0 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 -sniffio==1.3.0 +sniffio==1.3.1 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==7.2.6 sphinx-api-relink==0.0.8 -sphinx-autobuild==2021.3.14 -sphinx-book-theme==1.1.0 +sphinx-autobuild==2024.2.4 +sphinx-book-theme==1.1.2 sphinx-codeautolink==0.15.0 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-pybtex-etal-style==0.0.2 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-applehelp==1.0.8 sphinxcontrib-bibtex==2.6.2 -sphinxcontrib-devhelp==1.0.5 -sphinxcontrib-htmlhelp==2.0.4 +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 -sqlalchemy==2.0.25 +sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-serializinghtml==1.1.10 +sqlalchemy==2.0.28 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.post1 tensorflow-estimator==2.15.0 -tensorflow-io-gcs-filesystem==0.35.0 +tensorflow-io-gcs-filesystem==0.36.0 tensorflow-probability==0.23.0 tensorwaves==0.4.11 termcolor==2.4.0 @@ -216,25 +217,24 @@ 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.14.1 +tqdm==4.66.2 traitlets==5.14.1 types-python-dateutil==2.8.19.20240106 -typing-extensions==4.9.0 +typing-extensions==4.10.0 ujson==5.9.0 uri-template==1.3.0 -urllib3==2.1.0 -virtualenv==20.25.0 +urllib3==2.2.1 +virtualenv==20.25.1 wcwidth==0.2.13 webcolors==1.13 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 -# The following packages are considered to be unsafe in a requirements file: -# ampform-dpd +# The following packages were excluded from the output: # setuptools diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 803535c6..080801b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: check-useless-excludes - repo: https://github.com/ComPWA/policy - rev: 0.2.2 + rev: 0.2.6 hooks: - id: check-dev-files args: @@ -40,7 +40,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.12.1 + rev: 24.2.0 hooks: - id: black - id: black-jupyter @@ -48,7 +48,7 @@ repos: types_or: [jupyter] - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v8.3.0 + rev: v8.6.0 hooks: - id: cspell @@ -64,7 +64,7 @@ repos: )$ - repo: https://github.com/kynan/nbstripout - rev: 0.6.1 + rev: 0.7.1 hooks: - id: nbstripout args: @@ -94,12 +94,12 @@ repos: - id: prettier - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.345 + rev: v1.1.352 hooks: - id: pyright - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.13 + rev: v0.3.1 hooks: - id: ruff args: [--fix] From f5d3b4c07875f65bfb7d8a2574d8dc34c96ea27f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 03:08:53 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/dependabot.yml | 10 --- .github/workflows/ci.yml | 3 +- .github/workflows/release-drafter.yml | 2 +- .github/workflows/requirements.yml | 3 +- .gitpod.yml | 4 +- .pre-commit-config.yaml | 103 ++++++++++++-------------- .vscode/extensions.json | 8 +- .vscode/settings.json | 27 +++++-- docs/comparison/d2kkk.ipynb | 67 ++++++++--------- docs/comparison/jpsi2phipipi.ipynb | 67 ++++++++--------- docs/comparison/jpsi2pipipi.ipynb | 67 ++++++++--------- docs/conf.py | 44 ++++++----- docs/jpsi2ksp.ipynb | 7 +- docs/lc2pkpi.ipynb | 7 +- pyproject.toml | 86 ++++++++++----------- 15 files changed, 236 insertions(+), 269 deletions(-) delete mode 100644 .github/dependabot.yml 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 e94cc388..a1ef5869 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 b2562f25..ec42f28d 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 7add259a..866fb318 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -21,7 +21,6 @@ vscode: - executablebookproject.myst-highlight - github.vscode-github-actions - github.vscode-pull-request-github - - ms-python.black-formatter - ms-python.python - ms-python.vscode-pylance - ms-toolsai.vscode-jupyter-cell-tags @@ -29,9 +28,8 @@ vscode: - ms-vsliveshare.vsliveshare - oijaz.unicode-latex - redhat.vscode-yaml - - 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 080801b9..1fa8e110 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,6 +12,31 @@ 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.6 hooks: @@ -24,6 +49,15 @@ repos: - --repo-title=AmpForm-DPD - id: colab-toc-visible + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.3.1 + hooks: + - id: ruff + args: [--fix] + types_or: [python, pyi, jupyter] + - id: ruff-format + types_or: [python, pyi, jupyter] + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: @@ -39,14 +73,22 @@ repos: - id: mixed-line-ending - id: trailing-whitespace - - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.2.0 + - 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: black - - id: black-jupyter - args: [--line-length=85] - types_or: [jupyter] + - id: taplo + - repo: https://github.com/pappasam/toml-sort + rev: v0.23.1 + hooks: + - id: toml-sort + args: + - --in-place - repo: https://github.com/streetsidesoftware/cspell-cli rev: v8.6.0 hooks: @@ -63,56 +105,7 @@ repos: .*\.py )$ - - 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/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.8 - hooks: - - id: prettier - - repo: https://github.com/ComPWA/mirrors-pyright rev: v1.1.352 hooks: - id: pyright - - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.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 4923a9a6..44c0afda 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -7,7 +7,6 @@ "executablebookproject.myst-highlight", "github.vscode-github-actions", "github.vscode-pull-request-github", - "ms-python.black-formatter", "ms-python.python", "ms-python.vscode-pylance", "ms-toolsai.vscode-jupyter-cell-tags", @@ -15,21 +14,22 @@ "ms-vsliveshare.vsliveshare", "oijaz.unicode-latex", "redhat.vscode-yaml", - "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": [ "bungcip.better-toml", "davidanson.vscode-markdownlint", "garaioag.garaio-vscode-unwanted-recommendations", + "ms-python.black-formatter", "ms-python.flake8", "ms-python.isort", "ms-python.mypy-type-checker", "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 caac3834..8dbf4c2a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,7 +3,9 @@ "editor.formatOnSave": false }, "[git-commit]": { - "editor.rulers": [72], + "editor.rulers": [ + 72 + ], "rewrap.wrappingColumn": 72 }, "[json]": { @@ -23,30 +25,43 @@ "editor.codeActionsOnSave": { "source.organizeImports": "explicit" }, - "editor.defaultFormatter": "ms-python.black-formatter", - "editor.rulers": [88] + "editor.defaultFormatter": "charliermarsh.ruff", + "editor.rulers": [ + 88 + ] }, "[yaml]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "black-formatter.importStrategy": "fromEnvironment", "cSpell.enabled": true, "diffEditor.experimental.showMoves": true, "editor.formatOnSave": true, "files.eol": "\n", - "github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"], + "github-actions.workflows.pinned.workflows": [ + ".github/workflows/ci.yml" + ], + "gitlens.telemetry.enabled": false, "livePreview.defaultPreviewPath": "docs/_build/html", "multiDiffEditor.experimental.enabled": true, + "notebook.codeActionsOnSave": { + "notebook.source.organizeImports": "explicit" + }, + "notebook.formatOnSave.enabled": true, "notebook.gotoSymbols.showAllSymbols": true, "python.analysis.autoImportCompletions": false, "python.analysis.inlayHints.pytestParameters": true, "python.analysis.typeCheckingMode": "strict", - "python.testing.pytestArgs": ["--color=no"], + "python.testing.pytestArgs": [ + "--color=no" + ], "python.testing.pytestEnabled": true, "python.testing.unittestEnabled": false, + "redhat.telemetry.enabled": false, "rewrap.wrappingColumn": 88, "ruff.enable": true, + "ruff.importStrategy": "fromEnvironment", "ruff.organizeImports": true, + "telemetry.telemetryLevel": "off", "yaml.schemas": { "https://json.schemastore.org/github-workflow.json": ".github/workflows/requirements.yml" } diff --git a/docs/comparison/d2kkk.ipynb b/docs/comparison/d2kkk.ipynb index 4b80f9bf..8ca663e5 100644 --- a/docs/comparison/d2kkk.ipynb +++ b/docs/comparison/d2kkk.ipynb @@ -64,12 +64,7 @@ "from tensorwaves.data.transform import SympyDataTransformer\n", "\n", "from ampform_dpd import DalitzPlotDecompositionBuilder, simplify_latex_rendering\n", - "from ampform_dpd.decay import (\n", - " IsobarNode,\n", - " Particle,\n", - " ThreeBodyDecay,\n", - " ThreeBodyDecayChain,\n", - ")\n", + "from ampform_dpd.decay import IsobarNode, Particle, ThreeBodyDecay, ThreeBodyDecayChain\n", "from ampform_dpd.io import (\n", " as_markdown_table,\n", " aslatex,\n", @@ -81,11 +76,7 @@ "if TYPE_CHECKING:\n", " from ampform.helicity import HelicityModel\n", " from qrules.transition import ReactionInfo\n", - " from tensorwaves.interface import (\n", - " DataSample,\n", - " ParameterValue,\n", - " ParametrizedFunction,\n", - " )\n", + " from tensorwaves.interface import DataSample, ParameterValue, ParametrizedFunction\n", "\n", "simplify_latex_rendering()\n", "logging.getLogger(\"jax\").setLevel(logging.ERROR) # mute JAX\n", @@ -697,32 +688,36 @@ "ipywidgets.link((hide_expressions, \"value\"), (simplify_expressions, \"disabled\"))\n", "\n", "package_names = (\"AmpForm\", \"AmpForm-DPD\")\n", - "ui = HBox([\n", - " VBox([resonance_selector, hide_expressions, simplify_expressions]),\n", - " Tab(\n", - " children=[\n", - " Accordion(\n", - " children=[\n", - " GridBox([\n", - " sliders[key]\n", - " for key in sorted(sliders)\n", - " if p.latex in key\n", - " if (\n", - " key[0] in {\"C\", \"H\"}\n", - " if package == \"AmpForm\"\n", - " else key.startswith(R\"\\mathcal{H}\")\n", + "ui = HBox(\n", + " [\n", + " VBox([resonance_selector, hide_expressions, simplify_expressions]),\n", + " Tab(\n", + " children=[\n", + " Accordion(\n", + " children=[\n", + " GridBox(\n", + " [\n", + " sliders[key]\n", + " for key in sorted(sliders)\n", + " if p.latex in key\n", + " if (\n", + " key[0] in {\"C\", \"H\"}\n", + " if package == \"AmpForm\"\n", + " else key.startswith(R\"\\mathcal{H}\")\n", + " )\n", + " ]\n", " )\n", - " ])\n", - " for package in package_names\n", - " ],\n", - " selected_index=1,\n", - " titles=package_names,\n", - " )\n", - " for p in resonances\n", - " ],\n", - " titles=[to_unicode(p) for p in resonances],\n", - " ),\n", - "])" + " for package in package_names\n", + " ],\n", + " selected_index=1,\n", + " titles=package_names,\n", + " )\n", + " for p in resonances\n", + " ],\n", + " titles=[to_unicode(p) for p in resonances],\n", + " ),\n", + " ]\n", + ")" ] }, { diff --git a/docs/comparison/jpsi2phipipi.ipynb b/docs/comparison/jpsi2phipipi.ipynb index f5d17162..a1b6ccb1 100644 --- a/docs/comparison/jpsi2phipipi.ipynb +++ b/docs/comparison/jpsi2phipipi.ipynb @@ -64,12 +64,7 @@ "from tensorwaves.data.transform import SympyDataTransformer\n", "\n", "from ampform_dpd import DalitzPlotDecompositionBuilder, simplify_latex_rendering\n", - "from ampform_dpd.decay import (\n", - " IsobarNode,\n", - " Particle,\n", - " ThreeBodyDecay,\n", - " ThreeBodyDecayChain,\n", - ")\n", + "from ampform_dpd.decay import IsobarNode, Particle, ThreeBodyDecay, ThreeBodyDecayChain\n", "from ampform_dpd.io import (\n", " as_markdown_table,\n", " aslatex,\n", @@ -81,11 +76,7 @@ "if TYPE_CHECKING:\n", " from ampform.helicity import HelicityModel\n", " from qrules.transition import ReactionInfo\n", - " from tensorwaves.interface import (\n", - " DataSample,\n", - " ParameterValue,\n", - " ParametrizedFunction,\n", - " )\n", + " from tensorwaves.interface import DataSample, ParameterValue, ParametrizedFunction\n", "\n", "simplify_latex_rendering()\n", "logging.getLogger(\"jax\").setLevel(logging.ERROR) # mute JAX\n", @@ -680,32 +671,36 @@ "ipywidgets.link((hide_expressions, \"value\"), (simplify_expressions, \"disabled\"))\n", "\n", "package_names = (\"AmpForm\", \"AmpForm-DPD\")\n", - "ui = HBox([\n", - " VBox([resonance_selector, hide_expressions, simplify_expressions]),\n", - " Tab(\n", - " children=[\n", - " Accordion(\n", - " children=[\n", - " GridBox([\n", - " sliders[key]\n", - " for key in sorted(sliders)\n", - " if p.latex in key\n", - " if (\n", - " key[0] in {\"C\", \"H\"}\n", - " if package == \"AmpForm\"\n", - " else key.startswith(R\"\\mathcal{H}\")\n", + "ui = HBox(\n", + " [\n", + " VBox([resonance_selector, hide_expressions, simplify_expressions]),\n", + " Tab(\n", + " children=[\n", + " Accordion(\n", + " children=[\n", + " GridBox(\n", + " [\n", + " sliders[key]\n", + " for key in sorted(sliders)\n", + " if p.latex in key\n", + " if (\n", + " key[0] in {\"C\", \"H\"}\n", + " if package == \"AmpForm\"\n", + " else key.startswith(R\"\\mathcal{H}\")\n", + " )\n", + " ]\n", " )\n", - " ])\n", - " for package in package_names\n", - " ],\n", - " selected_index=1,\n", - " titles=package_names,\n", - " )\n", - " for p in resonances\n", - " ],\n", - " titles=[to_unicode(p) for p in resonances],\n", - " ),\n", - "])" + " for package in package_names\n", + " ],\n", + " selected_index=1,\n", + " titles=package_names,\n", + " )\n", + " for p in resonances\n", + " ],\n", + " titles=[to_unicode(p) for p in resonances],\n", + " ),\n", + " ]\n", + ")" ] }, { diff --git a/docs/comparison/jpsi2pipipi.ipynb b/docs/comparison/jpsi2pipipi.ipynb index a6e3a806..218ec960 100644 --- a/docs/comparison/jpsi2pipipi.ipynb +++ b/docs/comparison/jpsi2pipipi.ipynb @@ -64,12 +64,7 @@ "from tensorwaves.data.transform import SympyDataTransformer\n", "\n", "from ampform_dpd import DalitzPlotDecompositionBuilder, simplify_latex_rendering\n", - "from ampform_dpd.decay import (\n", - " IsobarNode,\n", - " Particle,\n", - " ThreeBodyDecay,\n", - " ThreeBodyDecayChain,\n", - ")\n", + "from ampform_dpd.decay import IsobarNode, Particle, ThreeBodyDecay, ThreeBodyDecayChain\n", "from ampform_dpd.io import (\n", " as_markdown_table,\n", " aslatex,\n", @@ -81,11 +76,7 @@ "if TYPE_CHECKING:\n", " from ampform.helicity import HelicityModel\n", " from qrules.transition import ReactionInfo\n", - " from tensorwaves.interface import (\n", - " DataSample,\n", - " ParameterValue,\n", - " ParametrizedFunction,\n", - " )\n", + " from tensorwaves.interface import DataSample, ParameterValue, ParametrizedFunction\n", "\n", "simplify_latex_rendering()\n", "logging.getLogger(\"jax\").setLevel(logging.ERROR) # mute JAX\n", @@ -680,32 +671,36 @@ "ipywidgets.link((hide_expressions, \"value\"), (simplify_expressions, \"disabled\"))\n", "\n", "package_names = (\"AmpForm\", \"AmpForm-DPD\")\n", - "ui = HBox([\n", - " VBox([resonance_selector, hide_expressions, simplify_expressions]),\n", - " Tab(\n", - " children=[\n", - " Accordion(\n", - " children=[\n", - " GridBox([\n", - " sliders[key]\n", - " for key in sorted(sliders)\n", - " if p.latex in key\n", - " if (\n", - " key[0] in {\"C\", \"H\"}\n", - " if package == \"AmpForm\"\n", - " else key.startswith(R\"\\mathcal{H}\")\n", + "ui = HBox(\n", + " [\n", + " VBox([resonance_selector, hide_expressions, simplify_expressions]),\n", + " Tab(\n", + " children=[\n", + " Accordion(\n", + " children=[\n", + " GridBox(\n", + " [\n", + " sliders[key]\n", + " for key in sorted(sliders)\n", + " if p.latex in key\n", + " if (\n", + " key[0] in {\"C\", \"H\"}\n", + " if package == \"AmpForm\"\n", + " else key.startswith(R\"\\mathcal{H}\")\n", + " )\n", + " ]\n", " )\n", - " ])\n", - " for package in package_names\n", - " ],\n", - " selected_index=1,\n", - " titles=package_names,\n", - " )\n", - " for p in resonances\n", - " ],\n", - " titles=[to_unicode(p) for p in resonances],\n", - " ),\n", - "])" + " for package in package_names\n", + " ],\n", + " selected_index=1,\n", + " titles=package_names,\n", + " )\n", + " for p in resonances\n", + " ],\n", + " titles=[to_unicode(p) for p in resonances],\n", + " ),\n", + " ]\n", + ")" ] }, { diff --git a/docs/conf.py b/docs/conf.py index d77150b7..fa66d87b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -9,19 +9,21 @@ set_intersphinx_version_remapping, ) -set_intersphinx_version_remapping({ - "ipython": { - "8.12.2": "8.12.1", - "8.12.3": "8.12.1", - }, - "ipywidgets": { - "8.0.3": "8.0.5", - "8.0.4": "8.0.5", - "8.0.6": "8.0.5", - "8.1.1": "8.1.2", - }, - "mpl-interactions": {"0.24.1": "0.24.0"}, -}) +set_intersphinx_version_remapping( + { + "ipython": { + "8.12.2": "8.12.1", + "8.12.3": "8.12.1", + }, + "ipywidgets": { + "8.0.3": "8.0.5", + "8.0.4": "8.0.5", + "8.0.6": "8.0.5", + "8.1.1": "8.1.2", + }, + "mpl-interactions": {"0.24.1": "0.24.0"}, + } +) BRANCH = get_branch_name() ORGANIZATION = "ComPWA" @@ -52,13 +54,15 @@ api_target_types: dict[str, str] = {} author = "Common Partial Wave Analysis" autodoc_default_options = { - "exclude-members": ", ".join([ - "default_assumptions", - "doit", - "evaluate", - "is_commutative", - "is_extended_real", - ]), + "exclude-members": ", ".join( + [ + "default_assumptions", + "doit", + "evaluate", + "is_commutative", + "is_extended_real", + ] + ), "members": True, "undoc-members": True, "show-inheritance": True, diff --git a/docs/jpsi2ksp.ipynb b/docs/jpsi2ksp.ipynb index e56797c3..a9c3a0d1 100644 --- a/docs/jpsi2ksp.ipynb +++ b/docs/jpsi2ksp.ipynb @@ -47,12 +47,7 @@ " _get_particle,\n", " simplify_latex_rendering,\n", ")\n", - "from ampform_dpd.decay import (\n", - " IsobarNode,\n", - " Particle,\n", - " ThreeBodyDecay,\n", - " ThreeBodyDecayChain,\n", - ")\n", + "from ampform_dpd.decay import IsobarNode, Particle, ThreeBodyDecay, ThreeBodyDecayChain\n", "from ampform_dpd.io import as_markdown_table, aslatex, perform_cached_lambdify\n", "from ampform_dpd.spin import filter_parity_violating_ls, generate_ls_couplings\n", "\n", diff --git a/docs/lc2pkpi.ipynb b/docs/lc2pkpi.ipynb index de41f112..6823f4c6 100644 --- a/docs/lc2pkpi.ipynb +++ b/docs/lc2pkpi.ipynb @@ -34,12 +34,7 @@ "from IPython.display import Latex, Markdown\n", "\n", "from ampform_dpd import DalitzPlotDecompositionBuilder, simplify_latex_rendering\n", - "from ampform_dpd.decay import (\n", - " IsobarNode,\n", - " Particle,\n", - " ThreeBodyDecay,\n", - " ThreeBodyDecayChain,\n", - ")\n", + "from ampform_dpd.decay import IsobarNode, Particle, ThreeBodyDecay, ThreeBodyDecayChain\n", "from ampform_dpd.dynamics import BreitWignerMinL\n", "from ampform_dpd.io import as_markdown_table, aslatex\n", "from ampform_dpd.spin import filter_parity_violating_ls, generate_ls_couplings\n", diff --git a/pyproject.toml b/pyproject.toml index 6f509d65..48f92044 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,17 +63,15 @@ doc = [ "tensorwaves[phsp]", "tqdm", ] -format = [ - "black", -] jax = [ "tensorwaves[jax]", ] jupyter = [ "ampform-dpd[doc]", + "black", "isort", - "jupyterlab >=3.0", "jupyterlab", + "jupyterlab >=3.0", "jupyterlab-code-formatter", "jupyterlab-git", "jupyterlab-lsp", @@ -90,10 +88,11 @@ numba = [ sty = [ "ampform-dpd[format]", "ampform-dpd[lint]", - "ampform-dpd[test]", # for pytest type hints + "ampform-dpd[test]", "docutils", "pre-commit >=1.4.0", "pybtex", + "ruff", "sphinx", "sphinx-api-relink >=0.0.4", ] @@ -135,29 +134,6 @@ where = ["src"] [tool.setuptools_scm] write_to = "src/ampform_dpd/version.py" -[tool.black] -exclude = ''' -/( - .*\.egg-info - | .*build - | \.eggs - | \.git - | \.pytest_cache - | \.tox - | \.venv - | \.vscode - | dist -)/ -''' -include = '\.pyi?$' -preview = true -target-version = [ - "py310", - "py311", - "py38", - "py39", -] - [tool.pyright] reportGeneralTypeIssues = false reportImportCycles = false @@ -207,6 +183,19 @@ testpaths = [ [tool.ruff] extend-include = ["*.ipynb"] +preview = true +show-fixes = true +src = [ + "src", + "tests", +] +target-version = "py38" + +[tool.ruff.format] +docstring-code-format = true +line-ending = "lf" + +[tool.ruff.lint] extend-select = [ "A", "B", @@ -252,33 +241,19 @@ ignore = [ "D407", "D416", "E501", + "ISC001", "ISC003", "PLR0913", + "PLW1514", "S301", "SIM108", ] -show-fixes = true -src = [ - "src", - "tests", -] -target-version = "py38" task-tags = ["cspell"] -[tool.ruff.pep8-naming] -ignore-names = [ - "A", - "H", - "L", - "R", - "R_dec", - "R_prod", - "S", - "Γ*", - "λ*", -] +[tool.ruff.lint.isort] +split-on-trailing-comma = false -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "*" = ["D"] "*.ipynb" = [ "B018", @@ -311,15 +286,30 @@ ignore-names = [ "D", "INP001", "PGH001", + "PLC2701", "PLR0913", "PLR2004", + "PLR6301", "S101", "T20", ] -[tool.ruff.pydocstyle] +[tool.ruff.lint.pydocstyle] convention = "google" +[tool.ruff.pep8-naming] +ignore-names = [ + "A", + "H", + "L", + "R", + "R_dec", + "R_prod", + "S", + "Γ*", + "λ*", +] + [tool.tomlsort] all = false ignore_case = true From 53177f8ebc2260944b9052896000de1931aa2070 Mon Sep 17 00:00:00 2001 From: GitHub Date: Thu, 7 Mar 2024 03:11:33 +0000 Subject: [PATCH 3/4] MAINT: implement updates from pre-commit hooks --- .vscode/settings.json | 16 ++++------------ pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 8dbf4c2a..b6160d17 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,9 +3,7 @@ "editor.formatOnSave": false }, "[git-commit]": { - "editor.rulers": [ - 72 - ], + "editor.rulers": [72], "rewrap.wrappingColumn": 72 }, "[json]": { @@ -26,9 +24,7 @@ "source.organizeImports": "explicit" }, "editor.defaultFormatter": "charliermarsh.ruff", - "editor.rulers": [ - 88 - ] + "editor.rulers": [88] }, "[yaml]": { "editor.defaultFormatter": "esbenp.prettier-vscode" @@ -37,9 +33,7 @@ "diffEditor.experimental.showMoves": true, "editor.formatOnSave": true, "files.eol": "\n", - "github-actions.workflows.pinned.workflows": [ - ".github/workflows/ci.yml" - ], + "github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"], "gitlens.telemetry.enabled": false, "livePreview.defaultPreviewPath": "docs/_build/html", "multiDiffEditor.experimental.enabled": true, @@ -51,9 +45,7 @@ "python.analysis.autoImportCompletions": false, "python.analysis.inlayHints.pytestParameters": true, "python.analysis.typeCheckingMode": "strict", - "python.testing.pytestArgs": [ - "--color=no" - ], + "python.testing.pytestArgs": ["--color=no"], "python.testing.pytestEnabled": true, "python.testing.unittestEnabled": false, "redhat.telemetry.enabled": false, diff --git a/pyproject.toml b/pyproject.toml index 48f92044..9b428cfd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,8 +70,8 @@ jupyter = [ "ampform-dpd[doc]", "black", "isort", - "jupyterlab", "jupyterlab >=3.0", + "jupyterlab", "jupyterlab-code-formatter", "jupyterlab-git", "jupyterlab-lsp", From 8e40ac3c072eeb99ea7491d5d02aacbf2dfcd445 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 03:11:46 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/comparison/d2kkk.ipynb | 70 +++++++++++++----------------- docs/comparison/jpsi2phipipi.ipynb | 70 +++++++++++++----------------- docs/comparison/jpsi2pipipi.ipynb | 70 +++++++++++++----------------- docs/conf.py | 44 +++++++++---------- docs/jpsi2ksp.ipynb | 12 ++--- src/ampform_dpd/angles.py | 28 +++--------- src/ampform_dpd/dynamics.py | 6 +-- 7 files changed, 123 insertions(+), 177 deletions(-) diff --git a/docs/comparison/d2kkk.ipynb b/docs/comparison/d2kkk.ipynb index 8ca663e5..49d7fe9c 100644 --- a/docs/comparison/d2kkk.ipynb +++ b/docs/comparison/d2kkk.ipynb @@ -505,9 +505,7 @@ }, "outputs": [], "source": [ - "def generate_phase_space(\n", - " reaction: ReactionInfo, size: int\n", - ") -> dict[str, jnp.ndarray]:\n", + "def generate_phase_space(reaction: ReactionInfo, size: int) -> dict[str, jnp.ndarray]:\n", " rng = TFUniformRealNumberGenerator(seed=0)\n", " phsp_generator = TFPhaseSpaceGenerator(\n", " initial_state_mass=reaction.initial_state[-1].mass,\n", @@ -542,8 +540,7 @@ "def unfold_intensity(model: HelicityModel) -> sp.Expr:\n", " unfolded_intensity = perform_cached_doit(model.intensity)\n", " unfolded_amplitudes = {\n", - " symbol: perform_cached_doit(expr)\n", - " for symbol, expr in model.amplitudes.items()\n", + " symbol: perform_cached_doit(expr) for symbol, expr in model.amplitudes.items()\n", " }\n", " return unfolded_intensity.xreplace(unfolded_amplitudes)\n", "\n", @@ -646,8 +643,7 @@ " for symbol, value in all_parameters.items():\n", " value = \"+1\"\n", " if (\n", - " symbol.name.startswith(R\"\\mathcal{H}^\\mathrm{decay}\")\n", - " and \"+\" in symbol.name\n", + " symbol.name.startswith(R\"\\mathcal{H}^\\mathrm{decay}\") and \"+\" in symbol.name\n", " ) and any(s in symbol.name for s in [\"{1}\", \"*\", \"rho\"]):\n", " value = \"-1\"\n", " sliders[symbol.name] = ToggleButtons(\n", @@ -679,7 +675,7 @@ " options={to_unicode(p): p.latex for p in resonances},\n", " value=[resonances[0].latex, resonances[1].latex],\n", " layout=Layout(\n", - " height=f\"{14 * (len(resonances)+1)}pt\",\n", + " height=f\"{14 * (len(resonances) + 1)}pt\",\n", " width=\"auto\",\n", " ),\n", ")\n", @@ -688,36 +684,32 @@ "ipywidgets.link((hide_expressions, \"value\"), (simplify_expressions, \"disabled\"))\n", "\n", "package_names = (\"AmpForm\", \"AmpForm-DPD\")\n", - "ui = HBox(\n", - " [\n", - " VBox([resonance_selector, hide_expressions, simplify_expressions]),\n", - " Tab(\n", - " children=[\n", - " Accordion(\n", - " children=[\n", - " GridBox(\n", - " [\n", - " sliders[key]\n", - " for key in sorted(sliders)\n", - " if p.latex in key\n", - " if (\n", - " key[0] in {\"C\", \"H\"}\n", - " if package == \"AmpForm\"\n", - " else key.startswith(R\"\\mathcal{H}\")\n", - " )\n", - " ]\n", + "ui = HBox([\n", + " VBox([resonance_selector, hide_expressions, simplify_expressions]),\n", + " Tab(\n", + " children=[\n", + " Accordion(\n", + " children=[\n", + " GridBox([\n", + " sliders[key]\n", + " for key in sorted(sliders)\n", + " if p.latex in key\n", + " if (\n", + " key[0] in {\"C\", \"H\"}\n", + " if package == \"AmpForm\"\n", + " else key.startswith(R\"\\mathcal{H}\")\n", " )\n", - " for package in package_names\n", - " ],\n", - " selected_index=1,\n", - " titles=package_names,\n", - " )\n", - " for p in resonances\n", - " ],\n", - " titles=[to_unicode(p) for p in resonances],\n", - " ),\n", - " ]\n", - ")" + " ])\n", + " for package in package_names\n", + " ],\n", + " selected_index=1,\n", + " titles=package_names,\n", + " )\n", + " for p in resonances\n", + " ],\n", + " titles=[to_unicode(p) for p in resonances],\n", + " ),\n", + "])" ] }, { @@ -821,9 +813,7 @@ " ampform_intensities = compute_sub_intensities(\n", " ampform_func, ampform_phsp, selected_resonances\n", " )\n", - " dpd_intensities = compute_sub_intensities(\n", - " dpd_func, dpd_phsp, selected_resonances\n", - " )\n", + " dpd_intensities = compute_sub_intensities(dpd_func, dpd_phsp, selected_resonances)\n", "\n", " s_edges = jnp.linspace(0.98, 1.38, num=50)\n", " amp_values_s1, _ = jnp.histogram(\n", diff --git a/docs/comparison/jpsi2phipipi.ipynb b/docs/comparison/jpsi2phipipi.ipynb index a1b6ccb1..86a4e55e 100644 --- a/docs/comparison/jpsi2phipipi.ipynb +++ b/docs/comparison/jpsi2phipipi.ipynb @@ -488,9 +488,7 @@ }, "outputs": [], "source": [ - "def generate_phase_space(\n", - " reaction: ReactionInfo, size: int\n", - ") -> dict[str, jnp.ndarray]:\n", + "def generate_phase_space(reaction: ReactionInfo, size: int) -> dict[str, jnp.ndarray]:\n", " rng = TFUniformRealNumberGenerator(seed=0)\n", " phsp_generator = TFPhaseSpaceGenerator(\n", " initial_state_mass=reaction.initial_state[-1].mass,\n", @@ -525,8 +523,7 @@ "def unfold_intensity(model: HelicityModel) -> sp.Expr:\n", " unfolded_intensity = perform_cached_doit(model.intensity)\n", " unfolded_amplitudes = {\n", - " symbol: perform_cached_doit(expr)\n", - " for symbol, expr in model.amplitudes.items()\n", + " symbol: perform_cached_doit(expr) for symbol, expr in model.amplitudes.items()\n", " }\n", " return unfolded_intensity.xreplace(unfolded_amplitudes)\n", "\n", @@ -629,8 +626,7 @@ " for symbol, value in all_parameters.items():\n", " value = \"+1\"\n", " if (\n", - " symbol.name.startswith(R\"\\mathcal{H}^\\mathrm{decay}\")\n", - " and \"+\" in symbol.name\n", + " symbol.name.startswith(R\"\\mathcal{H}^\\mathrm{decay}\") and \"+\" in symbol.name\n", " ) and any(s in symbol.name for s in [\"{1}\", \"*\", \"rho\"]):\n", " value = \"-1\"\n", " sliders[symbol.name] = ToggleButtons(\n", @@ -662,7 +658,7 @@ " options={to_unicode(p): p.latex for p in resonances},\n", " value=[resonances[0].latex, resonances[1].latex],\n", " layout=Layout(\n", - " height=f\"{14 * (len(resonances)+1)}pt\",\n", + " height=f\"{14 * (len(resonances) + 1)}pt\",\n", " width=\"auto\",\n", " ),\n", ")\n", @@ -671,36 +667,32 @@ "ipywidgets.link((hide_expressions, \"value\"), (simplify_expressions, \"disabled\"))\n", "\n", "package_names = (\"AmpForm\", \"AmpForm-DPD\")\n", - "ui = HBox(\n", - " [\n", - " VBox([resonance_selector, hide_expressions, simplify_expressions]),\n", - " Tab(\n", - " children=[\n", - " Accordion(\n", - " children=[\n", - " GridBox(\n", - " [\n", - " sliders[key]\n", - " for key in sorted(sliders)\n", - " if p.latex in key\n", - " if (\n", - " key[0] in {\"C\", \"H\"}\n", - " if package == \"AmpForm\"\n", - " else key.startswith(R\"\\mathcal{H}\")\n", - " )\n", - " ]\n", + "ui = HBox([\n", + " VBox([resonance_selector, hide_expressions, simplify_expressions]),\n", + " Tab(\n", + " children=[\n", + " Accordion(\n", + " children=[\n", + " GridBox([\n", + " sliders[key]\n", + " for key in sorted(sliders)\n", + " if p.latex in key\n", + " if (\n", + " key[0] in {\"C\", \"H\"}\n", + " if package == \"AmpForm\"\n", + " else key.startswith(R\"\\mathcal{H}\")\n", " )\n", - " for package in package_names\n", - " ],\n", - " selected_index=1,\n", - " titles=package_names,\n", - " )\n", - " for p in resonances\n", - " ],\n", - " titles=[to_unicode(p) for p in resonances],\n", - " ),\n", - " ]\n", - ")" + " ])\n", + " for package in package_names\n", + " ],\n", + " selected_index=1,\n", + " titles=package_names,\n", + " )\n", + " for p in resonances\n", + " ],\n", + " titles=[to_unicode(p) for p in resonances],\n", + " ),\n", + "])" ] }, { @@ -804,9 +796,7 @@ " ampform_intensities = compute_sub_intensities(\n", " ampform_func, ampform_phsp, selected_resonances\n", " )\n", - " dpd_intensities = compute_sub_intensities(\n", - " dpd_func, dpd_phsp, selected_resonances\n", - " )\n", + " dpd_intensities = compute_sub_intensities(dpd_func, dpd_phsp, selected_resonances)\n", "\n", " s1_edges = jnp.linspace(0.2, 2.1, num=50)\n", " s23_edges = jnp.linspace(1.1, 3.0, num=50)\n", diff --git a/docs/comparison/jpsi2pipipi.ipynb b/docs/comparison/jpsi2pipipi.ipynb index 218ec960..6529c77b 100644 --- a/docs/comparison/jpsi2pipipi.ipynb +++ b/docs/comparison/jpsi2pipipi.ipynb @@ -488,9 +488,7 @@ }, "outputs": [], "source": [ - "def generate_phase_space(\n", - " reaction: ReactionInfo, size: int\n", - ") -> dict[str, jnp.ndarray]:\n", + "def generate_phase_space(reaction: ReactionInfo, size: int) -> dict[str, jnp.ndarray]:\n", " rng = TFUniformRealNumberGenerator(seed=0)\n", " phsp_generator = TFPhaseSpaceGenerator(\n", " initial_state_mass=reaction.initial_state[-1].mass,\n", @@ -525,8 +523,7 @@ "def unfold_intensity(model: HelicityModel) -> sp.Expr:\n", " unfolded_intensity = perform_cached_doit(model.intensity)\n", " unfolded_amplitudes = {\n", - " symbol: perform_cached_doit(expr)\n", - " for symbol, expr in model.amplitudes.items()\n", + " symbol: perform_cached_doit(expr) for symbol, expr in model.amplitudes.items()\n", " }\n", " return unfolded_intensity.xreplace(unfolded_amplitudes)\n", "\n", @@ -629,8 +626,7 @@ " for symbol, value in all_parameters.items():\n", " value = \"+1\"\n", " if (\n", - " symbol.name.startswith(R\"\\mathcal{H}^\\mathrm{decay}\")\n", - " and \"+\" in symbol.name\n", + " symbol.name.startswith(R\"\\mathcal{H}^\\mathrm{decay}\") and \"+\" in symbol.name\n", " ) and any(s in symbol.name for s in [\"{1}\", \"*\", \"rho\"]):\n", " value = \"-1\"\n", " sliders[symbol.name] = ToggleButtons(\n", @@ -662,7 +658,7 @@ " options={to_unicode(p): p.latex for p in resonances},\n", " value=[resonances[0].latex, resonances[1].latex],\n", " layout=Layout(\n", - " height=f\"{14 * (len(resonances)+1)}pt\",\n", + " height=f\"{14 * (len(resonances) + 1)}pt\",\n", " width=\"auto\",\n", " ),\n", ")\n", @@ -671,36 +667,32 @@ "ipywidgets.link((hide_expressions, \"value\"), (simplify_expressions, \"disabled\"))\n", "\n", "package_names = (\"AmpForm\", \"AmpForm-DPD\")\n", - "ui = HBox(\n", - " [\n", - " VBox([resonance_selector, hide_expressions, simplify_expressions]),\n", - " Tab(\n", - " children=[\n", - " Accordion(\n", - " children=[\n", - " GridBox(\n", - " [\n", - " sliders[key]\n", - " for key in sorted(sliders)\n", - " if p.latex in key\n", - " if (\n", - " key[0] in {\"C\", \"H\"}\n", - " if package == \"AmpForm\"\n", - " else key.startswith(R\"\\mathcal{H}\")\n", - " )\n", - " ]\n", + "ui = HBox([\n", + " VBox([resonance_selector, hide_expressions, simplify_expressions]),\n", + " Tab(\n", + " children=[\n", + " Accordion(\n", + " children=[\n", + " GridBox([\n", + " sliders[key]\n", + " for key in sorted(sliders)\n", + " if p.latex in key\n", + " if (\n", + " key[0] in {\"C\", \"H\"}\n", + " if package == \"AmpForm\"\n", + " else key.startswith(R\"\\mathcal{H}\")\n", " )\n", - " for package in package_names\n", - " ],\n", - " selected_index=1,\n", - " titles=package_names,\n", - " )\n", - " for p in resonances\n", - " ],\n", - " titles=[to_unicode(p) for p in resonances],\n", - " ),\n", - " ]\n", - ")" + " ])\n", + " for package in package_names\n", + " ],\n", + " selected_index=1,\n", + " titles=package_names,\n", + " )\n", + " for p in resonances\n", + " ],\n", + " titles=[to_unicode(p) for p in resonances],\n", + " ),\n", + "])" ] }, { @@ -804,9 +796,7 @@ " ampform_intensities = compute_sub_intensities(\n", " ampform_func, ampform_phsp, selected_resonances\n", " )\n", - " dpd_intensities = compute_sub_intensities(\n", - " dpd_func, dpd_phsp, selected_resonances\n", - " )\n", + " dpd_intensities = compute_sub_intensities(dpd_func, dpd_phsp, selected_resonances)\n", "\n", " s_edges = jnp.linspace(0.2, 3.0, num=50)\n", " amp_values_s1, _ = jnp.histogram(\n", diff --git a/docs/conf.py b/docs/conf.py index fa66d87b..d77150b7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -9,21 +9,19 @@ set_intersphinx_version_remapping, ) -set_intersphinx_version_remapping( - { - "ipython": { - "8.12.2": "8.12.1", - "8.12.3": "8.12.1", - }, - "ipywidgets": { - "8.0.3": "8.0.5", - "8.0.4": "8.0.5", - "8.0.6": "8.0.5", - "8.1.1": "8.1.2", - }, - "mpl-interactions": {"0.24.1": "0.24.0"}, - } -) +set_intersphinx_version_remapping({ + "ipython": { + "8.12.2": "8.12.1", + "8.12.3": "8.12.1", + }, + "ipywidgets": { + "8.0.3": "8.0.5", + "8.0.4": "8.0.5", + "8.0.6": "8.0.5", + "8.1.1": "8.1.2", + }, + "mpl-interactions": {"0.24.1": "0.24.0"}, +}) BRANCH = get_branch_name() ORGANIZATION = "ComPWA" @@ -54,15 +52,13 @@ api_target_types: dict[str, str] = {} author = "Common Partial Wave Analysis" autodoc_default_options = { - "exclude-members": ", ".join( - [ - "default_assumptions", - "doit", - "evaluate", - "is_commutative", - "is_extended_real", - ] - ), + "exclude-members": ", ".join([ + "default_assumptions", + "doit", + "evaluate", + "is_commutative", + "is_extended_real", + ]), "members": True, "undoc-members": True, "show-inheritance": True, diff --git a/docs/jpsi2ksp.ipynb b/docs/jpsi2ksp.ipynb index a9c3a0d1..eb381860 100644 --- a/docs/jpsi2ksp.ipynb +++ b/docs/jpsi2ksp.ipynb @@ -179,9 +179,7 @@ " child1, child2, spectator = Σ, pbar, K\n", " else:\n", " raise NotImplementedError\n", - " prod_ls_couplings = _generate_ls(\n", - " Jpsi, resonance, spectator, conserve_parity=False\n", - " )\n", + " prod_ls_couplings = _generate_ls(Jpsi, resonance, spectator, conserve_parity=False)\n", " dec_ls_couplings = _generate_ls(resonance, child1, child2, conserve_parity=True)\n", " if min_ls:\n", " decay = IsobarNode(\n", @@ -328,9 +326,7 @@ " angular_momentum: Any\n", " meson_radius: Any\n", "\n", - " _latex_repr_ = (\n", - " R\"\\mathcal{{F}}_{{{angular_momentum}}}\\left({s}, {m1}, {m1}\\right)\"\n", - " )\n", + " _latex_repr_ = R\"\\mathcal{{F}}_{{{angular_momentum}}}\\left({s}, {m1}, {m1}\\right)\"\n", "\n", " def evaluate(self):\n", " s, m1, m2, angular_momentum, meson_radius = self.args\n", @@ -372,9 +368,7 @@ " decay_chain: ThreeBodyDecayChain,\n", ") -> tuple[sp.Expr, dict[sp.Symbol, float]]:\n", " production_node = decay_chain.decay\n", - " assert isinstance(\n", - " production_node.child1, IsobarNode\n", - " ), \"Not a 3-body isobar decay\"\n", + " assert isinstance(production_node.child1, IsobarNode), \"Not a 3-body isobar decay\"\n", " decay_node = production_node.child1\n", "\n", " s = _get_mandelstam_s(decay_chain)\n", diff --git a/src/ampform_dpd/angles.py b/src/ampform_dpd/angles.py index 3efed26e..d420f158 100644 --- a/src/ampform_dpd/angles.py +++ b/src/ampform_dpd/angles.py @@ -94,49 +94,37 @@ def formulate_zeta_angle( # noqa: C901, PLR0911 cos_zeta_expr = ( 2 * m1**2 * (σ2 - m0**2 - m2**2) + (m0**2 + m1**2 - σ1) * (σ3 - m1**2 - m2**2) - ) / ( - sp.sqrt(Kallen(m0**2, m1**2, σ1)) * sp.sqrt(Kallen(σ3, m1**2, m2**2)) - ) + ) / (sp.sqrt(Kallen(m0**2, m1**2, σ1)) * sp.sqrt(Kallen(σ3, m1**2, m2**2))) return zeta_symbol, sp.acos(cos_zeta_expr) if (rotated_state, aligned_subsystem, reference_subsystem) == (1, 2, 1): cos_zeta_expr = ( 2 * m1**2 * (σ3 - m0**2 - m3**2) + (m0**2 + m1**2 - σ1) * (σ2 - m1**2 - m3**2) - ) / ( - sp.sqrt(Kallen(m0**2, m1**2, σ1)) * sp.sqrt(Kallen(σ2, m1**2, m3**2)) - ) + ) / (sp.sqrt(Kallen(m0**2, m1**2, σ1)) * sp.sqrt(Kallen(σ2, m1**2, m3**2))) return zeta_symbol, sp.acos(cos_zeta_expr) if (rotated_state, aligned_subsystem, reference_subsystem) == (2, 2, 1): cos_zeta_expr = ( 2 * m2**2 * (σ3 - m0**2 - m3**2) + (m0**2 + m2**2 - σ2) * (σ1 - m2**2 - m3**2) - ) / ( - sp.sqrt(Kallen(m0**2, m2**2, σ2)) * sp.sqrt(Kallen(σ1, m2**2, m3**2)) - ) + ) / (sp.sqrt(Kallen(m0**2, m2**2, σ2)) * sp.sqrt(Kallen(σ1, m2**2, m3**2))) return zeta_symbol, sp.acos(cos_zeta_expr) if (rotated_state, aligned_subsystem, reference_subsystem) == (2, 3, 2): cos_zeta_expr = ( 2 * m2**2 * (σ1 - m0**2 - m1**2) + (m0**2 + m2**2 - σ2) * (σ3 - m2**2 - m1**2) - ) / ( - sp.sqrt(Kallen(m0**2, m2**2, σ2)) * sp.sqrt(Kallen(σ3, m2**2, m1**2)) - ) + ) / (sp.sqrt(Kallen(m0**2, m2**2, σ2)) * sp.sqrt(Kallen(σ3, m2**2, m1**2))) return zeta_symbol, sp.acos(cos_zeta_expr) if (rotated_state, aligned_subsystem, reference_subsystem) == (3, 3, 2): cos_zeta_expr = ( 2 * m3**2 * (σ1 - m0**2 - m1**2) + (m0**2 + m3**2 - σ3) * (σ2 - m3**2 - m1**2) - ) / ( - sp.sqrt(Kallen(m0**2, m3**2, σ3)) * sp.sqrt(Kallen(σ2, m3**2, m1**2)) - ) + ) / (sp.sqrt(Kallen(m0**2, m3**2, σ3)) * sp.sqrt(Kallen(σ2, m3**2, m1**2))) return zeta_symbol, sp.acos(cos_zeta_expr) if (rotated_state, aligned_subsystem, reference_subsystem) == (3, 1, 3): cos_zeta_expr = ( 2 * m3**2 * (σ2 - m0**2 - m2**2) + (m0**2 + m3**2 - σ3) * (σ1 - m3**2 - m2**2) - ) / ( - sp.sqrt(Kallen(m0**2, m3**2, σ3)) * sp.sqrt(Kallen(σ1, m3**2, m2**2)) - ) + ) / (sp.sqrt(Kallen(m0**2, m3**2, σ3)) * sp.sqrt(Kallen(σ1, m3**2, m2**2))) return zeta_symbol, sp.acos(cos_zeta_expr) if (rotated_state, aligned_subsystem, reference_subsystem) in { # Eq (A10) (1, 2, 3), @@ -153,9 +141,7 @@ def create_symbols(i): cos_zeta_expr = ( 2 * mi**2 * (mj**2 + mk**2 - σi) + (σj - mi**2 - mk**2) * (σk - mi**2 - mj**2) - ) / ( - sp.sqrt(Kallen(σj, mk**2, mi**2)) * sp.sqrt(Kallen(σk, mi**2, mj**2)) - ) + ) / (sp.sqrt(Kallen(σj, mk**2, mi**2)) * sp.sqrt(Kallen(σk, mi**2, mj**2))) return zeta_symbol, sp.acos(cos_zeta_expr) if (rotated_state, aligned_subsystem, reference_subsystem) in { (1, 3, 1), diff --git a/src/ampform_dpd/dynamics.py b/src/ampform_dpd/dynamics.py index 3c824bce..c1ec11bf 100644 --- a/src/ampform_dpd/dynamics.py +++ b/src/ampform_dpd/dynamics.py @@ -147,6 +147,6 @@ def evaluate(self) -> sp.Piecewise: 1: 1 / (1 + z**2), 2: 1 / (9 + 3 * z**2 + z**4), } - return sp.Piecewise( - *[(sp.sqrt(expr), sp.Eq(L, l_val)) for l_val, expr in cases.items()] - ) + return sp.Piecewise(*[ + (sp.sqrt(expr), sp.Eq(L, l_val)) for l_val, expr in cases.items() + ])