From e4021f3518b28493d4728b671303a2cf4b37e35b Mon Sep 17 00:00:00 2001 From: GitHub Date: Tue, 7 Nov 2023 03:09:27 +0000 Subject: [PATCH 1/9] MAINT: update pip constraints and pre-commit --- .constraints/py3.10.txt | 84 ++++++++++++++++++++--------------------- .constraints/py3.11.txt | 84 ++++++++++++++++++++--------------------- .constraints/py3.6.txt | 6 +-- .constraints/py3.7.txt | 30 +++++++-------- .constraints/py3.8.txt | 82 ++++++++++++++++++++-------------------- .constraints/py3.9.txt | 84 ++++++++++++++++++++--------------------- .pre-commit-config.yaml | 12 +++--- 7 files changed, 188 insertions(+), 194 deletions(-) diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index 5b27d720..b7fc9063 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -10,67 +10,66 @@ anyio==4.0.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 -asttokens==2.4.0 +asttokens==2.4.1 async-lru==2.0.4 attrs==23.1.0 -babel==2.13.0 -backcall==0.2.0 +babel==2.13.1 beautifulsoup4==4.12.2 -black==23.9.1 +black==23.10.1 bleach==6.1.0 -cachetools==5.3.1 +cachetools==5.3.2 certifi==2023.7.22 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 -charset-normalizer==3.3.0 +charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 -comm==0.1.4 +comm==0.2.0 coverage==7.3.2 debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 deprecated==1.2.14 distlib==0.3.7 -docstring-to-markdown==0.12 +docstring-to-markdown==0.13 docutils==0.17.1 exceptiongroup==1.1.3 execnet==2.0.2 -executing==2.0.0 +executing==2.0.1 fastjsonschema==2.18.1 -filelock==3.12.4 +filelock==3.13.1 fqdn==1.5.1 gprof2dot==2022.7.29 graphviz==0.20.1 -greenlet==3.0.0 +greenlet==3.0.1 hepunits==2.3.2 -identify==2.5.30 +identify==2.5.31 idna==3.4 imagesize==1.4.1 importlib-metadata==6.8.0 iniconfig==2.0.0 -ipykernel==6.25.2 -ipython==8.16.1 +ipykernel==6.26.0 +ipython==8.17.2 ipywidgets==8.1.1 isoduration==20.11.0 jedi==0.19.1 jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.19.1 +jsonschema==4.19.2 jsonschema-specifications==2023.7.1 jupyter-cache==0.6.1 -jupyter-client==8.3.1 -jupyter-core==5.3.2 -jupyter-events==0.7.0 +jupyter-client==8.6.0 +jupyter-core==5.5.0 +jupyter-events==0.9.0 jupyter-lsp==2.2.0 -jupyter-server==2.7.3 +jupyter-server==2.10.0 jupyter-server-terminals==0.4.4 -jupyterlab==4.0.6 +jupyterlab==4.0.8 jupyterlab-code-formatter==2.2.1 jupyterlab-lsp==5.0.0 -jupyterlab-myst==2.0.2 ; python_version >= "3.7.0" +jupyterlab-myst==2.1.0 ; python_version >= "3.7.0" jupyterlab-pygments==0.2.2 jupyterlab-server==2.25.0 jupyterlab-widgets==3.0.9 @@ -82,14 +81,14 @@ matplotlib-inline==0.1.6 mdit-py-plugins==0.3.5 mdurl==0.1.2 mistune==3.0.2 -mypy==1.5.1 +mypy==1.6.1 mypy-extensions==1.0.0 myst-nb==0.17.2 myst-parser==0.18.1 nbclient==0.6.8 -nbconvert==7.9.2 +nbconvert==7.11.0 nbformat==5.9.2 -nbmake==1.4.5 +nbmake==1.4.6 nest-asyncio==1.5.8 nodeenv==1.8.0 notebook-shim==0.2.3 @@ -100,24 +99,23 @@ parso==0.8.3 particle==0.23.0 pathspec==0.11.2 pexpect==4.8.0 -pickleshare==0.7.5 platformdirs==3.11.0 pluggy==1.3.0 -pre-commit==3.4.0 -prometheus-client==0.17.1 +pre-commit==3.5.0 +prometheus-client==0.18.0 prompt-toolkit==3.0.39 -psutil==5.9.5 +psutil==5.9.6 ptyprocess==0.7.0 pure-eval==0.2.2 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.14.1 +pydata-sphinx-theme==0.14.3 pydot==1.4.2 pygments==2.16.1 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.2 +pytest==7.4.3 pytest-cov==4.1.0 pytest-profiling==1.7.0 pytest-xdist==3.3.1 @@ -125,17 +123,17 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-server==1.8.2 -pytoolconfig==1.2.5 +python-lsp-server==1.9.0 +pytoolconfig==1.2.6 pyyaml==6.0.1 pyzmq==25.1.1 referencing==0.30.2 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 -rope==1.10.0 -rpds-py==0.10.4 -ruff==0.0.292 ; python_version >= "3.7.0" +rope==1.11.0 +rpds-py==0.12.0 +ruff==0.1.4 ; python_version >= "3.7.0" send2trash==1.8.2 six==1.16.0 sniffio==1.3.0 @@ -149,7 +147,7 @@ sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 -sphinx-thebe==0.2.1 +sphinx-thebe==0.3.0 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.7 sphinxcontrib-bibtex==2.6.1 @@ -159,7 +157,7 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.6 sphinxcontrib-serializinghtml==1.1.9 sphobjinv==2.3.1 -sqlalchemy==2.0.21 +sqlalchemy==2.0.23 stack-data==0.6.3 tabulate==0.9.0 terminado==0.17.1 @@ -168,23 +166,23 @@ tomli==2.0.1 tornado==6.3.3 tox==4.11.3 tqdm==4.66.1 -traitlets==5.11.2 +traitlets==5.13.0 types-docutils==0.20.0.3 types-pkg-resources==0.1.3 types-python-dateutil==2.8.19.14 types-pyyaml==6.0.12.12 -types-requests==2.31.0.8 +types-requests==2.31.0.10 types-setuptools==68.2.0.0 typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 -urllib3==2.0.6 -virtualenv==20.24.5 -wcwidth==0.2.8 +urllib3==2.0.7 +virtualenv==20.24.6 +wcwidth==0.2.9 webcolors==1.13 webencodings==0.5.1 websocket-client==1.6.4 -wheel==0.41.2 +wheel==0.41.3 widgetsnbextension==4.0.9 wrapt==1.15.0 zipp==3.17.0 diff --git a/.constraints/py3.11.txt b/.constraints/py3.11.txt index ab61a5ab..fcba2756 100644 --- a/.constraints/py3.11.txt +++ b/.constraints/py3.11.txt @@ -10,66 +10,65 @@ anyio==4.0.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 -asttokens==2.4.0 +asttokens==2.4.1 async-lru==2.0.4 attrs==23.1.0 -babel==2.13.0 -backcall==0.2.0 +babel==2.13.1 beautifulsoup4==4.12.2 -black==23.9.1 +black==23.10.1 bleach==6.1.0 -cachetools==5.3.1 +cachetools==5.3.2 certifi==2023.7.22 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 -charset-normalizer==3.3.0 +charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 -comm==0.1.4 +comm==0.2.0 coverage==7.3.2 debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 deprecated==1.2.14 distlib==0.3.7 -docstring-to-markdown==0.12 +docstring-to-markdown==0.13 docutils==0.17.1 execnet==2.0.2 -executing==2.0.0 +executing==2.0.1 fastjsonschema==2.18.1 -filelock==3.12.4 +filelock==3.13.1 fqdn==1.5.1 gprof2dot==2022.7.29 graphviz==0.20.1 -greenlet==3.0.0 +greenlet==3.0.1 hepunits==2.3.2 -identify==2.5.30 +identify==2.5.31 idna==3.4 imagesize==1.4.1 importlib-metadata==6.8.0 iniconfig==2.0.0 -ipykernel==6.25.2 -ipython==8.16.1 +ipykernel==6.26.0 +ipython==8.17.2 ipywidgets==8.1.1 isoduration==20.11.0 jedi==0.19.1 jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.19.1 +jsonschema==4.19.2 jsonschema-specifications==2023.7.1 jupyter-cache==0.6.1 -jupyter-client==8.3.1 -jupyter-core==5.3.2 -jupyter-events==0.7.0 +jupyter-client==8.6.0 +jupyter-core==5.5.0 +jupyter-events==0.9.0 jupyter-lsp==2.2.0 -jupyter-server==2.7.3 +jupyter-server==2.10.0 jupyter-server-terminals==0.4.4 -jupyterlab==4.0.6 +jupyterlab==4.0.8 jupyterlab-code-formatter==2.2.1 jupyterlab-lsp==5.0.0 -jupyterlab-myst==2.0.2 ; python_version >= "3.7.0" +jupyterlab-myst==2.1.0 ; python_version >= "3.7.0" jupyterlab-pygments==0.2.2 jupyterlab-server==2.25.0 jupyterlab-widgets==3.0.9 @@ -81,14 +80,14 @@ matplotlib-inline==0.1.6 mdit-py-plugins==0.3.5 mdurl==0.1.2 mistune==3.0.2 -mypy==1.5.1 +mypy==1.6.1 mypy-extensions==1.0.0 myst-nb==0.17.2 myst-parser==0.18.1 nbclient==0.6.8 -nbconvert==7.9.2 +nbconvert==7.11.0 nbformat==5.9.2 -nbmake==1.4.5 +nbmake==1.4.6 nest-asyncio==1.5.8 nodeenv==1.8.0 notebook-shim==0.2.3 @@ -99,24 +98,23 @@ parso==0.8.3 particle==0.23.0 pathspec==0.11.2 pexpect==4.8.0 -pickleshare==0.7.5 platformdirs==3.11.0 pluggy==1.3.0 -pre-commit==3.4.0 -prometheus-client==0.17.1 +pre-commit==3.5.0 +prometheus-client==0.18.0 prompt-toolkit==3.0.39 -psutil==5.9.5 +psutil==5.9.6 ptyprocess==0.7.0 pure-eval==0.2.2 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.14.1 +pydata-sphinx-theme==0.14.3 pydot==1.4.2 pygments==2.16.1 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.2 +pytest==7.4.3 pytest-cov==4.1.0 pytest-profiling==1.7.0 pytest-xdist==3.3.1 @@ -124,17 +122,17 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-server==1.8.2 -pytoolconfig==1.2.5 +python-lsp-server==1.9.0 +pytoolconfig==1.2.6 pyyaml==6.0.1 pyzmq==25.1.1 referencing==0.30.2 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 -rope==1.10.0 -rpds-py==0.10.4 -ruff==0.0.292 ; python_version >= "3.7.0" +rope==1.11.0 +rpds-py==0.12.0 +ruff==0.1.4 ; python_version >= "3.7.0" send2trash==1.8.2 six==1.16.0 sniffio==1.3.0 @@ -148,7 +146,7 @@ sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 -sphinx-thebe==0.2.1 +sphinx-thebe==0.3.0 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.7 sphinxcontrib-bibtex==2.6.1 @@ -158,7 +156,7 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.6 sphinxcontrib-serializinghtml==1.1.9 sphobjinv==2.3.1 -sqlalchemy==2.0.21 +sqlalchemy==2.0.23 stack-data==0.6.3 tabulate==0.9.0 terminado==0.17.1 @@ -166,23 +164,23 @@ tinycss2==1.2.1 tornado==6.3.3 tox==4.11.3 tqdm==4.66.1 -traitlets==5.11.2 +traitlets==5.13.0 types-docutils==0.20.0.3 types-pkg-resources==0.1.3 types-python-dateutil==2.8.19.14 types-pyyaml==6.0.12.12 -types-requests==2.31.0.8 +types-requests==2.31.0.10 types-setuptools==68.2.0.0 typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 -urllib3==2.0.6 -virtualenv==20.24.5 -wcwidth==0.2.8 +urllib3==2.0.7 +virtualenv==20.24.6 +wcwidth==0.2.9 webcolors==1.13 webencodings==0.5.1 websocket-client==1.6.4 -wheel==0.41.2 +wheel==0.41.3 widgetsnbextension==4.0.9 wrapt==1.15.0 zipp==3.17.0 diff --git a/.constraints/py3.6.txt b/.constraints/py3.6.txt index 89b538d8..0ad180ed 100644 --- a/.constraints/py3.6.txt +++ b/.constraints/py3.6.txt @@ -145,7 +145,7 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 sphobjinv==2.3.1 -sqlalchemy==1.4.49 +sqlalchemy==1.4.50 terminado==0.12.1 testpath==0.6.0 toml==0.10.2 @@ -163,9 +163,9 @@ types-setuptools==68.2.0.0 types-urllib3==1.26.25.14 typing-extensions==4.1.1 ; python_version < "3.10.0" ujson==4.3.0 -urllib3==1.26.17 +urllib3==1.26.18 virtualenv==20.15.1 ; python_version < "3.7.0" -wcwidth==0.2.8 +wcwidth==0.2.9 webencodings==0.5.1 websocket-client==1.3.1 wheel==0.37.1 diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index b7ad97fd..6ae4f38e 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -13,18 +13,18 @@ argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 attrs==23.1.0 -babel==2.13.0 +babel==2.13.1 backcall==0.2.0 beautifulsoup4==4.12.2 black==23.3.0 bleach==6.0.0 cached-property==1.5.2 -cachetools==5.3.1 +cachetools==5.3.2 certifi==2023.7.22 cffi==1.15.1 cfgv==3.3.1 chardet==5.2.0 -charset-normalizer==3.3.0 +charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 comm==0.1.4 @@ -34,7 +34,7 @@ decorator==5.1.1 defusedxml==0.7.1 deprecated==1.2.14 distlib==0.3.7 -docstring-to-markdown==0.12 +docstring-to-markdown==0.13 docutils==0.17.1 entrypoints==0.4 exceptiongroup==1.1.3 @@ -44,7 +44,7 @@ filelock==3.12.2 fqdn==1.5.1 gprof2dot==2022.7.29 graphviz==0.20.1 -greenlet==3.0.0 +greenlet==3.0.1 hepunits==2.3.2 identify==2.5.24 idna==3.4 @@ -112,7 +112,7 @@ pluggy==1.2.0 pre-commit==2.21.0 prometheus-client==0.17.1 prompt-toolkit==3.0.39 -psutil==5.9.5 +psutil==5.9.6 ptyprocess==0.7.0 pybtex==0.24.0 pybtex-docutils==1.0.3 @@ -124,7 +124,7 @@ pygments==2.16.1 pyparsing==3.1.1 pyproject-api==1.5.3 pyrsistent==0.19.3 -pytest==7.4.2 +pytest==7.4.3 pytest-cov==4.1.0 pytest-profiling==1.7.0 pytest-xdist==3.3.1 @@ -133,7 +133,7 @@ python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.0.0 python-lsp-server==1.7.4 -pytoolconfig==1.2.5 +pytoolconfig==1.2.6 pytz==2023.3.post1 pyyaml==6.0.1 pyzmq==24.0.1 @@ -141,7 +141,7 @@ requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.9.0 -ruff==0.0.292 ; python_version >= "3.7.0" +ruff==0.1.4 ; python_version >= "3.7.0" send2trash==1.8.2 six==1.16.0 sniffio==1.3.0 @@ -165,7 +165,7 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 sphobjinv==2.3.1 -sqlalchemy==1.4.49 +sqlalchemy==1.4.50 tabulate==0.9.0 terminado==0.17.1 tinycss2==1.2.1 @@ -178,18 +178,18 @@ typed-ast==1.5.5 types-docutils==0.20.0.3 types-pkg-resources==0.1.3 types-pyyaml==6.0.12.12 -types-requests==2.31.0.8 +types-requests==2.31.0.10 types-setuptools==68.2.0.0 typing-extensions==4.7.1 ; python_version < "3.10.0" ujson==5.7.0 uri-template==1.3.0 -urllib3==2.0.6 -virtualenv==20.24.5 -wcwidth==0.2.8 +urllib3==2.0.7 +virtualenv==20.24.6 +wcwidth==0.2.9 webcolors==1.13 webencodings==0.5.1 websocket-client==1.6.1 -wheel==0.41.2 +wheel==0.41.3 widgetsnbextension==4.0.9 wrapt==1.15.0 y-py==0.5.9 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index 47e7170c..7da9b181 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -10,48 +10,48 @@ anyio==4.0.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 -asttokens==2.4.0 +asttokens==2.4.1 async-lru==2.0.4 attrs==23.1.0 -babel==2.13.0 +babel==2.13.1 backcall==0.2.0 beautifulsoup4==4.12.2 -black==23.9.1 +black==23.10.1 bleach==6.1.0 -cachetools==5.3.1 +cachetools==5.3.2 certifi==2023.7.22 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 -charset-normalizer==3.3.0 +charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 -comm==0.1.4 +comm==0.2.0 coverage==7.3.2 debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 deprecated==1.2.14 distlib==0.3.7 -docstring-to-markdown==0.12 +docstring-to-markdown==0.13 docutils==0.17.1 exceptiongroup==1.1.3 execnet==2.0.2 -executing==2.0.0 +executing==2.0.1 fastjsonschema==2.18.1 -filelock==3.12.4 +filelock==3.13.1 fqdn==1.5.1 gprof2dot==2022.7.29 graphviz==0.20.1 -greenlet==3.0.0 +greenlet==3.0.1 hepunits==2.3.2 -identify==2.5.30 +identify==2.5.31 idna==3.4 imagesize==1.4.1 importlib-metadata==6.8.0 -importlib-resources==6.1.0 +importlib-resources==6.1.1 iniconfig==2.0.0 -ipykernel==6.25.2 +ipykernel==6.26.0 ipython==8.12.3 ipywidgets==8.1.1 isoduration==20.11.0 @@ -59,19 +59,19 @@ jedi==0.19.1 jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.19.1 +jsonschema==4.19.2 jsonschema-specifications==2023.7.1 jupyter-cache==0.6.1 -jupyter-client==8.3.1 -jupyter-core==5.3.2 -jupyter-events==0.7.0 +jupyter-client==8.6.0 +jupyter-core==5.5.0 +jupyter-events==0.9.0 jupyter-lsp==2.2.0 -jupyter-server==2.7.3 +jupyter-server==2.10.0 jupyter-server-terminals==0.4.4 -jupyterlab==4.0.6 +jupyterlab==4.0.8 jupyterlab-code-formatter==2.2.1 jupyterlab-lsp==5.0.0 -jupyterlab-myst==2.0.2 ; python_version >= "3.7.0" +jupyterlab-myst==2.1.0 ; python_version >= "3.7.0" jupyterlab-pygments==0.2.2 jupyterlab-server==2.25.0 jupyterlab-widgets==3.0.9 @@ -83,14 +83,14 @@ matplotlib-inline==0.1.6 mdit-py-plugins==0.3.5 mdurl==0.1.2 mistune==3.0.2 -mypy==1.5.1 +mypy==1.6.1 mypy-extensions==1.0.0 myst-nb==0.17.2 myst-parser==0.18.1 nbclient==0.6.8 -nbconvert==7.9.2 +nbconvert==7.11.0 nbformat==5.9.2 -nbmake==1.4.5 +nbmake==1.4.6 nest-asyncio==1.5.8 nodeenv==1.8.0 notebook-shim==0.2.3 @@ -105,21 +105,21 @@ pickleshare==0.7.5 pkgutil-resolve-name==1.3.10 platformdirs==3.11.0 pluggy==1.3.0 -pre-commit==3.4.0 -prometheus-client==0.17.1 +pre-commit==3.5.0 +prometheus-client==0.18.0 prompt-toolkit==3.0.39 -psutil==5.9.5 +psutil==5.9.6 ptyprocess==0.7.0 pure-eval==0.2.2 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.14.1 +pydata-sphinx-theme==0.14.3 pydot==1.4.2 pygments==2.16.1 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.2 +pytest==7.4.3 pytest-cov==4.1.0 pytest-profiling==1.7.0 pytest-xdist==3.3.1 @@ -127,8 +127,8 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-server==1.8.2 -pytoolconfig==1.2.5 +python-lsp-server==1.9.0 +pytoolconfig==1.2.6 pytz==2023.3.post1 pyyaml==6.0.1 pyzmq==25.1.1 @@ -136,9 +136,9 @@ referencing==0.30.2 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 -rope==1.10.0 -rpds-py==0.10.4 -ruff==0.0.292 ; python_version >= "3.7.0" +rope==1.11.0 +rpds-py==0.12.0 +ruff==0.1.4 ; python_version >= "3.7.0" send2trash==1.8.2 six==1.16.0 sniffio==1.3.0 @@ -152,7 +152,7 @@ sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 -sphinx-thebe==0.2.1 +sphinx-thebe==0.3.0 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.4 sphinxcontrib-bibtex==2.6.1 @@ -162,7 +162,7 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 sphobjinv==2.3.1 -sqlalchemy==2.0.21 +sqlalchemy==2.0.23 stack-data==0.6.3 tabulate==0.9.0 terminado==0.17.1 @@ -171,23 +171,23 @@ tomli==2.0.1 tornado==6.3.3 tox==4.11.3 tqdm==4.66.1 -traitlets==5.11.2 +traitlets==5.13.0 types-docutils==0.20.0.3 types-pkg-resources==0.1.3 types-python-dateutil==2.8.19.14 types-pyyaml==6.0.12.12 -types-requests==2.31.0.8 +types-requests==2.31.0.10 types-setuptools==68.2.0.0 typing-extensions==4.8.0 ; python_version < "3.10.0" ujson==5.8.0 uri-template==1.3.0 -urllib3==2.0.6 -virtualenv==20.24.5 -wcwidth==0.2.8 +urllib3==2.0.7 +virtualenv==20.24.6 +wcwidth==0.2.9 webcolors==1.13 webencodings==0.5.1 websocket-client==1.6.4 -wheel==0.41.2 +wheel==0.41.3 widgetsnbextension==4.0.9 wrapt==1.15.0 zipp==3.17.0 diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index 4dd0278b..47601de7 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -10,67 +10,66 @@ anyio==4.0.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 -asttokens==2.4.0 +asttokens==2.4.1 async-lru==2.0.4 attrs==23.1.0 -babel==2.13.0 -backcall==0.2.0 +babel==2.13.1 beautifulsoup4==4.12.2 -black==23.9.1 +black==23.10.1 bleach==6.1.0 -cachetools==5.3.1 +cachetools==5.3.2 certifi==2023.7.22 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 -charset-normalizer==3.3.0 +charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 -comm==0.1.4 +comm==0.2.0 coverage==7.3.2 debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 deprecated==1.2.14 distlib==0.3.7 -docstring-to-markdown==0.12 +docstring-to-markdown==0.13 docutils==0.17.1 exceptiongroup==1.1.3 execnet==2.0.2 -executing==2.0.0 +executing==2.0.1 fastjsonschema==2.18.1 -filelock==3.12.4 +filelock==3.13.1 fqdn==1.5.1 gprof2dot==2022.7.29 graphviz==0.20.1 -greenlet==3.0.0 +greenlet==3.0.1 hepunits==2.3.2 -identify==2.5.30 +identify==2.5.31 idna==3.4 imagesize==1.4.1 importlib-metadata==6.8.0 iniconfig==2.0.0 -ipykernel==6.25.2 -ipython==8.16.1 +ipykernel==6.26.0 +ipython==8.17.2 ipywidgets==8.1.1 isoduration==20.11.0 jedi==0.19.1 jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.19.1 +jsonschema==4.19.2 jsonschema-specifications==2023.7.1 jupyter-cache==0.6.1 -jupyter-client==8.3.1 -jupyter-core==5.3.2 -jupyter-events==0.7.0 +jupyter-client==8.6.0 +jupyter-core==5.5.0 +jupyter-events==0.9.0 jupyter-lsp==2.2.0 -jupyter-server==2.7.3 +jupyter-server==2.10.0 jupyter-server-terminals==0.4.4 -jupyterlab==4.0.6 +jupyterlab==4.0.8 jupyterlab-code-formatter==2.2.1 jupyterlab-lsp==5.0.0 -jupyterlab-myst==2.0.2 ; python_version >= "3.7.0" +jupyterlab-myst==2.1.0 ; python_version >= "3.7.0" jupyterlab-pygments==0.2.2 jupyterlab-server==2.25.0 jupyterlab-widgets==3.0.9 @@ -82,14 +81,14 @@ matplotlib-inline==0.1.6 mdit-py-plugins==0.3.5 mdurl==0.1.2 mistune==3.0.2 -mypy==1.5.1 +mypy==1.6.1 mypy-extensions==1.0.0 myst-nb==0.17.2 myst-parser==0.18.1 nbclient==0.6.8 -nbconvert==7.9.2 +nbconvert==7.11.0 nbformat==5.9.2 -nbmake==1.4.5 +nbmake==1.4.6 nest-asyncio==1.5.8 nodeenv==1.8.0 notebook-shim==0.2.3 @@ -100,24 +99,23 @@ parso==0.8.3 particle==0.23.0 pathspec==0.11.2 pexpect==4.8.0 -pickleshare==0.7.5 platformdirs==3.11.0 pluggy==1.3.0 -pre-commit==3.4.0 -prometheus-client==0.17.1 +pre-commit==3.5.0 +prometheus-client==0.18.0 prompt-toolkit==3.0.39 -psutil==5.9.5 +psutil==5.9.6 ptyprocess==0.7.0 pure-eval==0.2.2 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.14.1 +pydata-sphinx-theme==0.14.3 pydot==1.4.2 pygments==2.16.1 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.2 +pytest==7.4.3 pytest-cov==4.1.0 pytest-profiling==1.7.0 pytest-xdist==3.3.1 @@ -125,17 +123,17 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-server==1.8.2 -pytoolconfig==1.2.5 +python-lsp-server==1.9.0 +pytoolconfig==1.2.6 pyyaml==6.0.1 pyzmq==25.1.1 referencing==0.30.2 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 -rope==1.10.0 -rpds-py==0.10.4 -ruff==0.0.292 ; python_version >= "3.7.0" +rope==1.11.0 +rpds-py==0.12.0 +ruff==0.1.4 ; python_version >= "3.7.0" send2trash==1.8.2 six==1.16.0 sniffio==1.3.0 @@ -149,7 +147,7 @@ sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 -sphinx-thebe==0.2.1 +sphinx-thebe==0.3.0 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.7 sphinxcontrib-bibtex==2.6.1 @@ -159,7 +157,7 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.6 sphinxcontrib-serializinghtml==1.1.9 sphobjinv==2.3.1 -sqlalchemy==2.0.21 +sqlalchemy==2.0.23 stack-data==0.6.3 tabulate==0.9.0 terminado==0.17.1 @@ -168,23 +166,23 @@ tomli==2.0.1 tornado==6.3.3 tox==4.11.3 tqdm==4.66.1 -traitlets==5.11.2 +traitlets==5.13.0 types-docutils==0.20.0.3 types-pkg-resources==0.1.3 types-python-dateutil==2.8.19.14 types-pyyaml==6.0.12.12 -types-requests==2.31.0.8 +types-requests==2.31.0.10 types-setuptools==68.2.0.0 typing-extensions==4.8.0 ; python_version < "3.10.0" ujson==5.8.0 uri-template==1.3.0 -urllib3==2.0.6 -virtualenv==20.24.5 -wcwidth==0.2.8 +urllib3==2.0.7 +virtualenv==20.24.6 +wcwidth==0.2.9 webcolors==1.13 webencodings==0.5.1 websocket-client==1.6.4 -wheel==0.41.2 +wheel==0.41.3 widgetsnbextension==4.0.9 wrapt==1.15.0 zipp==3.17.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0b207414..ffa68890 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,7 +66,7 @@ repos: - --fix - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 23.10.1 hooks: - id: black - id: black-jupyter @@ -79,7 +79,7 @@ repos: - id: blacken-docs - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.27.0 + rev: 0.27.1 hooks: - id: check-jsonschema name: Check CITATION.cff @@ -92,12 +92,12 @@ repos: pass_filenames: false - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v7.3.1 + rev: v7.3.2 hooks: - id: cspell - repo: https://github.com/editorconfig-checker/editorconfig-checker.python - rev: 2.7.2 + rev: 2.7.3 hooks: - id: editorconfig-checker name: editorconfig @@ -148,7 +148,7 @@ repos: - id: prettier - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.330 + rev: v1.1.334 hooks: - id: pyright @@ -160,7 +160,7 @@ repos: - --py36-plus - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.292 + rev: v0.1.4 hooks: - id: ruff args: From 437fa63bf24c1e0ab48568b9ed7f9d2769f2a813 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 03:09:59 +0000 Subject: [PATCH 2/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/_extend_docstrings.py | 1 + docs/_relink_references.py | 1 + src/qrules/solving.py | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/_extend_docstrings.py b/docs/_extend_docstrings.py index 44773019..b03f97d5 100644 --- a/docs/_extend_docstrings.py +++ b/docs/_extend_docstrings.py @@ -2,6 +2,7 @@ This small script is used by ``conf.py`` to dynamically modify docstrings. """ + # pyright: reportMissingImports=false import inspect diff --git a/docs/_relink_references.py b/docs/_relink_references.py index 28f223eb..6b1bcec2 100644 --- a/docs/_relink_references.py +++ b/docs/_relink_references.py @@ -5,6 +5,7 @@ See also https://github.com/sphinx-doc/sphinx/issues/5868. """ + # pyright: reportMissingImports=false from typing import TYPE_CHECKING, List diff --git a/src/qrules/solving.py b/src/qrules/solving.py index 2ece29a7..946a6b26 100644 --- a/src/qrules/solving.py +++ b/src/qrules/solving.py @@ -6,7 +6,6 @@ processes with the rules formulated by the :mod:`.conservation_rules` module. """ - import inspect import logging import sys From 6da81f052e24db34e98f250579cd93cda8b70459 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:34:10 +0100 Subject: [PATCH 3/9] MAINT: address `mypy` errors for `attrs` --- .pre-commit-config.yaml | 4 ++-- src/qrules/argument_handling.py | 6 +++--- src/qrules/particle.py | 5 +++-- tests/unit/conservation_rules/test_duck_typing.py | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ffa68890..cf337558 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/ComPWA/repo-maintenance - rev: 0.1.0 + rev: "feea665" hooks: - id: check-dev-files args: @@ -65,7 +65,7 @@ repos: args: - --fix - - repo: https://github.com/psf/black + - repo: https://github.com/psf/black-pre-commit-mirror rev: 23.10.1 hooks: - id: black diff --git a/src/qrules/argument_handling.py b/src/qrules/argument_handling.py index cd47fe28..3f3f4d64 100644 --- a/src/qrules/argument_handling.py +++ b/src/qrules/argument_handling.py @@ -149,7 +149,7 @@ def __init__(self, class_type: type) -> None: if _is_edge_quantum_number(class_field.type) else _ValueExtractor[NodeQuantumNumber](class_field.type) ) - for class_field in attrs.fields(class_type) + for class_field in attrs.fields(class_type) # type: ignore[misc] } def __call__( @@ -205,7 +205,7 @@ def __create_requirements_check( if attrs.has(qn_type): class_field_types = [ class_field.type - for class_field in attrs.fields(qn_type) + for class_field in attrs.fields(qn_type) # type: ignore[misc] if not _is_optional(class_field.type) ] qn_check_function: Callable[..., bool] = _CompositeArgumentCheck( @@ -316,7 +316,7 @@ def get_required_qns( class_type = input_type.__args__[0] if attrs.has(class_type): - for class_field in attrs.fields(class_type): + for class_field in attrs.fields(class_type): # type: ignore[misc] field_type = ( class_field.type.__args__[0] # type: ignore[union-attr] if _is_optional(class_field.type) diff --git a/src/qrules/particle.py b/src/qrules/particle.py index 885adbc8..0e971860 100644 --- a/src/qrules/particle.py +++ b/src/qrules/particle.py @@ -213,12 +213,13 @@ def is_lepton(self) -> bool: ) def _repr_pretty_(self, p: "PrettyPrinter", cycle: bool) -> None: - class_name = type(self).__name__ + typ = type(self) + class_name = typ.__name__ if cycle: p.text(f"{class_name}(...)") else: with p.group(indent=2, open=f"{class_name}("): - for attribute in attrs.fields(type(self)): + for attribute in attrs.fields(type(self)): # type: ignore[misc] value = getattr(self, attribute.name) if value != attribute.default: p.breakable() diff --git a/tests/unit/conservation_rules/test_duck_typing.py b/tests/unit/conservation_rules/test_duck_typing.py index 9063aa1f..5034addd 100644 --- a/tests/unit/conservation_rules/test_duck_typing.py +++ b/tests/unit/conservation_rules/test_duck_typing.py @@ -100,7 +100,7 @@ def test_get_members(): def __get_members(class_type: Type) -> Set[str]: use_attrs = class_type not in {EdgeQuantumNumbers, NodeQuantumNumbers} if use_attrs and attrs.has(class_type): - return {f.name for f in attrs.fields(class_type)} + return {f.name for f in attrs.fields(class_type)} # type: ignore[misc] return { a.name for a in inspect.classify_class_attrs(class_type) From 8b95239dd406a4cea02ac5fd0bc60806e4d8df0c Mon Sep 17 00:00:00 2001 From: GitHub Date: Tue, 7 Nov 2023 14:24:17 +0000 Subject: [PATCH 4/9] MAINT: update pip constraints and pre-commit --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cf337558..d622951f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/ComPWA/repo-maintenance - rev: "feea665" + rev: "0.1.1" hooks: - id: check-dev-files args: From d320cfca9cdaba02399fa79b9d1ac233c9b1106d Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:45:15 +0100 Subject: [PATCH 5/9] MAINT: remove redundant quotation marks --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d622951f..b48071cf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/ComPWA/repo-maintenance - rev: "0.1.1" + rev: 0.1.1 hooks: - id: check-dev-files args: From ea2a9e225a0318c89c950fcc36e62caa4e51d33f Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:08:42 +0100 Subject: [PATCH 6/9] MAINT: revert `typ` definition --- src/qrules/particle.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qrules/particle.py b/src/qrules/particle.py index 0e971860..3e28c41f 100644 --- a/src/qrules/particle.py +++ b/src/qrules/particle.py @@ -213,8 +213,7 @@ def is_lepton(self) -> bool: ) def _repr_pretty_(self, p: "PrettyPrinter", cycle: bool) -> None: - typ = type(self) - class_name = typ.__name__ + class_name = type(self).__name__ if cycle: p.text(f"{class_name}(...)") else: From fe66a0cbabab383a984fd983caee80829491816b Mon Sep 17 00:00:00 2001 From: GitHub Date: Tue, 7 Nov 2023 22:15:41 +0000 Subject: [PATCH 7/9] MAINT: update pip constraints and pre-commit --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b48071cf..0617e731 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -92,7 +92,7 @@ repos: pass_filenames: false - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v7.3.2 + rev: v8.0.0 hooks: - id: cspell From d3b15ae93a90011815685bf238b006e95d6ac0e4 Mon Sep 17 00:00:00 2001 From: GitHub Date: Wed, 8 Nov 2023 14:51:22 +0000 Subject: [PATCH 8/9] MAINT: update pip constraints and pre-commit --- .constraints/py3.10.txt | 4 ++-- .constraints/py3.11.txt | 4 ++-- .constraints/py3.8.txt | 4 ++-- .constraints/py3.9.txt | 4 ++-- .pre-commit-config.yaml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index b7fc9063..c5e49540 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -15,7 +15,7 @@ async-lru==2.0.4 attrs==23.1.0 babel==2.13.1 beautifulsoup4==4.12.2 -black==23.10.1 +black==23.11.0 bleach==6.1.0 cachetools==5.3.2 certifi==2023.7.22 @@ -71,7 +71,7 @@ jupyterlab-code-formatter==2.2.1 jupyterlab-lsp==5.0.0 jupyterlab-myst==2.1.0 ; python_version >= "3.7.0" jupyterlab-pygments==0.2.2 -jupyterlab-server==2.25.0 +jupyterlab-server==2.25.1 jupyterlab-widgets==3.0.9 latexcodec==2.0.1 livereload==2.6.3 diff --git a/.constraints/py3.11.txt b/.constraints/py3.11.txt index fcba2756..e80da92e 100644 --- a/.constraints/py3.11.txt +++ b/.constraints/py3.11.txt @@ -15,7 +15,7 @@ async-lru==2.0.4 attrs==23.1.0 babel==2.13.1 beautifulsoup4==4.12.2 -black==23.10.1 +black==23.11.0 bleach==6.1.0 cachetools==5.3.2 certifi==2023.7.22 @@ -70,7 +70,7 @@ jupyterlab-code-formatter==2.2.1 jupyterlab-lsp==5.0.0 jupyterlab-myst==2.1.0 ; python_version >= "3.7.0" jupyterlab-pygments==0.2.2 -jupyterlab-server==2.25.0 +jupyterlab-server==2.25.1 jupyterlab-widgets==3.0.9 latexcodec==2.0.1 livereload==2.6.3 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index 7da9b181..bf3a100f 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -16,7 +16,7 @@ attrs==23.1.0 babel==2.13.1 backcall==0.2.0 beautifulsoup4==4.12.2 -black==23.10.1 +black==23.11.0 bleach==6.1.0 cachetools==5.3.2 certifi==2023.7.22 @@ -73,7 +73,7 @@ jupyterlab-code-formatter==2.2.1 jupyterlab-lsp==5.0.0 jupyterlab-myst==2.1.0 ; python_version >= "3.7.0" jupyterlab-pygments==0.2.2 -jupyterlab-server==2.25.0 +jupyterlab-server==2.25.1 jupyterlab-widgets==3.0.9 latexcodec==2.0.1 livereload==2.6.3 diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index 47601de7..5c8f6e00 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -15,7 +15,7 @@ async-lru==2.0.4 attrs==23.1.0 babel==2.13.1 beautifulsoup4==4.12.2 -black==23.10.1 +black==23.11.0 bleach==6.1.0 cachetools==5.3.2 certifi==2023.7.22 @@ -71,7 +71,7 @@ jupyterlab-code-formatter==2.2.1 jupyterlab-lsp==5.0.0 jupyterlab-myst==2.1.0 ; python_version >= "3.7.0" jupyterlab-pygments==0.2.2 -jupyterlab-server==2.25.0 +jupyterlab-server==2.25.1 jupyterlab-widgets==3.0.9 latexcodec==2.0.1 livereload==2.6.3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0617e731..4222646b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,7 +66,7 @@ repos: - --fix - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.10.1 + rev: 23.11.0 hooks: - id: black - id: black-jupyter From f51463d0ed6830efb6890cb4ea153cd4bfdaa11a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:51:59 +0000 Subject: [PATCH 9/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/conf.py | 42 ++++++++++------------- docs/usage/visualize.ipynb | 26 ++++++-------- src/qrules/argument_handling.py | 10 +++--- src/qrules/settings.py | 60 ++++++++++++++------------------- src/qrules/topology.py | 14 ++++---- tests/unit/test_particle.py | 12 +++---- 6 files changed, 70 insertions(+), 94 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8fbe095f..434c46a1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -103,18 +103,16 @@ def fetch_logo(url: str, output_path: str) -> None: shutil.rmtree("api", ignore_errors=True) subprocess.call( - " ".join( - [ - "sphinx-apidoc", - f"../src/{PACKAGE}/", - f"../src/{PACKAGE}/version.py", - "-o api/", - "--force", - "--no-toc", - "--templatedir _templates", - "--separate", - ] - ), + " ".join([ + "sphinx-apidoc", + f"../src/{PACKAGE}/", + f"../src/{PACKAGE}/version.py", + "-o api/", + "--force", + "--no-toc", + "--templatedir _templates", + "--separate", + ]), shell=True, # noqa: S602 ) @@ -189,21 +187,17 @@ def fetch_logo(url: str, output_path: str) -> None: # General sphinx settings add_module_names = False autodoc_default_options = { - "exclude-members": ", ".join( - [ - "items", - "keys", - "values", - ] - ), + "exclude-members": ", ".join([ + "items", + "keys", + "values", + ]), "members": True, "undoc-members": True, "show-inheritance": True, - "special-members": ", ".join( - [ - "__call__", - ] - ), + "special-members": ", ".join([ + "__call__", + ]), } autodoc_member_order = "bysource" autodoc_type_aliases = { diff --git a/docs/usage/visualize.ipynb b/docs/usage/visualize.ipynb index 8158c6b9..c6c22b08 100644 --- a/docs/usage/visualize.ipynb +++ b/docs/usage/visualize.ipynb @@ -501,12 +501,10 @@ "metadata": {}, "outputs": [], "source": [ - "spin_transitions = sorted(\n", - " {\n", - " t.convert(lambda s: Spin(s.particle.spin, s.spin_projection))\n", - " for t in reaction.transitions\n", - " }\n", - ")\n", + "spin_transitions = sorted({\n", + " t.convert(lambda s: Spin(s.particle.spin, s.spin_projection))\n", + " for t in reaction.transitions\n", + "})\n", "some_selection = spin_transitions[::67][:3]\n", "dot = qrules.io.asdot(some_selection, render_node=True)\n", "graphviz.Source(dot)" @@ -537,15 +535,13 @@ " return f\"{mass}±{width}\"\n", "\n", "\n", - "mass_transitions = sorted(\n", - " {\n", - " t.convert(\n", - " state_converter=render_mass,\n", - " interaction_converter=lambda _: None,\n", - " )\n", - " for t in reaction.transitions\n", - " }\n", - ")\n", + "mass_transitions = sorted({\n", + " t.convert(\n", + " state_converter=render_mass,\n", + " interaction_converter=lambda _: None,\n", + " )\n", + " for t in reaction.transitions\n", + "})\n", "dot = qrules.io.asdot(mass_transitions[::10])\n", "graphviz.Source(dot)" ] diff --git a/src/qrules/argument_handling.py b/src/qrules/argument_handling.py index 3f3f4d64..25174ecb 100644 --- a/src/qrules/argument_handling.py +++ b/src/qrules/argument_handling.py @@ -156,12 +156,10 @@ def __call__( self, props: GraphElementPropertyMap, ) -> Any: - return self.__class_type( - **{ - arg_name: extractor(props) # type: ignore[operator] - for arg_name, extractor in self.__extractors.items() - } - ) + return self.__class_type(**{ + arg_name: extractor(props) # type: ignore[operator] + for arg_name, extractor in self.__extractors.items() + }) def _sequence_arg_builder(func: Callable) -> Callable[[Sequence], List[Any]]: diff --git a/src/qrules/settings.py b/src/qrules/settings.py index 38e8605f..f6b5cb7c 100644 --- a/src/qrules/settings.py +++ b/src/qrules/settings.py @@ -160,18 +160,14 @@ def create_interaction_settings( NodeQN.s_projection: __extend_negative(spin_magnitude_domain), } if formalism == "canonical-helicity": - formalism_node_settings.conservation_rules.update( - { - clebsch_gordan_helicity_to_canonical, - ls_spin_validity, - } - ) - formalism_node_settings.qn_domains.update( - { - NodeQN.l_projection: [0], - NodeQN.s_projection: __extend_negative(spin_magnitude_domain), - } - ) + formalism_node_settings.conservation_rules.update({ + clebsch_gordan_helicity_to_canonical, + ls_spin_validity, + }) + formalism_node_settings.qn_domains.update({ + NodeQN.l_projection: [0], + NodeQN.s_projection: __extend_negative(spin_magnitude_domain), + }) if mass_conservation_factor is not None: formalism_node_settings.conservation_rules.add( MassConservation(mass_conservation_factor) @@ -179,16 +175,14 @@ def create_interaction_settings( interaction_type_settings = {} weak_node_settings = deepcopy(formalism_node_settings) - weak_node_settings.conservation_rules.update( - [ - ChargeConservation(), # type: ignore[abstract] - ElectronLNConservation(), # type: ignore[abstract] - MuonLNConservation(), # type: ignore[abstract] - TauLNConservation(), # type: ignore[abstract] - BaryonNumberConservation(), # type: ignore[abstract] - identical_particle_symmetrization, - ] - ) + weak_node_settings.conservation_rules.update([ + ChargeConservation(), # type: ignore[abstract] + ElectronLNConservation(), # type: ignore[abstract] + MuonLNConservation(), # type: ignore[abstract] + TauLNConservation(), # type: ignore[abstract] + BaryonNumberConservation(), # type: ignore[abstract] + identical_particle_symmetrization, + ]) weak_node_settings.interaction_strength = 10 ** (-4) weak_edge_settings = deepcopy(formalism_edge_settings) @@ -198,15 +192,13 @@ def create_interaction_settings( ) em_node_settings = deepcopy(weak_node_settings) - em_node_settings.conservation_rules.update( - { - CharmConservation(), # type: ignore[abstract] - StrangenessConservation(), # type: ignore[abstract] - BottomnessConservation(), # type: ignore[abstract] - parity_conservation, - c_parity_conservation, - } - ) + em_node_settings.conservation_rules.update({ + CharmConservation(), # type: ignore[abstract] + StrangenessConservation(), # type: ignore[abstract] + BottomnessConservation(), # type: ignore[abstract] + parity_conservation, + c_parity_conservation, + }) if "helicity" in formalism: em_node_settings.conservation_rules.add(parity_conservation_helicity) em_node_settings.qn_domains.update({NodeQN.parity_prefactor: [-1, 1]}) @@ -219,9 +211,9 @@ def create_interaction_settings( ) strong_node_settings = deepcopy(em_node_settings) - strong_node_settings.conservation_rules.update( - {isospin_conservation, g_parity_conservation} - ) + strong_node_settings.conservation_rules.update({ + isospin_conservation, g_parity_conservation + }) strong_node_settings.interaction_strength = 60 strong_edge_settings = deepcopy(em_edge_settings) diff --git a/src/qrules/topology.py b/src/qrules/topology.py index 2fad0463..7f9540c4 100644 --- a/src/qrules/topology.py +++ b/src/qrules/topology.py @@ -739,14 +739,12 @@ def create_n_body_topology( """ n_in = number_of_initial_states n_out = number_of_final_states - builder = SimpleStateTransitionTopologyBuilder( - [ - InteractionNode( - number_of_ingoing_edges=n_in, - number_of_outgoing_edges=n_out, - ) - ] - ) + builder = SimpleStateTransitionTopologyBuilder([ + InteractionNode( + number_of_ingoing_edges=n_in, + number_of_outgoing_edges=n_out, + ) + ]) topologies = builder.build( number_of_initial_edges=n_in, number_of_final_edges=n_out, diff --git a/tests/unit/test_particle.py b/tests/unit/test_particle.py index 4f3dd420..533c0b17 100644 --- a/tests/unit/test_particle.py +++ b/tests/unit/test_particle.py @@ -381,13 +381,11 @@ def test_repr(self, instance: Spin, repr_method): [(0.3, 0.3), (1.0, 0.5), (0.5, 0.0), (-0.5, 0.5)], ) def test_exceptions(self, magnitude, projection): - regex_pattern = "|".join( - [ - r"Spin magnitude \d\.\d has to be a multitude of \d\.[05]", - r"\(projection - magnitude\) should be integer", - r"Spin magnitude has to be positive", - ] - ) + regex_pattern = "|".join([ + r"Spin magnitude \d\.\d has to be a multitude of \d\.[05]", + r"\(projection - magnitude\) should be integer", + r"Spin magnitude has to be positive", + ]) regex_pattern = f"({regex_pattern})" with pytest.raises(ValueError, match=regex_pattern): print(Spin(magnitude, projection)) # noqa: T201