diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index 610c6ead3..baa62c5f8 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -1,22 +1,22 @@ # 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 accessible-pygments==0.0.5 -alabaster==0.7.16 +alabaster==1.0.0 anyio==4.4.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 asttokens==2.4.1 async-lru==2.0.4 -attrs==23.2.0 +attrs==24.2.0 babel==2.15.0 beautifulsoup4==4.12.3 -black==24.4.2 +black==24.8.0 bleach==6.1.0 -cachetools==5.3.3 +cachetools==5.4.0 cattrs==23.2.3 -certifi==2024.6.2 -cffi==1.16.0 +certifi==2024.7.4 +cffi==1.17.0 cfgv==3.4.0 chardet==5.2.0 charset-normalizer==3.3.2 @@ -24,20 +24,20 @@ click==8.1.7 colorama==0.4.6 comm==0.2.2 contourpy==1.2.1 -coverage==7.5.4 +coverage==7.6.1 cycler==0.12.1 -debugpy==1.8.1 +debugpy==1.8.5 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 docstring-to-markdown==0.15 docutils==0.21.2 -exceptiongroup==1.2.1 +exceptiongroup==1.2.2 execnet==2.1.1 executing==2.0.1 fastjsonschema==2.20.0 filelock==3.15.4 -fonttools==4.53.0 +fonttools==4.53.1 fqdn==1.5.1 gitdb==4.0.11 gitpython==3.1.43 @@ -48,39 +48,38 @@ h11==0.14.0 hepunits==2.3.4 httpcore==1.0.5 httpx==0.27.0 -identify==2.5.36 +identify==2.6.0 idna==3.7 imagesize==1.4.1 -importlib-metadata==7.2.1 +importlib-metadata==8.2.0 iniconfig==2.0.0 -ipykernel==6.29.4 +ipykernel==6.29.5 ipympl==0.9.4 -ipython==8.25.0 +ipython==8.26.0 ipython-genutils==0.2.0 ipywidgets==8.1.3 isoduration==20.11.0 -isort==5.13.2 jedi==0.19.1 jinja2==3.1.4 json5==0.9.25 jsonpointer==3.0.0 -jsonschema==4.22.0 +jsonschema==4.23.0 jsonschema-specifications==2023.12.1 jupyter-cache==1.0.0 jupyter-client==8.6.2 jupyter-core==5.7.2 jupyter-events==0.10.0 jupyter-lsp==2.2.5 -jupyter-server==2.14.1 +jupyter-server==2.14.2 jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.5.3 -jupyterlab==4.2.2 -jupyterlab-code-formatter==2.2.1 +jupyterlab==4.2.4 +jupyterlab-code-formatter==3.0.1 jupyterlab-git==0.50.1 jupyterlab-lsp==5.1.0 jupyterlab-myst==2.4.2 jupyterlab-pygments==0.3.0 -jupyterlab-server==2.27.2 +jupyterlab-server==2.27.3 jupyterlab-widgets==3.0.11 kiwisolver==1.4.5 latexcodec==3.0.0 @@ -94,10 +93,10 @@ mdurl==0.1.2 mistune==3.0.2 mpl-interactions==0.24.1 mpmath==1.3.0 -mypy==1.10.0 +mypy==1.11.1 mypy-extensions==1.0.0 -myst-nb==1.1.0 -myst-parser==3.0.1 +myst-nb==1.1.1 +myst-parser==4.0.0 nbclient==0.6.8 nbconvert==7.16.4 nbdime==4.0.1 @@ -106,7 +105,7 @@ nbmake==1.5.4 nest-asyncio==1.6.0 nodeenv==1.9.1 notebook-shim==0.2.4 -numpy==2.0.0 +numpy==2.0.1 overrides==7.7.0 packaging==24.1 pandocfilters==1.5.1 @@ -114,24 +113,24 @@ parso==0.8.4 particle==0.24.0 pathspec==0.12.1 pexpect==4.9.0 -pillow==10.3.0 +pillow==10.4.0 platformdirs==4.2.2 pluggy==1.5.0 -pre-commit==3.7.1 +pre-commit==3.8.0 prometheus-client==0.20.0 prompt-toolkit==3.0.47 psutil==6.0.0 ptyprocess==0.7.0 -pure-eval==0.2.2 +pure-eval==0.2.3 py-cpuinfo==9.0.0 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.22 -pydata-sphinx-theme==0.15.3 +pydata-sphinx-theme==0.15.4 pygments==2.18.0 pyparsing==3.1.2 pyproject-api==1.7.1 -pytest==8.2.2 +pytest==8.3.2 pytest-benchmark==4.0.0 pytest-cov==5.0.0 pytest-profiling==1.7.0 @@ -140,11 +139,11 @@ python-constraint2==2.0.0b5 python-dateutil==2.9.0.post0 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.2.1 +python-lsp-ruff==2.2.2 python-lsp-server==1.11.0 pytoolconfig==1.3.1 -pyyaml==6.0.1 -pyzmq==26.0.3 +pyyaml==6.0.2 +pyzmq==26.1.0 qrules==0.10.2 referencing==0.35.1 requests==2.32.3 @@ -152,60 +151,60 @@ rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.1 rope==1.13.0 -rpds-py==0.18.1 -ruff==0.4.10 -scipy==1.13.1 +rpds-py==0.20.0 +ruff==0.5.6 +scipy==1.14.0 send2trash==1.8.3 six==1.16.0 smmap==5.0.1 sniffio==1.3.1 snowballstemmer==2.2.0 soupsieve==2.5 -sphinx==7.3.7 +sphinx==8.0.2 sphinx-api-relink==0.0.9 sphinx-autobuild==2024.4.16 sphinx-book-theme==1.1.3 sphinx-codeautolink==0.15.2 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 -sphinx-design==0.6.0 +sphinx-design==0.6.1 sphinx-hep-pdgref==0.2.0 sphinx-pybtex-etal-style==0.0.2 sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.8 +sphinxcontrib-applehelp==2.0.0 sphinxcontrib-bibtex==2.6.2 -sphinxcontrib-devhelp==1.0.6 -sphinxcontrib-htmlhelp==2.0.5 +sphinxcontrib-devhelp==2.0.0 +sphinxcontrib-htmlhelp==2.1.0 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.7 -sphinxcontrib-serializinghtml==1.1.10 -sqlalchemy==2.0.31 +sphinxcontrib-qthelp==2.0.0 +sphinxcontrib-serializinghtml==2.0.0 +sqlalchemy==2.0.32 stack-data==0.6.3 -starlette==0.37.2 +starlette==0.38.2 sympy==1.13.1 tabulate==0.9.0 terminado==0.18.1 tinycss2==1.3.0 tomli==2.0.1 tornado==6.4.1 -tox==4.15.1 -tqdm==4.66.4 +tox==4.17.0 +tqdm==4.66.5 traitlets==5.14.3 types-python-dateutil==2.9.0.20240316 typing-extensions==4.12.2 ujson==5.10.0 uri-template==1.3.0 urllib3==2.2.2 -uvicorn==0.30.1 +uvicorn==0.30.5 virtualenv==20.26.3 -watchfiles==0.22.0 +watchfiles==0.23.0 wcwidth==0.2.13 webcolors==24.6.0 webencodings==0.5.1 websocket-client==1.8.0 websockets==12.0 -wheel==0.43.0 +wheel==0.44.0 widgetsnbextension==4.0.11 zipp==3.19.2 diff --git a/.constraints/py3.11.txt b/.constraints/py3.11.txt index d93c316b2..e7dd78955 100644 --- a/.constraints/py3.11.txt +++ b/.constraints/py3.11.txt @@ -1,22 +1,22 @@ # 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 accessible-pygments==0.0.5 -alabaster==0.7.16 +alabaster==1.0.0 anyio==4.4.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 asttokens==2.4.1 async-lru==2.0.4 -attrs==23.2.0 +attrs==24.2.0 babel==2.15.0 beautifulsoup4==4.12.3 -black==24.4.2 +black==24.8.0 bleach==6.1.0 -cachetools==5.3.3 +cachetools==5.4.0 cattrs==23.2.3 -certifi==2024.6.2 -cffi==1.16.0 +certifi==2024.7.4 +cffi==1.17.0 cfgv==3.4.0 chardet==5.2.0 charset-normalizer==3.3.2 @@ -24,9 +24,9 @@ click==8.1.7 colorama==0.4.6 comm==0.2.2 contourpy==1.2.1 -coverage==7.5.4 +coverage==7.6.1 cycler==0.12.1 -debugpy==1.8.1 +debugpy==1.8.5 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 @@ -36,7 +36,7 @@ execnet==2.1.1 executing==2.0.1 fastjsonschema==2.20.0 filelock==3.15.4 -fonttools==4.53.0 +fonttools==4.53.1 fqdn==1.5.1 gitdb==4.0.11 gitpython==3.1.43 @@ -47,39 +47,38 @@ h11==0.14.0 hepunits==2.3.4 httpcore==1.0.5 httpx==0.27.0 -identify==2.5.36 +identify==2.6.0 idna==3.7 imagesize==1.4.1 -importlib-metadata==7.2.1 +importlib-metadata==8.2.0 iniconfig==2.0.0 -ipykernel==6.29.4 +ipykernel==6.29.5 ipympl==0.9.4 -ipython==8.25.0 +ipython==8.26.0 ipython-genutils==0.2.0 ipywidgets==8.1.3 isoduration==20.11.0 -isort==5.13.2 jedi==0.19.1 jinja2==3.1.4 json5==0.9.25 jsonpointer==3.0.0 -jsonschema==4.22.0 +jsonschema==4.23.0 jsonschema-specifications==2023.12.1 jupyter-cache==1.0.0 jupyter-client==8.6.2 jupyter-core==5.7.2 jupyter-events==0.10.0 jupyter-lsp==2.2.5 -jupyter-server==2.14.1 +jupyter-server==2.14.2 jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.5.3 -jupyterlab==4.2.2 -jupyterlab-code-formatter==2.2.1 +jupyterlab==4.2.4 +jupyterlab-code-formatter==3.0.1 jupyterlab-git==0.50.1 jupyterlab-lsp==5.1.0 jupyterlab-myst==2.4.2 jupyterlab-pygments==0.3.0 -jupyterlab-server==2.27.2 +jupyterlab-server==2.27.3 jupyterlab-widgets==3.0.11 kiwisolver==1.4.5 latexcodec==3.0.0 @@ -93,10 +92,10 @@ mdurl==0.1.2 mistune==3.0.2 mpl-interactions==0.24.1 mpmath==1.3.0 -mypy==1.10.0 +mypy==1.11.1 mypy-extensions==1.0.0 -myst-nb==1.1.0 -myst-parser==3.0.1 +myst-nb==1.1.1 +myst-parser==4.0.0 nbclient==0.6.8 nbconvert==7.16.4 nbdime==4.0.1 @@ -105,7 +104,7 @@ nbmake==1.5.4 nest-asyncio==1.6.0 nodeenv==1.9.1 notebook-shim==0.2.4 -numpy==2.0.0 +numpy==2.0.1 overrides==7.7.0 packaging==24.1 pandocfilters==1.5.1 @@ -113,24 +112,24 @@ parso==0.8.4 particle==0.24.0 pathspec==0.12.1 pexpect==4.9.0 -pillow==10.3.0 +pillow==10.4.0 platformdirs==4.2.2 pluggy==1.5.0 -pre-commit==3.7.1 +pre-commit==3.8.0 prometheus-client==0.20.0 prompt-toolkit==3.0.47 psutil==6.0.0 ptyprocess==0.7.0 -pure-eval==0.2.2 +pure-eval==0.2.3 py-cpuinfo==9.0.0 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.22 -pydata-sphinx-theme==0.15.3 +pydata-sphinx-theme==0.15.4 pygments==2.18.0 pyparsing==3.1.2 pyproject-api==1.7.1 -pytest==8.2.2 +pytest==8.3.2 pytest-benchmark==4.0.0 pytest-cov==5.0.0 pytest-profiling==1.7.0 @@ -139,11 +138,11 @@ python-constraint2==2.0.0b5 python-dateutil==2.9.0.post0 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.2.1 +python-lsp-ruff==2.2.2 python-lsp-server==1.11.0 pytoolconfig==1.3.1 -pyyaml==6.0.1 -pyzmq==26.0.3 +pyyaml==6.0.2 +pyzmq==26.1.0 qrules==0.10.2 referencing==0.35.1 requests==2.32.3 @@ -151,59 +150,59 @@ rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.1 rope==1.13.0 -rpds-py==0.18.1 -ruff==0.4.10 -scipy==1.13.1 +rpds-py==0.20.0 +ruff==0.5.6 +scipy==1.14.0 send2trash==1.8.3 six==1.16.0 smmap==5.0.1 sniffio==1.3.1 snowballstemmer==2.2.0 soupsieve==2.5 -sphinx==7.3.7 +sphinx==8.0.2 sphinx-api-relink==0.0.9 sphinx-autobuild==2024.4.16 sphinx-book-theme==1.1.3 sphinx-codeautolink==0.15.2 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 -sphinx-design==0.6.0 +sphinx-design==0.6.1 sphinx-hep-pdgref==0.2.0 sphinx-pybtex-etal-style==0.0.2 sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.8 +sphinxcontrib-applehelp==2.0.0 sphinxcontrib-bibtex==2.6.2 -sphinxcontrib-devhelp==1.0.6 -sphinxcontrib-htmlhelp==2.0.5 +sphinxcontrib-devhelp==2.0.0 +sphinxcontrib-htmlhelp==2.1.0 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.7 -sphinxcontrib-serializinghtml==1.1.10 -sqlalchemy==2.0.31 +sphinxcontrib-qthelp==2.0.0 +sphinxcontrib-serializinghtml==2.0.0 +sqlalchemy==2.0.32 stack-data==0.6.3 -starlette==0.37.2 +starlette==0.38.2 sympy==1.13.1 tabulate==0.9.0 terminado==0.18.1 tinycss2==1.3.0 tornado==6.4.1 -tox==4.15.1 -tqdm==4.66.4 +tox==4.17.0 +tqdm==4.66.5 traitlets==5.14.3 types-python-dateutil==2.9.0.20240316 typing-extensions==4.12.2 ujson==5.10.0 uri-template==1.3.0 urllib3==2.2.2 -uvicorn==0.30.1 +uvicorn==0.30.5 virtualenv==20.26.3 -watchfiles==0.22.0 +watchfiles==0.23.0 wcwidth==0.2.13 webcolors==24.6.0 webencodings==0.5.1 websocket-client==1.8.0 websockets==12.0 -wheel==0.43.0 +wheel==0.44.0 widgetsnbextension==4.0.11 zipp==3.19.2 diff --git a/.constraints/py3.12.txt b/.constraints/py3.12.txt index 416369118..7a71524b9 100644 --- a/.constraints/py3.12.txt +++ b/.constraints/py3.12.txt @@ -1,22 +1,22 @@ # This file was autogenerated by uv via the following command: # uv pip compile pyproject.toml -o .constraints/py3.12.txt --all-extras --no-annotate --python-version=3.12 --no-emit-package setuptools accessible-pygments==0.0.5 -alabaster==0.7.16 +alabaster==1.0.0 anyio==4.4.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 asttokens==2.4.1 async-lru==2.0.4 -attrs==23.2.0 +attrs==24.2.0 babel==2.15.0 beautifulsoup4==4.12.3 -black==24.4.2 +black==24.8.0 bleach==6.1.0 -cachetools==5.3.3 +cachetools==5.4.0 cattrs==23.2.3 -certifi==2024.6.2 -cffi==1.16.0 +certifi==2024.7.4 +cffi==1.17.0 cfgv==3.4.0 chardet==5.2.0 charset-normalizer==3.3.2 @@ -24,9 +24,9 @@ click==8.1.7 colorama==0.4.6 comm==0.2.2 contourpy==1.2.1 -coverage==7.5.4 +coverage==7.6.1 cycler==0.12.1 -debugpy==1.8.1 +debugpy==1.8.5 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 @@ -36,7 +36,7 @@ execnet==2.1.1 executing==2.0.1 fastjsonschema==2.20.0 filelock==3.15.4 -fonttools==4.53.0 +fonttools==4.53.1 fqdn==1.5.1 gitdb==4.0.11 gitpython==3.1.43 @@ -47,39 +47,38 @@ h11==0.14.0 hepunits==2.3.4 httpcore==1.0.5 httpx==0.27.0 -identify==2.5.36 +identify==2.6.0 idna==3.7 imagesize==1.4.1 -importlib-metadata==7.2.1 +importlib-metadata==8.2.0 iniconfig==2.0.0 -ipykernel==6.29.4 +ipykernel==6.29.5 ipympl==0.9.4 -ipython==8.25.0 +ipython==8.26.0 ipython-genutils==0.2.0 ipywidgets==8.1.3 isoduration==20.11.0 -isort==5.13.2 jedi==0.19.1 jinja2==3.1.4 json5==0.9.25 jsonpointer==3.0.0 -jsonschema==4.22.0 +jsonschema==4.23.0 jsonschema-specifications==2023.12.1 jupyter-cache==1.0.0 jupyter-client==8.6.2 jupyter-core==5.7.2 jupyter-events==0.10.0 jupyter-lsp==2.2.5 -jupyter-server==2.14.1 +jupyter-server==2.14.2 jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.5.3 -jupyterlab==4.2.2 -jupyterlab-code-formatter==2.2.1 +jupyterlab==4.2.4 +jupyterlab-code-formatter==3.0.1 jupyterlab-git==0.50.1 jupyterlab-lsp==5.1.0 jupyterlab-myst==2.4.2 jupyterlab-pygments==0.3.0 -jupyterlab-server==2.27.2 +jupyterlab-server==2.27.3 jupyterlab-widgets==3.0.11 kiwisolver==1.4.5 latexcodec==3.0.0 @@ -93,10 +92,10 @@ mdurl==0.1.2 mistune==3.0.2 mpl-interactions==0.24.1 mpmath==1.3.0 -mypy==1.10.0 +mypy==1.11.1 mypy-extensions==1.0.0 -myst-nb==1.1.0 -myst-parser==3.0.1 +myst-nb==1.1.1 +myst-parser==4.0.0 nbclient==0.6.8 nbconvert==7.16.4 nbdime==4.0.1 @@ -105,7 +104,7 @@ nbmake==1.5.4 nest-asyncio==1.6.0 nodeenv==1.9.1 notebook-shim==0.2.4 -numpy==2.0.0 +numpy==2.0.1 overrides==7.7.0 packaging==24.1 pandocfilters==1.5.1 @@ -113,24 +112,24 @@ parso==0.8.4 particle==0.24.0 pathspec==0.12.1 pexpect==4.9.0 -pillow==10.3.0 +pillow==10.4.0 platformdirs==4.2.2 pluggy==1.5.0 -pre-commit==3.7.1 +pre-commit==3.8.0 prometheus-client==0.20.0 prompt-toolkit==3.0.47 psutil==6.0.0 ptyprocess==0.7.0 -pure-eval==0.2.2 +pure-eval==0.2.3 py-cpuinfo==9.0.0 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.22 -pydata-sphinx-theme==0.15.3 +pydata-sphinx-theme==0.15.4 pygments==2.18.0 pyparsing==3.1.2 pyproject-api==1.7.1 -pytest==8.2.2 +pytest==8.3.2 pytest-benchmark==4.0.0 pytest-cov==5.0.0 pytest-profiling==1.7.0 @@ -139,11 +138,11 @@ python-constraint2==2.0.0b5 python-dateutil==2.9.0.post0 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.2.1 +python-lsp-ruff==2.2.2 python-lsp-server==1.11.0 pytoolconfig==1.3.1 -pyyaml==6.0.1 -pyzmq==26.0.3 +pyyaml==6.0.2 +pyzmq==26.1.0 qrules==0.10.2 referencing==0.35.1 requests==2.32.3 @@ -151,59 +150,59 @@ rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.1 rope==1.13.0 -rpds-py==0.18.1 -ruff==0.4.10 -scipy==1.13.1 +rpds-py==0.20.0 +ruff==0.5.6 +scipy==1.14.0 send2trash==1.8.3 six==1.16.0 smmap==5.0.1 sniffio==1.3.1 snowballstemmer==2.2.0 soupsieve==2.5 -sphinx==7.3.7 +sphinx==8.0.2 sphinx-api-relink==0.0.9 sphinx-autobuild==2024.4.16 sphinx-book-theme==1.1.3 sphinx-codeautolink==0.15.2 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 -sphinx-design==0.6.0 +sphinx-design==0.6.1 sphinx-hep-pdgref==0.2.0 sphinx-pybtex-etal-style==0.0.2 sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.8 +sphinxcontrib-applehelp==2.0.0 sphinxcontrib-bibtex==2.6.2 -sphinxcontrib-devhelp==1.0.6 -sphinxcontrib-htmlhelp==2.0.5 +sphinxcontrib-devhelp==2.0.0 +sphinxcontrib-htmlhelp==2.1.0 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.7 -sphinxcontrib-serializinghtml==1.1.10 -sqlalchemy==2.0.31 +sphinxcontrib-qthelp==2.0.0 +sphinxcontrib-serializinghtml==2.0.0 +sqlalchemy==2.0.32 stack-data==0.6.3 -starlette==0.37.2 +starlette==0.38.2 sympy==1.13.1 tabulate==0.9.0 terminado==0.18.1 tinycss2==1.3.0 tornado==6.4.1 -tox==4.15.1 -tqdm==4.66.4 +tox==4.17.0 +tqdm==4.66.5 traitlets==5.14.3 types-python-dateutil==2.9.0.20240316 typing-extensions==4.12.2 ujson==5.10.0 uri-template==1.3.0 urllib3==2.2.2 -uvicorn==0.30.1 +uvicorn==0.30.5 virtualenv==20.26.3 -watchfiles==0.22.0 +watchfiles==0.23.0 wcwidth==0.2.13 webcolors==24.6.0 webencodings==0.5.1 websocket-client==1.8.0 websockets==12.0 -wheel==0.43.0 +wheel==0.44.0 widgetsnbextension==4.0.11 zipp==3.19.2 diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index 1f420d7d2..e9a17a68b 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -8,16 +8,16 @@ anyio==3.7.1 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 -attrs==23.2.0 +attrs==24.2.0 babel==2.14.0 backcall==0.2.0 beautifulsoup4==4.12.3 black==23.3.0 bleach==6.0.0 cached-property==1.5.2 -cachetools==5.3.3 +cachetools==5.4.0 cattrs==23.1.2 -certifi==2024.6.2 +certifi==2024.7.4 cffi==1.15.1 cfgv==3.3.1 chardet==5.2.0 @@ -34,7 +34,7 @@ distlib==0.3.8 docstring-to-markdown==0.15 docutils==0.17.1 entrypoints==0.4 -exceptiongroup==1.2.1 +exceptiongroup==1.2.2 execnet==2.0.2 fastjsonschema==2.20.0 filelock==3.12.2 @@ -58,7 +58,6 @@ ipython==7.34.0 ipython-genutils==0.2.0 ipywidgets==8.1.3 isoduration==20.11.0 -isort==5.11.5 jedi==0.18.2 jinja2==3.1.4 json5==0.9.16 @@ -75,7 +74,7 @@ jupyter-server-mathjax==0.2.6 jupyter-server-ydoc==0.8.0 jupyter-ydoc==0.2.5 jupyterlab==3.6.7 -jupyterlab-code-formatter==2.2.1 +jupyterlab-code-formatter==3.0.1 jupyterlab-git==0.44.0 jupyterlab-lsp==3.10.2 jupyterlab-myst==1.2.0 @@ -150,7 +149,7 @@ python-lsp-server==1.7.4 pytoolconfig==1.3.0 pytz==2024.1 pyyaml==6.0.1 -pyzmq==26.0.3 +pyzmq==26.1.0 qrules==0.10.2 requests==2.31.0 rfc3339-validator==0.1.4 @@ -185,7 +184,7 @@ sphinxcontrib-htmlhelp==2.0.0 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -sqlalchemy==1.4.52 +sqlalchemy==1.4.53 sympy==1.10.1 tabulate==0.9.0 terminado==0.17.1 @@ -193,7 +192,7 @@ tinycss2==1.2.1 tomli==2.0.1 tornado==6.2 tox==4.8.0 -tqdm==4.66.4 +tqdm==4.66.5 traitlets==5.9.0 typed-ast==1.5.5 typing-extensions==4.7.1 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index 97a6c41ab..acd28f4d1 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -8,16 +8,16 @@ argon2-cffi-bindings==21.2.0 arrow==1.3.0 asttokens==2.4.1 async-lru==2.0.4 -attrs==23.2.0 +attrs==24.2.0 babel==2.15.0 backcall==0.2.0 beautifulsoup4==4.12.3 -black==24.4.2 +black==24.8.0 bleach==6.1.0 -cachetools==5.3.3 +cachetools==5.4.0 cattrs==23.2.3 -certifi==2024.6.2 -cffi==1.16.0 +certifi==2024.7.4 +cffi==1.17.0 cfgv==3.4.0 chardet==5.2.0 charset-normalizer==3.3.2 @@ -25,20 +25,20 @@ click==8.1.7 colorama==0.4.6 comm==0.2.2 contourpy==1.1.1 -coverage==7.5.4 +coverage==7.6.1 cycler==0.12.1 -debugpy==1.8.1 +debugpy==1.8.5 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 docstring-to-markdown==0.15 docutils==0.17.1 -exceptiongroup==1.2.1 +exceptiongroup==1.2.2 execnet==2.1.1 executing==2.0.1 fastjsonschema==2.20.0 filelock==3.15.4 -fonttools==4.53.0 +fonttools==4.53.1 fqdn==1.5.1 gitdb==4.0.11 gitpython==3.1.43 @@ -49,40 +49,39 @@ h11==0.14.0 hepunits==2.3.4 httpcore==1.0.5 httpx==0.27.0 -identify==2.5.36 +identify==2.6.0 idna==3.7 imagesize==1.4.1 -importlib-metadata==7.2.1 +importlib-metadata==8.2.0 importlib-resources==6.4.0 iniconfig==2.0.0 -ipykernel==6.29.4 +ipykernel==6.29.5 ipympl==0.9.3 ipython==8.12.3 ipython-genutils==0.2.0 ipywidgets==8.1.3 isoduration==20.11.0 -isort==5.13.2 jedi==0.19.1 jinja2==3.1.4 json5==0.9.25 jsonpointer==3.0.0 -jsonschema==4.22.0 +jsonschema==4.23.0 jsonschema-specifications==2023.12.1 jupyter-cache==0.6.1 jupyter-client==8.6.2 jupyter-core==5.7.2 jupyter-events==0.10.0 jupyter-lsp==2.2.5 -jupyter-server==2.14.1 +jupyter-server==2.14.2 jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.5.3 -jupyterlab==4.2.2 -jupyterlab-code-formatter==2.2.1 +jupyterlab==4.2.4 +jupyterlab-code-formatter==3.0.1 jupyterlab-git==0.50.1 jupyterlab-lsp==5.1.0 jupyterlab-myst==2.4.2 jupyterlab-pygments==0.3.0 -jupyterlab-server==2.27.2 +jupyterlab-server==2.27.3 jupyterlab-widgets==3.0.11 kiwisolver==1.4.5 latexcodec==3.0.0 @@ -97,7 +96,7 @@ mdurl==0.1.2 mistune==3.0.2 mpl-interactions==0.24.1 mpmath==1.3.0 -mypy==1.10.0 +mypy==1.11.1 mypy-extensions==1.0.0 myst-nb==0.17.2 myst-parser==0.18.1 @@ -118,7 +117,7 @@ particle==0.24.0 pathspec==0.12.1 pexpect==4.9.0 pickleshare==0.7.5 -pillow==10.3.0 +pillow==10.4.0 pkgutil-resolve-name==1.3.10 platformdirs==4.2.2 pluggy==1.5.0 @@ -127,7 +126,7 @@ prometheus-client==0.20.0 prompt-toolkit==3.0.47 psutil==6.0.0 ptyprocess==0.7.0 -pure-eval==0.2.2 +pure-eval==0.2.3 py-cpuinfo==9.0.0 pybtex==0.24.0 pybtex-docutils==1.0.3 @@ -136,7 +135,7 @@ pydata-sphinx-theme==0.14.4 pygments==2.18.0 pyparsing==3.1.2 pyproject-api==1.7.1 -pytest==8.2.2 +pytest==8.3.2 pytest-benchmark==4.0.0 pytest-cov==5.0.0 pytest-profiling==1.7.0 @@ -145,12 +144,12 @@ python-constraint2==2.0.0b5 python-dateutil==2.9.0.post0 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.2.1 +python-lsp-ruff==2.2.2 python-lsp-server==1.11.0 pytoolconfig==1.3.1 pytz==2024.1 -pyyaml==6.0.1 -pyzmq==26.0.3 +pyyaml==6.0.2 +pyzmq==26.1.0 qrules==0.10.2 referencing==0.35.1 requests==2.32.3 @@ -158,8 +157,8 @@ rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.1 rope==1.13.0 -rpds-py==0.18.1 -ruff==0.4.10 +rpds-py==0.20.0 +ruff==0.5.6 scipy==1.10.1 send2trash==1.8.3 six==1.16.0 @@ -186,7 +185,7 @@ sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -sqlalchemy==2.0.31 +sqlalchemy==2.0.32 stack-data==0.6.3 sympy==1.13.1 tabulate==0.9.0 @@ -194,8 +193,8 @@ terminado==0.18.1 tinycss2==1.3.0 tomli==2.0.1 tornado==6.4.1 -tox==4.15.1 -tqdm==4.66.4 +tox==4.17.0 +tqdm==4.66.5 traitlets==5.14.3 types-python-dateutil==2.9.0.20240316 typing-extensions==4.12.2 @@ -207,7 +206,7 @@ wcwidth==0.2.13 webcolors==24.6.0 webencodings==0.5.1 websocket-client==1.8.0 -wheel==0.43.0 +wheel==0.44.0 widgetsnbextension==4.0.11 zipp==3.19.2 diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index ae86bbd4e..4ed309995 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -8,15 +8,15 @@ argon2-cffi-bindings==21.2.0 arrow==1.3.0 asttokens==2.4.1 async-lru==2.0.4 -attrs==23.2.0 +attrs==24.2.0 babel==2.15.0 beautifulsoup4==4.12.3 -black==24.4.2 +black==24.8.0 bleach==6.1.0 -cachetools==5.3.3 +cachetools==5.4.0 cattrs==23.2.3 -certifi==2024.6.2 -cffi==1.16.0 +certifi==2024.7.4 +cffi==1.17.0 cfgv==3.4.0 chardet==5.2.0 charset-normalizer==3.3.2 @@ -24,20 +24,20 @@ click==8.1.7 colorama==0.4.6 comm==0.2.2 contourpy==1.2.1 -coverage==7.5.4 +coverage==7.6.1 cycler==0.12.1 -debugpy==1.8.1 +debugpy==1.8.5 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.8 docstring-to-markdown==0.15 docutils==0.21.2 -exceptiongroup==1.2.1 +exceptiongroup==1.2.2 execnet==2.1.1 executing==2.0.1 fastjsonschema==2.20.0 filelock==3.15.4 -fonttools==4.53.0 +fonttools==4.53.1 fqdn==1.5.1 gitdb==4.0.11 gitpython==3.1.43 @@ -48,40 +48,39 @@ h11==0.14.0 hepunits==2.3.4 httpcore==1.0.5 httpx==0.27.0 -identify==2.5.36 +identify==2.6.0 idna==3.7 imagesize==1.4.1 -importlib-metadata==7.2.1 +importlib-metadata==8.2.0 importlib-resources==6.4.0 iniconfig==2.0.0 -ipykernel==6.29.4 +ipykernel==6.29.5 ipympl==0.9.4 ipython==8.18.1 ipython-genutils==0.2.0 ipywidgets==8.1.3 isoduration==20.11.0 -isort==5.13.2 jedi==0.19.1 jinja2==3.1.4 json5==0.9.25 jsonpointer==3.0.0 -jsonschema==4.22.0 +jsonschema==4.23.0 jsonschema-specifications==2023.12.1 jupyter-cache==1.0.0 jupyter-client==8.6.2 jupyter-core==5.7.2 jupyter-events==0.10.0 jupyter-lsp==2.2.5 -jupyter-server==2.14.1 +jupyter-server==2.14.2 jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.5.3 -jupyterlab==4.2.2 -jupyterlab-code-formatter==2.2.1 +jupyterlab==4.2.4 +jupyterlab-code-formatter==3.0.1 jupyterlab-git==0.50.1 jupyterlab-lsp==5.1.0 jupyterlab-myst==2.4.2 jupyterlab-pygments==0.3.0 -jupyterlab-server==2.27.2 +jupyterlab-server==2.27.3 jupyterlab-widgets==3.0.11 kiwisolver==1.4.5 latexcodec==3.0.0 @@ -95,9 +94,9 @@ mdurl==0.1.2 mistune==3.0.2 mpl-interactions==0.24.1 mpmath==1.3.0 -mypy==1.10.0 +mypy==1.11.1 mypy-extensions==1.0.0 -myst-nb==1.1.0 +myst-nb==1.1.1 myst-parser==3.0.1 nbclient==0.6.8 nbconvert==7.16.4 @@ -107,7 +106,7 @@ nbmake==1.5.4 nest-asyncio==1.6.0 nodeenv==1.9.1 notebook-shim==0.2.4 -numpy==2.0.0 +numpy==2.0.1 overrides==7.7.0 packaging==24.1 pandocfilters==1.5.1 @@ -115,24 +114,24 @@ parso==0.8.4 particle==0.24.0 pathspec==0.12.1 pexpect==4.9.0 -pillow==10.3.0 +pillow==10.4.0 platformdirs==4.2.2 pluggy==1.5.0 -pre-commit==3.7.1 +pre-commit==3.8.0 prometheus-client==0.20.0 prompt-toolkit==3.0.47 psutil==6.0.0 ptyprocess==0.7.0 -pure-eval==0.2.2 +pure-eval==0.2.3 py-cpuinfo==9.0.0 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.22 -pydata-sphinx-theme==0.15.3 +pydata-sphinx-theme==0.15.4 pygments==2.18.0 pyparsing==3.1.2 pyproject-api==1.7.1 -pytest==8.2.2 +pytest==8.3.2 pytest-benchmark==4.0.0 pytest-cov==5.0.0 pytest-profiling==1.7.0 @@ -141,11 +140,11 @@ python-constraint2==2.0.0b5 python-dateutil==2.9.0.post0 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.2.1 +python-lsp-ruff==2.2.2 python-lsp-server==1.11.0 pytoolconfig==1.3.1 -pyyaml==6.0.1 -pyzmq==26.0.3 +pyyaml==6.0.2 +pyzmq==26.1.0 qrules==0.10.2 referencing==0.35.1 requests==2.32.3 @@ -153,8 +152,8 @@ rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.1 rope==1.13.0 -rpds-py==0.18.1 -ruff==0.4.10 +rpds-py==0.20.0 +ruff==0.5.6 scipy==1.13.1 send2trash==1.8.3 six==1.16.0 @@ -162,51 +161,51 @@ smmap==5.0.1 sniffio==1.3.1 snowballstemmer==2.2.0 soupsieve==2.5 -sphinx==7.3.7 +sphinx==7.4.7 sphinx-api-relink==0.0.9 sphinx-autobuild==2024.4.16 sphinx-book-theme==1.1.3 sphinx-codeautolink==0.15.2 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 -sphinx-design==0.6.0 +sphinx-design==0.6.1 sphinx-hep-pdgref==0.2.0 sphinx-pybtex-etal-style==0.0.2 sphinx-thebe==0.3.1 sphinx-togglebutton==0.3.2 -sphinxcontrib-applehelp==1.0.8 +sphinxcontrib-applehelp==2.0.0 sphinxcontrib-bibtex==2.6.2 -sphinxcontrib-devhelp==1.0.6 -sphinxcontrib-htmlhelp==2.0.5 +sphinxcontrib-devhelp==2.0.0 +sphinxcontrib-htmlhelp==2.1.0 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.7 -sphinxcontrib-serializinghtml==1.1.10 -sqlalchemy==2.0.31 +sphinxcontrib-qthelp==2.0.0 +sphinxcontrib-serializinghtml==2.0.0 +sqlalchemy==2.0.32 stack-data==0.6.3 -starlette==0.37.2 +starlette==0.38.2 sympy==1.13.1 tabulate==0.9.0 terminado==0.18.1 tinycss2==1.3.0 tomli==2.0.1 tornado==6.4.1 -tox==4.15.1 -tqdm==4.66.4 +tox==4.17.0 +tqdm==4.66.5 traitlets==5.14.3 types-python-dateutil==2.9.0.20240316 typing-extensions==4.12.2 ujson==5.10.0 uri-template==1.3.0 urllib3==2.2.2 -uvicorn==0.30.1 +uvicorn==0.30.5 virtualenv==20.26.3 -watchfiles==0.22.0 +watchfiles==0.23.0 wcwidth==0.2.13 webcolors==24.6.0 webencodings==0.5.1 websocket-client==1.8.0 websockets==12.0 -wheel==0.43.0 +wheel==0.44.0 widgetsnbextension==4.0.11 zipp==3.19.2 diff --git a/.envrc b/.envrc new file mode 100644 index 000000000..cce3aa58a --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +layout anaconda diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b17a91f1b..b53e978d0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,8 +23,10 @@ repos: - | cell.attachments cell.metadata.code_folding + cell.metadata.editable cell.metadata.id cell.metadata.pycharm + cell.metadata.slideshow cell.metadata.user_expressions metadata.celltoolbar metadata.colab.name @@ -40,7 +42,7 @@ repos: metadata.vscode - repo: https://github.com/ComPWA/policy - rev: 0.3.9 + rev: 0.3.18 hooks: - id: check-dev-files args: @@ -52,6 +54,7 @@ repos: - --repo-title=AmpForm - id: colab-toc-visible - id: fix-nbformat-version + - id: remove-empty-tags - id: set-nb-cells args: - --add-install-cell @@ -59,7 +62,7 @@ repos: - --extras-require=doc,viz - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.10 + rev: v0.5.6 hooks: - id: ruff args: [--fix] @@ -113,7 +116,7 @@ repos: - --in-place - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.29.1 hooks: - id: check-jsonschema name: Check CITATION.cff @@ -126,7 +129,7 @@ repos: pass_filenames: false - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v8.9.0 + rev: v8.13.1 hooks: - id: cspell @@ -152,6 +155,6 @@ repos: - python - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.368 + rev: v1.1.374 hooks: - id: pyright diff --git a/.vscode/settings.json b/.vscode/settings.json index 8b3295360..d72b71939 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -36,6 +36,9 @@ "cSpell.enabled": true, "diffEditor.experimental.showMoves": true, "editor.formatOnSave": true, + "files.associations": { + "**/.constraints/py*.txt": "pip-requirements" + }, "files.watcherExclude": { "**/*_cache/**": true, "**/.eggs/**": true, @@ -64,6 +67,7 @@ "python.analysis.autoImportCompletions": false, "python.analysis.inlayHints.pytestParameters": true, "python.analysis.typeCheckingMode": "strict", + "python.terminal.activateEnvironment": false, "python.testing.pytestArgs": ["--color=no", "--no-cov"], "python.testing.pytestEnabled": true, "python.testing.unittestEnabled": false, diff --git a/benchmarks/conftest.py b/benchmarks/conftest.py index 60f4a55b0..a77fbbc91 100644 --- a/benchmarks/conftest.py +++ b/benchmarks/conftest.py @@ -1,6 +1,6 @@ from _pytest.config import Config -def pytest_configure(config: Config): +def pytest_configure(config: Config) -> None: # cspell:ignore addinivalue config.addinivalue_line("python_files", "*.py") diff --git a/benchmarks/doit_speed.py b/benchmarks/doit_speed.py index 7043ab77f..75405bfb5 100644 --- a/benchmarks/doit_speed.py +++ b/benchmarks/doit_speed.py @@ -14,7 +14,7 @@ @pytest.mark.benchmark(group="doit", min_rounds=1) -def test_doit_speed(benchmark: BenchmarkFixture): +def test_doit_speed(benchmark: BenchmarkFixture) -> None: reaction = qrules.generate_transitions( initial_state=("psi(4160)", [-1, +1]), final_state=["D-", "D0", "pi+"], diff --git a/docs/_extend_docstrings.py b/docs/_extend_docstrings.py index 770e17091..7d44e164c 100644 --- a/docs/_extend_docstrings.py +++ b/docs/_extend_docstrings.py @@ -727,8 +727,8 @@ def _append_to_docstring(class_type: Callable | type, appended_text: str) -> Non def __generate_transitions_cached( - initial_state: list[tuple[str, list[float | int]] | str], - final_state: list[tuple[str, list[float | int]] | str], + initial_state: list[tuple[str, list[float]] | str], + final_state: list[tuple[str, list[float]] | str], formalism: SpinFormalism, ) -> ReactionInfo: version = get_package_version("qrules") diff --git a/docs/conf.py b/docs/conf.py index 89223e143..d6f60ffd5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -134,7 +134,7 @@ def _get_dataclasses(module): "members": True, "undoc-members": True, "show-inheritance": True, - "special-members": ", ".join([ + "special-members": ", ".join([ # noqa: FLY002 "__call__", ]), } diff --git a/docs/usage.ipynb b/docs/usage.ipynb index 4fe601cc9..ed0761d16 100644 --- a/docs/usage.ipynb +++ b/docs/usage.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -108,9 +102,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "import sympy as sp\n", @@ -124,9 +116,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from ampform.dynamics import relativistic_breit_wigner_with_ff\n", @@ -146,9 +136,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from ampform.dynamics.kmatrix import NonRelativisticKMatrix\n", @@ -163,9 +151,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "matrix = NonRelativisticKMatrix.formulate(n_poles=1, n_channels=2)\n", @@ -196,9 +182,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "import qrules\n", @@ -214,9 +198,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "import ampform\n", @@ -259,9 +241,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "reaction = qrules.generate_transitions(\n", diff --git a/docs/usage/amplitude.ipynb b/docs/usage/amplitude.ipynb index d022e41a6..745b74727 100644 --- a/docs/usage/amplitude.ipynb +++ b/docs/usage/amplitude.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -91,9 +85,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "## Generate transitions" ] @@ -252,9 +244,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "intensities = model_no_dynamics.expression.args\n", @@ -269,9 +259,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "some_amplitude.doit()" @@ -378,8 +366,7 @@ { "cell_type": "markdown", "metadata": { - "jp-MarkdownHeadingCollapsed": true, - "tags": [] + "jp-MarkdownHeadingCollapsed": true }, "source": [ "#### Scalar masses" @@ -703,9 +690,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "some_amplitude, *_ = model.components.values()\n", diff --git a/docs/usage/dynamics.ipynb b/docs/usage/dynamics.ipynb index a19e15b87..2be6a48e9 100644 --- a/docs/usage/dynamics.ipynb +++ b/docs/usage/dynamics.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -58,9 +52,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "# Dynamics" ] @@ -126,9 +118,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "## Form factor" ] @@ -143,9 +133,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from ampform.dynamics.form_factor import BlattWeisskopfSquared\n", @@ -159,13 +147,9 @@ "cell_type": "code", "execution_count": null, "metadata": { - "editable": true, "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "" - }, "tags": [ "hide-input" ] @@ -184,13 +168,9 @@ "cell_type": "code", "execution_count": null, "metadata": { - "editable": true, "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "" - }, "tags": [ "hide-input" ] @@ -242,13 +222,9 @@ "cell_type": "code", "execution_count": null, "metadata": { - "editable": true, "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "" - }, "tags": [ "hide-input" ] @@ -380,9 +356,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "### _Without_ form factor" ] @@ -397,9 +371,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from ampform.dynamics import relativistic_breit_wigner\n", @@ -426,9 +398,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from ampform.dynamics import PhaseSpaceFactorSWave, relativistic_breit_wigner_with_ff\n", @@ -459,8 +429,7 @@ "metadata": { "jupyter": { "source_hidden": true - }, - "tags": [] + } }, "outputs": [], "source": [ @@ -489,9 +458,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "### Analytic continuation" ] diff --git a/docs/usage/dynamics/analytic-continuation.ipynb b/docs/usage/dynamics/analytic-continuation.ipynb index b9ed3a207..e67f67525 100644 --- a/docs/usage/dynamics/analytic-continuation.ipynb +++ b/docs/usage/dynamics/analytic-continuation.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -140,9 +134,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from ampform.dynamics import BreakupMomentumSquared\n", @@ -221,9 +213,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from ampform.dynamics import EqualMassPhaseSpaceFactor\n", @@ -267,9 +257,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "### 5) Chew-Mandelstam for $S$-waves" ] @@ -299,9 +287,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "## Visualization" ] @@ -346,9 +332,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from ampform.sympy.math import ComplexSqrt\n", @@ -376,9 +360,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "plot_domain = np.linspace(0, 3, 500)\n", diff --git a/docs/usage/dynamics/custom.ipynb b/docs/usage/dynamics/custom.ipynb index e5cfe7d92..afcffe7e0 100644 --- a/docs/usage/dynamics/custom.ipynb +++ b/docs/usage/dynamics/custom.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -159,9 +153,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "import inspect\n", @@ -307,9 +299,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "m, theta = free_symbols\n", diff --git a/docs/usage/dynamics/k-matrix.ipynb b/docs/usage/dynamics/k-matrix.ipynb index 24dd7bd89..e0368a908 100644 --- a/docs/usage/dynamics/k-matrix.ipynb +++ b/docs/usage/dynamics/k-matrix.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -301,18 +295,14 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "### Lorentz-invariance" ] }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "The description so far did not take Lorentz-invariance into account. For this, we first need to define a **two-body phase space matrix** $\\boldsymbol{\\rho}$:\n", "\n", @@ -359,9 +349,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "### Production processes\n", "\n", @@ -464,9 +452,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "### Pole parametrization" ] @@ -902,9 +888,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "rel_k_matrix_2r = kmatrix.RelativisticKMatrix.formulate(\n", @@ -1059,9 +1043,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "f_vector_2r = kmatrix.NonRelativisticPVector.formulate(n_poles=2, n_channels=1)\n", @@ -1101,8 +1083,7 @@ "metadata": { "jupyter": { "source_hidden": true - }, - "tags": [] + } }, "outputs": [], "source": [ diff --git a/docs/usage/helicity/formalism.ipynb b/docs/usage/helicity/formalism.ipynb index 2e345a9f3..62fc2ec09 100644 --- a/docs/usage/helicity/formalism.ipynb +++ b/docs/usage/helicity/formalism.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -118,9 +112,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "def generate_transitions(formalism: str):\n", @@ -385,9 +377,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "reaction = qrules.generate_transitions(\n", @@ -424,9 +414,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "builder.naming.insert_parent_helicities = False\n", diff --git a/docs/usage/helicity/spin-alignment.ipynb b/docs/usage/helicity/spin-alignment.ipynb index 5f38d1519..8308998c3 100644 --- a/docs/usage/helicity/spin-alignment.ipynb +++ b/docs/usage/helicity/spin-alignment.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -58,9 +52,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "# Spin alignment" ] @@ -109,9 +101,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "reaction = qrules.generate_transitions(\n", @@ -154,9 +144,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from ampform.helicity.align import NoAlignment\n", @@ -330,9 +318,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "## Axis-angle method" ] @@ -347,9 +333,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from ampform.helicity.align.axisangle import AxisAngleAlignment\n", diff --git a/docs/usage/interactive.ipynb b/docs/usage/interactive.ipynb index 4423773fb..ba0299d84 100644 --- a/docs/usage/interactive.ipynb +++ b/docs/usage/interactive.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -58,12 +52,7 @@ }, { "cell_type": "markdown", - "metadata": { - "slideshow": { - "slide_type": "skip" - }, - "tags": [] - }, + "metadata": {}, "source": [ "# Inspect model interactively" ] @@ -92,9 +81,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "import qrules\n", @@ -162,9 +149,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "## Lambdify" ] @@ -229,9 +214,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", @@ -275,9 +258,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ ":::{margin}\n", "\n", @@ -431,9 +412,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ ":::{margin}\n", "\n", @@ -522,9 +501,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ ":::{margin}\n", "\n", diff --git a/docs/usage/kinematics.ipynb b/docs/usage/kinematics.ipynb index 77a7774cc..37d4f08d0 100644 --- a/docs/usage/kinematics.ipynb +++ b/docs/usage/kinematics.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -58,9 +52,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "# Kinematics" ] @@ -104,9 +96,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from ampform.kinematics.lorentz import (\n", @@ -177,9 +167,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", @@ -207,9 +195,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "Bz_func(pz_array, pz_array)" @@ -238,9 +224,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "B_func = sp.lambdify([p, q], B_expr.doit(), cse=True)\n", @@ -258,9 +242,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "B_func(px_array, px_array)" @@ -275,9 +257,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ ":::{margin}\n", "This notebook originates from {doc}`compwa:report/017`.\n", @@ -348,9 +328,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "and $\\lambda$ is the **Källén function**:" ] @@ -404,9 +382,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "See {doc}`compwa:report/017` for an interactive visualization of the phase space region and an analytic expression for the phase space boundary." ] diff --git a/docs/usage/modify.ipynb b/docs/usage/modify.ipynb index ad18b2724..e8efca216 100644 --- a/docs/usage/modify.ipynb +++ b/docs/usage/modify.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -151,9 +145,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "renames = {\n", @@ -170,9 +162,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "new_model.parameter_defaults" @@ -181,9 +171,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "new_model.components[R\"I_{J/\\psi(1S)_{+1} \\to \\gamma_{+1} \\pi^{0}_{0} \\pi^{0}_{0}}\"]" @@ -206,9 +194,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "original_coefficients = [\n", diff --git a/docs/usage/symplot.ipynb b/docs/usage/symplot.ipynb index f259b0b21..477831978 100644 --- a/docs/usage/symplot.ipynb +++ b/docs/usage/symplot.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -208,9 +202,7 @@ }, { "cell_type": "markdown", - "metadata": { - "tags": [] - }, + "metadata": {}, "source": [ "{{ run_interactive }}" ] diff --git a/docs/usage/sympy.ipynb b/docs/usage/sympy.ipynb index 88224d310..483189b68 100644 --- a/docs/usage/sympy.ipynb +++ b/docs/usage/sympy.ipynb @@ -10,9 +10,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell", "skip-execution" @@ -34,9 +31,6 @@ "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "skip" - }, "tags": [ "remove-cell" ] @@ -164,10 +158,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "editable": true, - "slideshow": { - "slide_type": "" - }, "tags": [ "hide-input" ] @@ -341,13 +331,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "editable": true, - "slideshow": { - "slide_type": "" - }, - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "from ampform.sympy import UnevaluatableIntegral\n", @@ -376,13 +360,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "editable": true, - "slideshow": { - "slide_type": "" - }, - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "integral_expr = UnevaluatableIntegral(sp.exp(x) / (x**p + 1), (x, a, b))\n", @@ -392,13 +370,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "editable": true, - "slideshow": { - "slide_type": "" - }, - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", @@ -415,13 +387,9 @@ "cell_type": "code", "execution_count": null, "metadata": { - "editable": true, "jupyter": { "source_hidden": true }, - "slideshow": { - "slide_type": "" - }, "tags": [ "hide-input", "scroll-input" @@ -461,13 +429,7 @@ }, { "cell_type": "markdown", - "metadata": { - "editable": true, - "slideshow": { - "slide_type": "" - }, - "tags": [] - }, + "metadata": {}, "source": [ "The arrays can be complex-valued as well. This is particularly useful when calculating dispersion integrals (see **[TR-003](https://compwa.github.io/report/003#general-dispersion-integral)**)." ] @@ -475,13 +437,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "editable": true, - "slideshow": { - "slide_type": "" - }, - "tags": [] - }, + "metadata": {}, "outputs": [], "source": [ "integral_func(\n", @@ -493,13 +449,7 @@ }, { "cell_type": "markdown", - "metadata": { - "editable": true, - "slideshow": { - "slide_type": "" - }, - "tags": [] - }, + "metadata": {}, "source": [ "## Summations" ] diff --git a/pyproject.toml b/pyproject.toml index 18c09ff4b..33db44fbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,10 +88,8 @@ doc = [ "sphinxcontrib-bibtex >=2", ] jupyter = [ - "black", - "isort", "jupyterlab", - "jupyterlab-code-formatter", + "jupyterlab-code-formatter >=3.0.0", "jupyterlab-git", "jupyterlab-lsp", "jupyterlab-myst", @@ -250,6 +248,7 @@ addopts = [ ] filterwarnings = [ "error", + "ignore: The `hash` argument is deprecated in favor of `unsafe_hash` and will be removed in or after August 2025.:DeprecationWarning", "ignore:.*invalid value encountered in sqrt.*:RuntimeWarning", "ignore:.*is deprecated and slated for removal in Python 3.14:DeprecationWarning", "ignore:.*the @ampform.sympy.unevaluated_expression decorator instead( with commutative=True)?:DeprecationWarning", @@ -288,39 +287,11 @@ docstring-code-format = true line-ending = "lf" [tool.ruff.lint] -extend-select = [ - "A", - "B", - "BLE", - "C4", - "C90", - "D", - "EM", - "ERA", - "FA", - "I", - "ICN", - "INP", - "ISC", - "N", - "NPY", - "PGH", - "PIE", - "PL", - "Q", - "RET", - "RSE", - "RUF", - "S", - "SIM", - "T20", - "TCH", - "TID", - "TRY", - "UP", - "YTT", -] ignore = [ + "ANN", + "ARG00", + "COM812", + "CPY001", "D101", "D102", "D103", @@ -330,13 +301,22 @@ ignore = [ "D213", "D407", "D416", + "DOC", "E501", + "FBT00", + "FURB101", + "FURB103", + "FURB140", + "G004", "ISC001", "PLR0913", "PLW1514", "PLW2901", + "PT001", + "PTH", "SIM108", ] +select = ["ALL"] task-tags = ["cspell"] [tool.ruff.lint.flake8-bugbear] @@ -344,12 +324,26 @@ extend-immutable-calls = [ "ampform.sympy._decorator.argument", ] +[tool.ruff.lint.flake8-builtins] +builtins-ignorelist = ["display"] + +[tool.ruff.lint.flake8-comprehensions] +allow-dict-calls-with-keyword-arguments = true + +[tool.ruff.lint.flake8-self] +ignore-names = [ + "_latex", + "_module", + "_numpycode", + "_print", +] + [tool.ruff.lint.isort] known-third-party = ["sympy"] split-on-trailing-comma = false [tool.ruff.lint.per-file-ignores] -"**/docs/usage/dynamics.ipynb" = ["RUF027"] +"**/docs/usage/dynamics.ipynb" = ["FURB118", "RUF027"] "**/docs/usage/symplot.ipynb" = ["RUF027"] "**/docs/usage/sympy.ipynb" = ["E731"] "*.ipynb" = [ @@ -357,6 +351,7 @@ split-on-trailing-comma = false "C408", "C90", "D", + "E303", "E402", "E703", "F404", @@ -371,12 +366,20 @@ split-on-trailing-comma = false "S101", "S301", "S403", + "SLF001", "T20", "TCH00", ] "benchmarks/*" = [ "D", + "INP001", + "PGH001", + "PLC2701", + "PLR2004", + "PLR6301", "S101", + "SLF001", + "T20", ] "docs/*" = [ "E402", @@ -403,12 +406,12 @@ split-on-trailing-comma = false "INP001", "PGH001", "PLC2701", - "PLR0913", "PLR0914", "PLR0917", "PLR2004", "PLR6301", "S101", + "SLF001", "T20", ] diff --git a/src/ampform/dynamics/builder.py b/src/ampform/dynamics/builder.py index 2a5904c53..a4415b4eb 100644 --- a/src/ampform/dynamics/builder.py +++ b/src/ampform/dynamics/builder.py @@ -84,7 +84,7 @@ def create_non_dynamic_with_ff( if variable_pool.angular_momentum is None: msg = "Angular momentum is not defined but is required in the form factor!" raise ValueError(msg) - res_identifier = resonance.latex if resonance.latex else resonance.name + res_identifier = resonance.latex or resonance.name meson_radius = sp.Symbol(f"d_{{{res_identifier}}}", positive=True) form_factor = FormFactor( s=variable_pool.incoming_state_mass**2, @@ -153,7 +153,7 @@ def __simple_breit_wigner( resonance: Particle, variable_pool: TwoBodyKinematicVariableSet ) -> BuilderReturnType: inv_mass = variable_pool.incoming_state_mass - identifier = resonance.latex if resonance.latex else resonance.name + identifier = resonance.latex or resonance.name res_mass = sp.Symbol(f"m_{{{identifier}}}", nonnegative=True) res_width = sp.Symbol(Rf"\Gamma_{{{identifier}}}", nonnegative=True) expression = relativistic_breit_wigner( @@ -226,7 +226,7 @@ def __create_form_factor( def __create_symbols( resonance: Particle, ) -> tuple[sp.Symbol, sp.Symbol, sp.Symbol]: - identifier = resonance.latex if resonance.latex else resonance.name + identifier = resonance.latex or resonance.name res_mass = sp.Symbol(f"m_{{{identifier}}}", nonnegative=True) res_width = sp.Symbol(Rf"\Gamma_{{{identifier}}}", nonnegative=True) meson_radius = sp.Symbol(f"d_{{{identifier}}}", positive=True) diff --git a/src/ampform/io/__init__.py b/src/ampform/io/__init__.py index 78ade6467..cfdd783a9 100644 --- a/src/ampform/io/__init__.py +++ b/src/ampform/io/__init__.py @@ -48,7 +48,7 @@ def _(obj: complex, **kwargs) -> str: return f"{real}{plus}{imag}i" -def __downcast(obj: float, **kwargs) -> float | int: +def __downcast(obj: float, **kwargs) -> float: if obj.is_integer(): return int(obj) return obj @@ -128,7 +128,7 @@ def improve_latex_rendering() -> None: .. versionadded:: 0.14.2 """ - def _print_Indexed_latex(self, printer, *args): # noqa: N802 + def _print_Indexed_latex(self, printer, *args) -> str: # noqa: N802 base = printer._print(self.base) indices = ", ".join(map(printer._print, self.indices)) return f"{base}_{{{indices}}}" diff --git a/src/ampform/kinematics/lorentz.py b/src/ampform/kinematics/lorentz.py index 076f50554..0aeab4496 100644 --- a/src/ampform/kinematics/lorentz.py +++ b/src/ampform/kinematics/lorentz.py @@ -76,7 +76,7 @@ def _implement_latex_subscript( # pyright: ignore[reportUnusedFunction] def decorator(decorated_class: type[ExprClass]) -> type[ExprClass]: def _latex_repr_(self: sp.Expr, printer: LatexPrinter, *args) -> str: momentum = printer._print(self.momentum) # type: ignore[attr-defined] - if printer._needs_mul_brackets(self.momentum): # type: ignore[attr-defined] + if printer._needs_mul_brackets(self.momentum): # type: ignore[attr-defined] # noqa: SLF001 momentum = Rf"\left({momentum}\right)" else: momentum = Rf"{{{momentum}}}" diff --git a/src/ampform/sympy/__init__.py b/src/ampform/sympy/__init__.py index 150e7864b..75ff53049 100644 --- a/src/ampform/sympy/__init__.py +++ b/src/ampform/sympy/__init__.py @@ -46,6 +46,10 @@ from importlib_metadata import version else: from importlib.metadata import version +if sys.version_info < (3, 11): + from typing_extensions import Self +else: + from typing import Self if sys.version_info < (3, 12): from typing_extensions import override else: @@ -137,7 +141,7 @@ def __new__( *indices: tuple[sp.Symbol, Iterable[sp.Basic]], evaluate: bool = False, **hints, - ) -> PoolSum: + ) -> Self: converted_indices = [] for idx_symbol, values in indices: values = tuple(values) @@ -307,8 +311,8 @@ def doit(self, **hints): args = [arg.doit(**hints) for arg in self.args] return self.func(*args) - @override - def _numpycode(self, printer, *args): + @override # type:ignore[misc] + def _numpycode(self, printer, *args) -> str: _warn_if_scipy_not_installed() integration_vars, limits = _unpack_integral_limits(self) if len(limits) != 1 or len(integration_vars) != 1: diff --git a/src/ampform/sympy/_array_expressions.py b/src/ampform/sympy/_array_expressions.py index fbab1270e..84e5b3b99 100644 --- a/src/ampform/sympy/_array_expressions.py +++ b/src/ampform/sympy/_array_expressions.py @@ -27,6 +27,10 @@ get_shape, ) +if sys.version_info < (3, 11): + from typing_extensions import Self +else: + from typing import Self if sys.version_info < (3, 12): from typing_extensions import override else: @@ -37,7 +41,7 @@ class ArrayElement(_ArrayExpr): @override - def __new__(cls, parent: sp.Expr, indices: Iterable) -> ArrayElement: + def __new__(cls, parent: sp.Expr, indices: Iterable) -> Self: # cspell:ignore sympified sympified_indices = sp.Tuple(*map(_sympify, indices)) parent_shape = get_shape(parent) @@ -73,7 +77,7 @@ def indices(self) -> sp.Tuple: # required for lambdify -_ArrayExpr._iterable = False # type: ignore[attr-defined] +_ArrayExpr._iterable = False # type: ignore[attr-defined] # noqa: SLF001 @overload @@ -132,7 +136,7 @@ def __new__( cls, parent: sp.Basic, indices: tuple[sp.Basic | int | slice, ...], - ) -> ArraySlice: + ) -> Self: parent_shape = get_shape(parent) normalized_indices = [] for idx, axis_size in zip_longest(indices, parent_shape): @@ -249,17 +253,17 @@ def _slice_to_str(self: Printer, x, dim) -> str: return ":".join("" if xi in {none, None} else self._print(xi) for xi in x) -LatexPrinter._print_ArrayElement = _print_latex_ArrayElement # type: ignore[assignment] -LatexPrinter._print_ArraySlice = _print_latex_ArraySlice # type: ignore[attr-defined] -StrPrinter._print_ArrayElement = _print_str_ArrayElement # type: ignore[assignment] -StrPrinter._print_ArraySlice = _print_str_ArraySlice # type: ignore[attr-defined] +LatexPrinter._print_ArrayElement = _print_latex_ArrayElement # type: ignore[assignment] # noqa: SLF001 +LatexPrinter._print_ArraySlice = _print_latex_ArraySlice # type: ignore[attr-defined] # noqa: SLF001 +StrPrinter._print_ArrayElement = _print_str_ArrayElement # type: ignore[assignment] # noqa: SLF001 +StrPrinter._print_ArraySlice = _print_str_ArraySlice # type: ignore[attr-defined] # noqa: SLF001 class ArraySum(sp.Expr): precedence = PRECEDENCE["Add"] @override - def __new__(cls, *terms: sp.Basic, **hints) -> ArraySum: + def __new__(cls, *terms: sp.Basic, **hints) -> Self: terms = sp.sympify(terms) return sp.Expr.__new__(cls, *terms, **hints) @@ -274,7 +278,7 @@ def _latex(self, printer: LatexPrinter, *args) -> str: name = next(iter(names)) subscript = "".join(map(_get_subscript, self.terms)) return f"{{{name}}}_{{{subscript}}}" - return printer._print_ArraySum(self) # type: ignore[attr-defined] + return printer._print_ArraySum(self) # type: ignore[attr-defined] # noqa: SLF001 def _print_array_sum(self: Printer, expr: ArraySum) -> str: @@ -282,7 +286,7 @@ def _print_array_sum(self: Printer, expr: ArraySum) -> str: return " + ".join(terms) -Printer._print_ArraySum = _print_array_sum # type: ignore[attr-defined] +Printer._print_ArraySum = _print_array_sum # type: ignore[attr-defined] # noqa: SLF001 def _get_subscript(symbol: sp.Basic) -> str: @@ -316,7 +320,7 @@ class ArrayAxisSum(sp.Expr): is_commutative = True @override - def __new__(cls, array: sp.Expr, axis: int | None = None, **hints) -> ArrayAxisSum: + def __new__(cls, array: sp.Expr, axis: int | None = None, **hints) -> Self: if axis is not None and not isinstance(axis, (int, sp.Integer)): msg = "Only single digits allowed for axis" raise TypeError(msg) @@ -356,7 +360,7 @@ class ArrayMultiplication(sp.Expr): """ @override - def __new__(cls, *tensors: sp.Basic, **hints) -> ArrayMultiplication: + def __new__(cls, *tensors: sp.Basic, **hints) -> Self: tensors = sp.sympify(tensors) return sp.Expr.__new__(cls, *tensors, **hints) @@ -411,7 +415,7 @@ class MatrixMultiplication(sp.Expr): """ @override - def __new__(cls, *tensors: sp.Basic, **hints) -> MatrixMultiplication: + def __new__(cls, *tensors: sp.Basic, **hints) -> Self: tensors = sp.sympify(tensors) return sp.Expr.__new__(cls, *tensors, **hints) diff --git a/src/ampform/sympy/_cache.py b/src/ampform/sympy/_cache.py index 4eedf83b6..41d0f3e1d 100644 --- a/src/ampform/sympy/_cache.py +++ b/src/ampform/sympy/_cache.py @@ -77,7 +77,7 @@ def _get_python_hash_seed() -> int | None: @functools.lru_cache(maxsize=None) # warn once -def _warn_about_unsafe_hash(): +def _warn_about_unsafe_hash() -> None: message = """ PYTHONHASHSEED has not been set. For faster and safer hashing of SymPy expressions, set the PYTHONHASHSEED environment variable to a fixed value and rerun the program. diff --git a/src/ampform/sympy/_decorator.py b/src/ampform/sympy/_decorator.py index ebd5a27a4..9d41a7ed4 100644 --- a/src/ampform/sympy/_decorator.py +++ b/src/ampform/sympy/_decorator.py @@ -489,7 +489,7 @@ def _eval_subs_method(self, old, new, **hints): continue if isclass(old_arg): continue - new_attr = old_arg._subs(old, new, **hints) + new_attr = old_arg._subs(old, new, **hints) # noqa: SLF001 if not _aresame(new_attr, old_arg): hit = True new_args[i] = new_attr @@ -533,7 +533,7 @@ def _xreplace_method(self, rule) -> tuple[sp.Expr, bool]: hit = False for arg in _get_arguments(self): if hasattr(arg, "_xreplace") and not isclass(arg): - replace_result, is_replaced = arg._xreplace(rule) + replace_result, is_replaced = arg._xreplace(rule) # noqa: SLF001 elif isinstance(rule, abc.Mapping): is_replaced = bool(arg in rule) replace_result = rule.get(arg, arg) diff --git a/src/ampform/sympy/deprecated.py b/src/ampform/sympy/deprecated.py index 135caaf34..f7093155f 100644 --- a/src/ampform/sympy/deprecated.py +++ b/src/ampform/sympy/deprecated.py @@ -95,10 +95,10 @@ def __new__( """ # https://github.com/sympy/sympy/blob/1.8/sympy/core/basic.py#L113-L119 obj = object.__new__(cls) - obj._args = args - obj._assumptions = cls.default_assumptions # type: ignore[attr-defined] - obj._mhash = None # cspell:ignore mhash - obj._name = name + obj._args = args # noqa: SLF001 + obj._assumptions = cls.default_assumptions # type: ignore[attr-defined] # noqa: SLF001 + obj._mhash = None # cspell:ignore mhash # noqa: SLF001 + obj._name = name # noqa: SLF001 return obj def __getnewargs_ex__(self) -> tuple[tuple, dict]: diff --git a/src/ampform/sympy/math.py b/src/ampform/sympy/math.py index 04c40dcd5..b7370c088 100644 --- a/src/ampform/sympy/math.py +++ b/src/ampform/sympy/math.py @@ -1,4 +1,4 @@ -"""A collection of basic math operations, used in `ampform.dynamics`.""" +"""A collection of basic math operations, used in `ampform.dynamics`.""" # noqa: A005 # cspell:ignore Lambdifier from __future__ import annotations diff --git a/src/symplot/__init__.py b/src/symplot/__init__.py index 9b7409200..6b504a2dc 100644 --- a/src/symplot/__init__.py +++ b/src/symplot/__init__.py @@ -166,7 +166,7 @@ def set_values(self, *args: dict[str, float], **kwargs: float) -> None: for keyword, value in value_mapping.items(): try: self[keyword].value = value - except KeyError: + except KeyError: # noqa: PERF203 _LOGGER.warning(f'There is no slider with name or symbol "{keyword}"') continue @@ -219,7 +219,7 @@ def _is_min_max( def _is_min_max_step( range_def: RangeDefinition, -) -> TypeGuard[tuple[float, float, float | int]]: +) -> TypeGuard[tuple[float, float, float]]: return len(range_def) == 3 # noqa: PLR2004 diff --git a/tests/helicity/align/test_dpd.py b/tests/helicity/align/test_dpd.py index 27d3c5433..68a1a9cf3 100644 --- a/tests/helicity/align/test_dpd.py +++ b/tests/helicity/align/test_dpd.py @@ -55,7 +55,7 @@ def test_free_symbols_kinematic_variables( if scalar_initial_state_mass: assert "m_0" not in str_variables - @pytest.mark.slow() + @pytest.mark.slow def test_free_symbols_main_expression(self, jpsi_to_k0_sigma_pbar: ReactionInfo): builder = ampform.get_builder(jpsi_to_k0_sigma_pbar) builder.config.spin_alignment = DalitzPlotDecomposition(reference_subsystem=1) diff --git a/tests/symplot/test_symplot.py b/tests/symplot/test_symplot.py index e20765c28..78b7dbfe9 100644 --- a/tests/symplot/test_symplot.py +++ b/tests/symplot/test_symplot.py @@ -23,7 +23,7 @@ def slider_kwargs(self) -> SliderKwargs: value=0.3, min=0.0, max=2.5, description=R"$\alpha$" ), R"\theta_12": FloatSlider( - value=1.5, min=0.0, max=3.14, description=R"$\theta_{12}$" + value=1.5, min=0.0, max=3.12, description=R"$\theta_{12}$" ), }, arg_to_symbol={ @@ -48,7 +48,7 @@ def test_getitem(self, slider_kwargs: SliderKwargs) -> None: theta_slider = slider_kwargs[sp.Symbol(R"\theta_12", real=True)] assert theta_slider is not None assert isinstance(theta_slider, FloatSlider) - assert theta_slider.max == 3.14 + assert theta_slider.max == 3.12 assert theta_slider.description == R"$\theta_{12}$" assert slider_kwargs["Dummy"] == theta_slider @@ -66,7 +66,7 @@ def some_function(**kwargs: Slider) -> None: assert set(kwargs) == {"Dummy", "alpha", "n"} assert isinstance(kwargs["alpha"], FloatSlider) assert isinstance(kwargs["n"], IntSlider) - assert kwargs["Dummy"].max == 3.14 + assert kwargs["Dummy"].max == 3.12 some_function(**slider_kwargs) @@ -103,7 +103,7 @@ def test_set_ranges( slider_name: str, min_: float, max_: float, - n_steps: float | int | None, + n_steps: float | None, step_size: float, slider_kwargs: SliderKwargs, ) -> None: diff --git a/tests/sympy/test_integral.py b/tests/sympy/test_integral.py index 8d66423b9..0a6182749 100644 --- a/tests/sympy/test_integral.py +++ b/tests/sympy/test_integral.py @@ -13,7 +13,7 @@ def test_real_value_function(self): assert func() == 26 / 3 @pytest.mark.parametrize( - "p_value,expected", + ("p_value", "expected"), [ (2, 26 / 3), (1, 4),