diff --git a/.constraints/.gitignore b/.constraints/.gitignore new file mode 100644 index 00000000..36a07ad0 --- /dev/null +++ b/.constraints/.gitignore @@ -0,0 +1 @@ +!py3.*.txt diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index 5dab7544..f6c787c4 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -7,7 +7,7 @@ accessible-pygments==0.0.4 alabaster==0.7.13 annotated-types==0.6.0 -anyio==4.0.0 +anyio==4.1.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 @@ -19,7 +19,9 @@ beautifulsoup4==4.12.2 black==23.11.0 bleach==6.1.0 cachetools==5.3.2 -certifi==2023.7.22 +cattrs==23.2.3 +cerberus==1.3.5 +certifi==2023.11.17 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -29,7 +31,7 @@ colorama==0.4.6 comm==0.2.0 contourpy==1.2.0 coverage==7.3.2 -cryptography==41.0.5 +cryptography==41.0.7 cycler==0.12.1 dataproperty==1.0.1 debugpy==1.8.0 @@ -37,97 +39,110 @@ decorator==5.1.1 defusedxml==0.7.1 deprecated==1.2.14 distlib==0.3.7 +docopt==0.6.2 docstring-to-markdown==0.13 docutils==0.17.1 -dominate==2.8.0 -exceptiongroup==1.1.3 +dominate==2.9.0 +exceptiongroup==1.2.0 execnet==2.0.2 executing==2.0.1 -fastjsonschema==2.18.1 +fastjsonschema==2.19.0 feynman==2.1.0 filelock==3.13.1 -fonttools==4.44.0 +fonttools==4.46.0 fqdn==1.5.1 -greenlet==3.0.1 -identify==2.5.31 -idna==3.4 +gitdb==4.0.11 +gitpython==3.1.40 +greenlet==3.0.2 +identify==2.5.33 +idna==3.6 imagesize==1.4.1 -importlib-metadata==6.8.0 +importlib-metadata==7.0.0 iniconfig==2.0.0 -ipykernel==6.26.0 -ipython==8.17.2 +ipykernel==6.27.1 +ipython==8.18.1 ipywidgets==8.1.1 isoduration==20.11.0 +isort==5.13.0 jedi==0.19.1 jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.19.2 -jsonschema-specifications==2023.7.1 +jsonschema==4.20.0 +jsonschema-specifications==2023.11.2 jupyter==1.0.0 -jupyter-cache==0.6.1 +jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-console==6.6.3 jupyter-core==5.5.0 jupyter-events==0.9.0 -jupyter-lsp==2.2.0 -jupyter-server==2.10.0 +jupyter-lsp==2.2.1 +jupyter-server==2.12.1 +jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.4.4 -jupyterlab==4.0.8 +jupyterlab==4.0.9 jupyterlab-code-formatter==2.2.1 -jupyterlab-lsp==5.0.0 +jupyterlab-git==0.50.0 +jupyterlab-lsp==5.0.1 jupyterlab-myst==2.1.0 -jupyterlab-pygments==0.2.2 -jupyterlab-server==2.25.1 +jupyterlab-pygments==0.3.0 +jupyterlab-server==2.25.2 jupyterlab-widgets==3.0.9 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 +lsprotocol==2023.0.0 markdown-it-py==2.2.0 markupsafe==2.1.3 -matplotlib==3.8.1 +matplotlib==3.8.2 matplotlib-inline==0.1.6 mbstrdecoder==1.1.3 mdit-py-plugins==0.3.5 mdurl==0.1.2 mistune==3.0.2 mpmath==1.3.0 -mypy==1.6.1 +mypy==1.7.1 mypy-extensions==1.0.0 -myst-nb==0.17.2 -myst-parser==0.18.1 -nbclient==0.7.4 -nbconvert==7.11.0 +myst-nb==1.0.0 +myst-parser==1.0.0 +nbclient==0.6.8 +nbconvert==7.12.0 +nbdime==4.0.1 nbformat==5.9.2 +nbmake==1.4.6 nest-asyncio==1.5.8 nodeenv==1.8.0 notebook==7.0.6 notebook-shim==0.2.3 -numpy==1.23.5 +numpy==1.26.2 overrides==7.4.0 packaging==23.2 pandocfilters==1.5.0 parso==0.8.3 pathspec==0.11.2 pathvalidate==3.2.0 -pexpect==4.8.0 +pep517==0.13.1 +pexpect==4.9.0 pillow==10.1.0 -platformdirs==3.11.0 +pip-api==0.0.30 +pipreqs==0.4.13 +platformdirs==4.1.0 +plette==0.4.4 pluggy==1.3.0 pre-commit==3.5.0 -prometheus-client==0.18.0 -prompt-toolkit==3.0.39 +prometheus-client==0.19.0 +prompt-toolkit==3.0.41 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 -pydantic==2.4.2 -pydantic-core==2.10.1 -pydata-sphinx-theme==0.14.3 +pydantic==2.5.2 +pydantic-core==2.14.5 +pydata-sphinx-theme==0.14.4 pygithub==2.1.1 -pygments==2.16.1 +pygments==2.17.2 pyjwt==2.8.0 pynacl==1.5.0 pyparsing==3.1.1 @@ -135,32 +150,36 @@ pyproject-api==1.6.1 pytablewriter==1.2.0 pytest==7.4.3 pytest-cov==4.1.0 -pytest-xdist==3.3.1 +pytest-xdist==3.5.0 python-dateutil==2.8.2 -python-gitlab==4.1.1 +python-gitlab==4.2.0 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 +python-lsp-ruff==2.0.0 python-lsp-server==1.9.0 pytoolconfig==1.2.6 pytz==2023.3.post1 pyyaml==6.0.1 -pyzmq==25.1.1 -qtconsole==5.5.0 +pyzmq==25.1.2 +qtconsole==5.5.1 qtpy==2.4.1 -referencing==0.30.2 +referencing==0.32.0 requests==2.31.0 requests-toolbelt==1.0.0 +requirementslib==3.0.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.11.0 -rpds-py==0.12.0 -ruff==0.1.4 +rpds-py==0.13.2 +ruff==0.1.7 send2trash==1.8.2 six==1.16.0 +smmap==5.0.1 sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==5.3.0 +sphinx-api-relink==0.0.8 sphinx-autobuild==2021.3.14 sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 @@ -168,6 +187,7 @@ sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 +sphinx-pybtex-etal-style==0.0.2 sphinx-thebe==0.3.0 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.7 @@ -183,32 +203,35 @@ sympy==1.12 tabledata==1.3.3 tabulate==0.9.0 tcolorpy==0.1.4 -terminado==0.17.1 +terminado==0.18.0 tinycss2==1.2.1 tomli==2.0.1 -tornado==6.3.3 -tox==4.11.3 -traitlets==5.13.0 +tomlkit==0.12.3 +tornado==6.4 +tox==4.11.4 +traitlets==5.14.0 typepy==1.3.2 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-setuptools==68.2.0.0 +types-setuptools==69.0.0.0 typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 -urllib3==2.0.7 -virtualenv==20.24.6 -wcwidth==0.2.9 +urllib3==2.1.0 +virtualenv==20.25.0 +wcwidth==0.2.12 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.4 -wheel==0.41.3 +websocket-client==1.7.0 +wheel==0.42.0 widgetsnbextension==4.0.9 -wrapt==1.15.0 +wrapt==1.16.0 +yarg==0.1.9 zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: +# pip # pwa-pages # setuptools diff --git a/.constraints/py3.11.txt b/.constraints/py3.11.txt index 4270f330..977c0e1c 100644 --- a/.constraints/py3.11.txt +++ b/.constraints/py3.11.txt @@ -7,7 +7,7 @@ accessible-pygments==0.0.4 alabaster==0.7.13 annotated-types==0.6.0 -anyio==4.0.0 +anyio==4.1.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 @@ -19,7 +19,9 @@ beautifulsoup4==4.12.2 black==23.11.0 bleach==6.1.0 cachetools==5.3.2 -certifi==2023.7.22 +cattrs==23.2.3 +cerberus==1.3.5 +certifi==2023.11.17 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -29,7 +31,7 @@ colorama==0.4.6 comm==0.2.0 contourpy==1.2.0 coverage==7.3.2 -cryptography==41.0.5 +cryptography==41.0.7 cycler==0.12.1 dataproperty==1.0.1 debugpy==1.8.0 @@ -37,96 +39,109 @@ decorator==5.1.1 defusedxml==0.7.1 deprecated==1.2.14 distlib==0.3.7 +docopt==0.6.2 docstring-to-markdown==0.13 docutils==0.17.1 -dominate==2.8.0 +dominate==2.9.0 execnet==2.0.2 executing==2.0.1 -fastjsonschema==2.18.1 +fastjsonschema==2.19.0 feynman==2.1.0 filelock==3.13.1 -fonttools==4.44.0 +fonttools==4.46.0 fqdn==1.5.1 -greenlet==3.0.1 -identify==2.5.31 -idna==3.4 +gitdb==4.0.11 +gitpython==3.1.40 +greenlet==3.0.2 +identify==2.5.33 +idna==3.6 imagesize==1.4.1 -importlib-metadata==6.8.0 +importlib-metadata==7.0.0 iniconfig==2.0.0 -ipykernel==6.26.0 -ipython==8.17.2 +ipykernel==6.27.1 +ipython==8.18.1 ipywidgets==8.1.1 isoduration==20.11.0 +isort==5.13.0 jedi==0.19.1 jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.19.2 -jsonschema-specifications==2023.7.1 +jsonschema==4.20.0 +jsonschema-specifications==2023.11.2 jupyter==1.0.0 -jupyter-cache==0.6.1 +jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-console==6.6.3 jupyter-core==5.5.0 jupyter-events==0.9.0 -jupyter-lsp==2.2.0 -jupyter-server==2.10.0 +jupyter-lsp==2.2.1 +jupyter-server==2.12.1 +jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.4.4 -jupyterlab==4.0.8 +jupyterlab==4.0.9 jupyterlab-code-formatter==2.2.1 -jupyterlab-lsp==5.0.0 +jupyterlab-git==0.50.0 +jupyterlab-lsp==5.0.1 jupyterlab-myst==2.1.0 -jupyterlab-pygments==0.2.2 -jupyterlab-server==2.25.1 +jupyterlab-pygments==0.3.0 +jupyterlab-server==2.25.2 jupyterlab-widgets==3.0.9 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 +lsprotocol==2023.0.0 markdown-it-py==2.2.0 markupsafe==2.1.3 -matplotlib==3.8.1 +matplotlib==3.8.2 matplotlib-inline==0.1.6 mbstrdecoder==1.1.3 mdit-py-plugins==0.3.5 mdurl==0.1.2 mistune==3.0.2 mpmath==1.3.0 -mypy==1.6.1 +mypy==1.7.1 mypy-extensions==1.0.0 -myst-nb==0.17.2 -myst-parser==0.18.1 -nbclient==0.7.4 -nbconvert==7.11.0 +myst-nb==1.0.0 +myst-parser==1.0.0 +nbclient==0.6.8 +nbconvert==7.12.0 +nbdime==4.0.1 nbformat==5.9.2 +nbmake==1.4.6 nest-asyncio==1.5.8 nodeenv==1.8.0 notebook==7.0.6 notebook-shim==0.2.3 -numpy==1.23.5 +numpy==1.26.2 overrides==7.4.0 packaging==23.2 pandocfilters==1.5.0 parso==0.8.3 pathspec==0.11.2 pathvalidate==3.2.0 -pexpect==4.8.0 +pep517==0.13.1 +pexpect==4.9.0 pillow==10.1.0 -platformdirs==3.11.0 +pip-api==0.0.30 +pipreqs==0.4.13 +platformdirs==4.1.0 +plette==0.4.4 pluggy==1.3.0 pre-commit==3.5.0 -prometheus-client==0.18.0 -prompt-toolkit==3.0.39 +prometheus-client==0.19.0 +prompt-toolkit==3.0.41 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 -pydantic==2.4.2 -pydantic-core==2.10.1 -pydata-sphinx-theme==0.14.3 +pydantic==2.5.2 +pydantic-core==2.14.5 +pydata-sphinx-theme==0.14.4 pygithub==2.1.1 -pygments==2.16.1 +pygments==2.17.2 pyjwt==2.8.0 pynacl==1.5.0 pyparsing==3.1.1 @@ -134,32 +149,36 @@ pyproject-api==1.6.1 pytablewriter==1.2.0 pytest==7.4.3 pytest-cov==4.1.0 -pytest-xdist==3.3.1 +pytest-xdist==3.5.0 python-dateutil==2.8.2 -python-gitlab==4.1.1 +python-gitlab==4.2.0 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 +python-lsp-ruff==2.0.0 python-lsp-server==1.9.0 pytoolconfig==1.2.6 pytz==2023.3.post1 pyyaml==6.0.1 -pyzmq==25.1.1 -qtconsole==5.5.0 +pyzmq==25.1.2 +qtconsole==5.5.1 qtpy==2.4.1 -referencing==0.30.2 +referencing==0.32.0 requests==2.31.0 requests-toolbelt==1.0.0 +requirementslib==3.0.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.11.0 -rpds-py==0.12.0 -ruff==0.1.4 +rpds-py==0.13.2 +ruff==0.1.7 send2trash==1.8.2 six==1.16.0 +smmap==5.0.1 sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==5.3.0 +sphinx-api-relink==0.0.8 sphinx-autobuild==2021.3.14 sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 @@ -167,6 +186,7 @@ sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 +sphinx-pybtex-etal-style==0.0.2 sphinx-thebe==0.3.0 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.7 @@ -182,31 +202,34 @@ sympy==1.12 tabledata==1.3.3 tabulate==0.9.0 tcolorpy==0.1.4 -terminado==0.17.1 +terminado==0.18.0 tinycss2==1.2.1 -tornado==6.3.3 -tox==4.11.3 -traitlets==5.13.0 +tomlkit==0.12.3 +tornado==6.4 +tox==4.11.4 +traitlets==5.14.0 typepy==1.3.2 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-setuptools==68.2.0.0 +types-setuptools==69.0.0.0 typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 -urllib3==2.0.7 -virtualenv==20.24.6 -wcwidth==0.2.9 +urllib3==2.1.0 +virtualenv==20.25.0 +wcwidth==0.2.12 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.4 -wheel==0.41.3 +websocket-client==1.7.0 +wheel==0.42.0 widgetsnbextension==4.0.9 -wrapt==1.15.0 +wrapt==1.16.0 +yarg==0.1.9 zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: +# pip # pwa-pages # setuptools diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index 3c474ba8..ae2dc2cc 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -8,7 +8,6 @@ accessible-pygments==0.0.4 aiofiles==22.1.0 aiosqlite==0.19.0 alabaster==0.7.13 -annotated-types==0.5.0 anyio==3.7.1 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 @@ -21,7 +20,8 @@ black==23.3.0 bleach==6.0.0 cached-property==1.5.2 cachetools==5.3.2 -certifi==2023.7.22 +cattrs==23.1.2 +certifi==2023.11.17 cffi==1.15.1 cfgv==3.3.1 chardet==5.2.0 @@ -30,7 +30,7 @@ click==8.1.7 colorama==0.4.6 comm==0.1.4 coverage==7.2.7 -cryptography==41.0.5 +cryptography==41.0.7 cycler==0.11.0 dataproperty==1.0.1 debugpy==1.7.0 @@ -40,18 +40,20 @@ deprecated==1.2.14 distlib==0.3.7 docstring-to-markdown==0.13 docutils==0.17.1 -dominate==2.8.0 +dominate==2.9.0 entrypoints==0.4 -exceptiongroup==1.1.3 +exceptiongroup==1.2.0 execnet==2.0.2 -fastjsonschema==2.18.1 +fastjsonschema==2.19.0 feynman==2.1.0 filelock==3.12.2 fonttools==4.38.0 fqdn==1.5.1 -greenlet==3.0.1 +gitdb==4.0.11 +gitpython==3.1.40 +greenlet==3.0.2 identify==2.5.24 -idna==3.4 +idna==3.6 imagesize==1.4.1 importlib-metadata==6.7.0 importlib-resources==5.12.0 @@ -61,6 +63,7 @@ ipython==7.34.0 ipython-genutils==0.2.0 ipywidgets==8.1.1 isoduration==20.11.0 +isort==5.11.5 jedi==0.18.2 jinja2==3.1.2 json5==0.9.14 @@ -75,10 +78,12 @@ jupyter-events==0.6.3 jupyter-lsp==1.5.1 jupyter-server==1.24.0 jupyter-server-fileid==0.9.0 +jupyter-server-mathjax==0.2.6 jupyter-server-ydoc==0.8.0 -jupyter-ydoc==0.2.4 +jupyter-ydoc==0.2.5 jupyterlab==3.6.6 jupyterlab-code-formatter==2.2.1 +jupyterlab-git==0.44.0 jupyterlab-lsp==3.10.2 jupyterlab-myst==1.2.0 jupyterlab-pygments==0.2.2 @@ -87,6 +92,7 @@ jupyterlab-widgets==3.0.9 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 +lsprotocol==2023.0.0 markdown-it-py==2.2.0 markupsafe==2.1.3 matplotlib==3.5.3 @@ -103,7 +109,9 @@ myst-parser==0.18.1 nbclassic==1.0.0 nbclient==0.5.13 nbconvert==7.6.0 +nbdime==3.2.1 nbformat==5.8.0 +nbmake==1.3.0 nest-asyncio==1.5.8 nodeenv==1.8.0 notebook==6.5.6 @@ -114,25 +122,24 @@ pandocfilters==1.5.0 parso==0.8.3 pathspec==0.11.2 pathvalidate==3.2.0 -pexpect==4.8.0 +pexpect==4.9.0 pickleshare==0.7.5 pillow==9.5.0 pkgutil-resolve-name==1.3.10 -platformdirs==3.11.0 +platformdirs==4.0.0 pluggy==1.2.0 pre-commit==2.21.0 prometheus-client==0.17.1 -prompt-toolkit==3.0.39 +prompt-toolkit==3.0.41 psutil==5.9.6 ptyprocess==0.7.0 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydantic==2.4.2 -pydantic-core==2.10.1 +pydantic==1.10.13 pydata-sphinx-theme==0.13.3 pygithub==2.1.1 -pygments==2.16.1 +pygments==2.17.2 pyjwt==2.8.0 pynacl==1.5.0 pyparsing==3.1.1 @@ -141,11 +148,12 @@ pyrsistent==0.19.3 pytablewriter==1.2.0 pytest==7.4.3 pytest-cov==4.1.0 -pytest-xdist==3.3.1 +pytest-xdist==3.5.0 python-dateutil==2.8.2 python-gitlab==3.15.0 python-json-logger==2.0.7 python-lsp-jsonrpc==1.0.0 +python-lsp-ruff==1.6.0 python-lsp-server==1.7.4 pytoolconfig==1.2.6 pytz==2023.3.post1 @@ -158,13 +166,15 @@ requests-toolbelt==1.0.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.9.0 -ruff==0.1.4 +ruff==0.1.7 send2trash==1.8.2 six==1.16.0 +smmap==5.0.1 sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.4.1 sphinx==5.3.0 +sphinx-api-relink==0.0.8 sphinx-autobuild==2021.3.14 sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 @@ -172,6 +182,7 @@ sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.4.1 sphinx-hep-pdgref==0.2.0 +sphinx-pybtex-etal-style==0.0.2 sphinx-thebe==0.2.1 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.2 @@ -198,21 +209,21 @@ 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-setuptools==68.2.0.0 +types-setuptools==69.0.0.0 typing-extensions==4.7.1 ujson==5.7.0 uri-template==1.3.0 urllib3==2.0.7 -virtualenv==20.24.6 -wcwidth==0.2.9 +virtualenv==20.25.0 +wcwidth==0.2.12 webcolors==1.13 webencodings==0.5.1 websocket-client==1.6.1 -wheel==0.41.3 +wheel==0.42.0 widgetsnbextension==4.0.9 -wrapt==1.15.0 -y-py==0.5.9 -ypy-websocket==0.8.2 +wrapt==1.16.0 +y-py==0.6.2 +ypy-websocket==0.8.4 zipp==3.15.0 # The following packages are considered to be unsafe in a requirements file: diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index ee679aa1..b02dd4ee 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -7,7 +7,7 @@ accessible-pygments==0.0.4 alabaster==0.7.13 annotated-types==0.6.0 -anyio==4.0.0 +anyio==4.1.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 @@ -20,7 +20,9 @@ beautifulsoup4==4.12.2 black==23.11.0 bleach==6.1.0 cachetools==5.3.2 -certifi==2023.7.22 +cattrs==23.2.3 +cerberus==1.3.5 +certifi==2023.11.17 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -30,7 +32,7 @@ colorama==0.4.6 comm==0.2.0 contourpy==1.1.1 coverage==7.3.2 -cryptography==41.0.5 +cryptography==41.0.7 cycler==0.12.1 dataproperty==1.0.1 debugpy==1.8.0 @@ -38,100 +40,113 @@ decorator==5.1.1 defusedxml==0.7.1 deprecated==1.2.14 distlib==0.3.7 +docopt==0.6.2 docstring-to-markdown==0.13 docutils==0.17.1 -dominate==2.8.0 -exceptiongroup==1.1.3 +dominate==2.9.0 +exceptiongroup==1.2.0 execnet==2.0.2 executing==2.0.1 -fastjsonschema==2.18.1 +fastjsonschema==2.19.0 feynman==2.1.0 filelock==3.13.1 -fonttools==4.44.0 +fonttools==4.46.0 fqdn==1.5.1 -greenlet==3.0.1 -identify==2.5.31 -idna==3.4 +gitdb==4.0.11 +gitpython==3.1.40 +greenlet==3.0.2 +identify==2.5.33 +idna==3.6 imagesize==1.4.1 -importlib-metadata==6.8.0 +importlib-metadata==7.0.0 importlib-resources==6.1.1 iniconfig==2.0.0 -ipykernel==6.26.0 +ipykernel==6.27.1 ipython==8.12.3 ipywidgets==8.1.1 isoduration==20.11.0 +isort==5.13.0 jedi==0.19.1 jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.19.2 -jsonschema-specifications==2023.7.1 +jsonschema==4.20.0 +jsonschema-specifications==2023.11.2 jupyter==1.0.0 jupyter-cache==0.6.1 jupyter-client==8.6.0 jupyter-console==6.6.3 jupyter-core==5.5.0 jupyter-events==0.9.0 -jupyter-lsp==2.2.0 -jupyter-server==2.10.0 +jupyter-lsp==2.2.1 +jupyter-server==2.12.1 +jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.4.4 -jupyterlab==4.0.8 +jupyterlab==4.0.9 jupyterlab-code-formatter==2.2.1 -jupyterlab-lsp==5.0.0 +jupyterlab-git==0.50.0 +jupyterlab-lsp==5.0.1 jupyterlab-myst==2.1.0 -jupyterlab-pygments==0.2.2 -jupyterlab-server==2.25.1 +jupyterlab-pygments==0.3.0 +jupyterlab-server==2.25.2 jupyterlab-widgets==3.0.9 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 +lsprotocol==2023.0.0 markdown-it-py==2.2.0 markupsafe==2.1.3 -matplotlib==3.7.3 +matplotlib==3.7.4 matplotlib-inline==0.1.6 mbstrdecoder==1.1.3 mdit-py-plugins==0.3.5 mdurl==0.1.2 mistune==3.0.2 mpmath==1.3.0 -mypy==1.6.1 +mypy==1.7.1 mypy-extensions==1.0.0 myst-nb==0.17.2 myst-parser==0.18.1 -nbclient==0.7.4 -nbconvert==7.11.0 +nbclient==0.6.8 +nbconvert==7.12.0 +nbdime==4.0.1 nbformat==5.9.2 +nbmake==1.4.6 nest-asyncio==1.5.8 nodeenv==1.8.0 notebook==7.0.6 notebook-shim==0.2.3 -numpy==1.23.5 +numpy==1.24.4 overrides==7.4.0 packaging==23.2 pandocfilters==1.5.0 parso==0.8.3 pathspec==0.11.2 pathvalidate==3.2.0 -pexpect==4.8.0 +pep517==0.13.1 +pexpect==4.9.0 pickleshare==0.7.5 pillow==10.1.0 +pip-api==0.0.30 +pipreqs==0.4.13 pkgutil-resolve-name==1.3.10 -platformdirs==3.11.0 +platformdirs==4.1.0 +plette==0.4.4 pluggy==1.3.0 pre-commit==3.5.0 -prometheus-client==0.18.0 -prompt-toolkit==3.0.39 +prometheus-client==0.19.0 +prompt-toolkit==3.0.41 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 -pydantic==2.4.2 -pydantic-core==2.10.1 -pydata-sphinx-theme==0.14.3 +pydantic==2.5.2 +pydantic-core==2.14.5 +pydata-sphinx-theme==0.14.4 pygithub==2.1.1 -pygments==2.16.1 +pygments==2.17.2 pyjwt==2.8.0 pynacl==1.5.0 pyparsing==3.1.1 @@ -139,32 +154,36 @@ pyproject-api==1.6.1 pytablewriter==1.2.0 pytest==7.4.3 pytest-cov==4.1.0 -pytest-xdist==3.3.1 +pytest-xdist==3.5.0 python-dateutil==2.8.2 -python-gitlab==4.1.1 +python-gitlab==4.2.0 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 +python-lsp-ruff==2.0.0 python-lsp-server==1.9.0 pytoolconfig==1.2.6 pytz==2023.3.post1 pyyaml==6.0.1 -pyzmq==25.1.1 -qtconsole==5.5.0 +pyzmq==25.1.2 +qtconsole==5.5.1 qtpy==2.4.1 -referencing==0.30.2 +referencing==0.32.0 requests==2.31.0 requests-toolbelt==1.0.0 +requirementslib==3.0.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.11.0 -rpds-py==0.12.0 -ruff==0.1.4 +rpds-py==0.13.2 +ruff==0.1.7 send2trash==1.8.2 six==1.16.0 +smmap==5.0.1 sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==5.3.0 +sphinx-api-relink==0.0.8 sphinx-autobuild==2021.3.14 sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 @@ -172,6 +191,7 @@ sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 +sphinx-pybtex-etal-style==0.0.2 sphinx-thebe==0.3.0 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.4 @@ -187,32 +207,35 @@ sympy==1.12 tabledata==1.3.3 tabulate==0.9.0 tcolorpy==0.1.4 -terminado==0.17.1 +terminado==0.18.0 tinycss2==1.2.1 tomli==2.0.1 -tornado==6.3.3 -tox==4.11.3 -traitlets==5.13.0 +tomlkit==0.12.3 +tornado==6.4 +tox==4.11.4 +traitlets==5.14.0 typepy==1.3.2 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-setuptools==68.2.0.0 +types-setuptools==69.0.0.0 typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 -urllib3==2.0.7 -virtualenv==20.24.6 -wcwidth==0.2.9 +urllib3==2.1.0 +virtualenv==20.25.0 +wcwidth==0.2.12 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.4 -wheel==0.41.3 +websocket-client==1.7.0 +wheel==0.42.0 widgetsnbextension==4.0.9 -wrapt==1.15.0 +wrapt==1.16.0 +yarg==0.1.9 zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: +# pip # pwa-pages # setuptools diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index 5cbd8132..0ee9382d 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -7,7 +7,7 @@ accessible-pygments==0.0.4 alabaster==0.7.13 annotated-types==0.6.0 -anyio==4.0.0 +anyio==4.1.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 @@ -19,7 +19,9 @@ beautifulsoup4==4.12.2 black==23.11.0 bleach==6.1.0 cachetools==5.3.2 -certifi==2023.7.22 +cattrs==23.2.3 +cerberus==1.3.5 +certifi==2023.11.17 cffi==1.16.0 cfgv==3.4.0 chardet==5.2.0 @@ -29,7 +31,7 @@ colorama==0.4.6 comm==0.2.0 contourpy==1.2.0 coverage==7.3.2 -cryptography==41.0.5 +cryptography==41.0.7 cycler==0.12.1 dataproperty==1.0.1 debugpy==1.8.0 @@ -37,98 +39,111 @@ decorator==5.1.1 defusedxml==0.7.1 deprecated==1.2.14 distlib==0.3.7 +docopt==0.6.2 docstring-to-markdown==0.13 docutils==0.17.1 -dominate==2.8.0 -exceptiongroup==1.1.3 +dominate==2.9.0 +exceptiongroup==1.2.0 execnet==2.0.2 executing==2.0.1 -fastjsonschema==2.18.1 +fastjsonschema==2.19.0 feynman==2.1.0 filelock==3.13.1 -fonttools==4.44.0 +fonttools==4.46.0 fqdn==1.5.1 -greenlet==3.0.1 -identify==2.5.31 -idna==3.4 +gitdb==4.0.11 +gitpython==3.1.40 +greenlet==3.0.2 +identify==2.5.33 +idna==3.6 imagesize==1.4.1 -importlib-metadata==6.8.0 +importlib-metadata==7.0.0 importlib-resources==6.1.1 iniconfig==2.0.0 -ipykernel==6.26.0 -ipython==8.17.2 +ipykernel==6.27.1 +ipython==8.18.1 ipywidgets==8.1.1 isoduration==20.11.0 +isort==5.13.0 jedi==0.19.1 jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.19.2 -jsonschema-specifications==2023.7.1 +jsonschema==4.20.0 +jsonschema-specifications==2023.11.2 jupyter==1.0.0 -jupyter-cache==0.6.1 +jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-console==6.6.3 jupyter-core==5.5.0 jupyter-events==0.9.0 -jupyter-lsp==2.2.0 -jupyter-server==2.10.0 +jupyter-lsp==2.2.1 +jupyter-server==2.12.1 +jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.4.4 -jupyterlab==4.0.8 +jupyterlab==4.0.9 jupyterlab-code-formatter==2.2.1 -jupyterlab-lsp==5.0.0 +jupyterlab-git==0.50.0 +jupyterlab-lsp==5.0.1 jupyterlab-myst==2.1.0 -jupyterlab-pygments==0.2.2 -jupyterlab-server==2.25.1 +jupyterlab-pygments==0.3.0 +jupyterlab-server==2.25.2 jupyterlab-widgets==3.0.9 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 +lsprotocol==2023.0.0 markdown-it-py==2.2.0 markupsafe==2.1.3 -matplotlib==3.8.1 +matplotlib==3.8.2 matplotlib-inline==0.1.6 mbstrdecoder==1.1.3 mdit-py-plugins==0.3.5 mdurl==0.1.2 mistune==3.0.2 mpmath==1.3.0 -mypy==1.6.1 +mypy==1.7.1 mypy-extensions==1.0.0 -myst-nb==0.17.2 -myst-parser==0.18.1 -nbclient==0.7.4 -nbconvert==7.11.0 +myst-nb==1.0.0 +myst-parser==1.0.0 +nbclient==0.6.8 +nbconvert==7.12.0 +nbdime==4.0.1 nbformat==5.9.2 +nbmake==1.4.6 nest-asyncio==1.5.8 nodeenv==1.8.0 notebook==7.0.6 notebook-shim==0.2.3 -numpy==1.23.5 +numpy==1.26.2 overrides==7.4.0 packaging==23.2 pandocfilters==1.5.0 parso==0.8.3 pathspec==0.11.2 pathvalidate==3.2.0 -pexpect==4.8.0 +pep517==0.13.1 +pexpect==4.9.0 pillow==10.1.0 -platformdirs==3.11.0 +pip-api==0.0.30 +pipreqs==0.4.13 +platformdirs==4.1.0 +plette==0.4.4 pluggy==1.3.0 pre-commit==3.5.0 -prometheus-client==0.18.0 -prompt-toolkit==3.0.39 +prometheus-client==0.19.0 +prompt-toolkit==3.0.41 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 -pydantic==2.4.2 -pydantic-core==2.10.1 -pydata-sphinx-theme==0.14.3 +pydantic==2.5.2 +pydantic-core==2.14.5 +pydata-sphinx-theme==0.14.4 pygithub==2.1.1 -pygments==2.16.1 +pygments==2.17.2 pyjwt==2.8.0 pynacl==1.5.0 pyparsing==3.1.1 @@ -136,32 +151,36 @@ pyproject-api==1.6.1 pytablewriter==1.2.0 pytest==7.4.3 pytest-cov==4.1.0 -pytest-xdist==3.3.1 +pytest-xdist==3.5.0 python-dateutil==2.8.2 -python-gitlab==4.1.1 +python-gitlab==4.2.0 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 +python-lsp-ruff==2.0.0 python-lsp-server==1.9.0 pytoolconfig==1.2.6 pytz==2023.3.post1 pyyaml==6.0.1 -pyzmq==25.1.1 -qtconsole==5.5.0 +pyzmq==25.1.2 +qtconsole==5.5.1 qtpy==2.4.1 -referencing==0.30.2 +referencing==0.32.0 requests==2.31.0 requests-toolbelt==1.0.0 +requirementslib==3.0.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.11.0 -rpds-py==0.12.0 -ruff==0.1.4 +rpds-py==0.13.2 +ruff==0.1.7 send2trash==1.8.2 six==1.16.0 +smmap==5.0.1 sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==5.3.0 +sphinx-api-relink==0.0.8 sphinx-autobuild==2021.3.14 sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 @@ -169,6 +188,7 @@ sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 sphinx-design==0.5.0 sphinx-hep-pdgref==0.2.0 +sphinx-pybtex-etal-style==0.0.2 sphinx-thebe==0.3.0 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.7 @@ -184,32 +204,35 @@ sympy==1.12 tabledata==1.3.3 tabulate==0.9.0 tcolorpy==0.1.4 -terminado==0.17.1 +terminado==0.18.0 tinycss2==1.2.1 tomli==2.0.1 -tornado==6.3.3 -tox==4.11.3 -traitlets==5.13.0 +tomlkit==0.12.3 +tornado==6.4 +tox==4.11.4 +traitlets==5.14.0 typepy==1.3.2 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-setuptools==68.2.0.0 +types-setuptools==69.0.0.0 typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 -urllib3==2.0.7 -virtualenv==20.24.6 -wcwidth==0.2.9 +urllib3==2.1.0 +virtualenv==20.25.0 +wcwidth==0.2.12 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.4 -wheel==0.41.3 +websocket-client==1.7.0 +wheel==0.42.0 widgetsnbextension==4.0.9 -wrapt==1.15.0 +wrapt==1.16.0 +yarg==0.1.9 zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: +# pip # pwa-pages # setuptools diff --git a/.cspell.json b/.cspell.json index e612b4c2..556275df 100644 --- a/.cspell.json +++ b/.cspell.json @@ -1,6 +1,11 @@ { "version": "0.2", - "enableFiletypes": ["git-commit", "julia", "jupyter"], + "enableFiletypes": [ + "git-commit", + "github-actions-workflow", + "julia", + "jupyter" + ], "flagWords": [ "analyse", "colour", diff --git a/.gitpod.yml b/.gitpod.yml index d981b21f..7945c72f 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,4 +1,5 @@ tasks: + - init: pyenv local 3.8 - init: pip install -c .constraints/py3.8.txt -e .[dev] github: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e558e114..4e86878f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,6 +4,7 @@ ci: skip: - check-jsonschema - mypy + - prettier - pyright - taplo - update-json-schema @@ -14,6 +15,20 @@ repos: - id: check-hooks-apply - id: check-useless-excludes + - repo: https://github.com/ComPWA/repo-maintenance + rev: 0.1.9 + hooks: + - id: check-dev-files + args: + - --ci-skipped-tests=all + - --no-macos + - --no-prettierrc + - --pin-requirements=bimonthly + - --repo-name=PWA-pages + - --repo-title=PWA Pages + - id: colab-toc-visible + - id: fix-nbformat-version + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: @@ -38,29 +53,6 @@ repos: args: ["--django"] - id: trailing-whitespace - - repo: https://github.com/ComPWA/repo-maintenance - rev: 0.1.1 - hooks: - - id: check-dev-files - args: - - --ci-skipped-tests=all - - --no-macos - - --no-prettierrc - - --pin-requirements=bimonthly - - --repo-name=PWA-pages - - --repo-title=PWA Pages - - id: colab-toc-visible - - id: fix-nbformat-version - - repo: https://github.com/nbQA-dev/nbQA - rev: 1.7.0 - hooks: - - id: nbqa-pyupgrade - args: - - --py37-plus - - id: nbqa-ruff - args: - - --fix - - repo: https://github.com/psf/black-pre-commit-mirror rev: 23.11.0 hooks: @@ -75,7 +67,7 @@ repos: - id: blacken-docs - repo: https://github.com/sirosen/check-jsonschema - rev: 0.27.1 + rev: 0.27.3 hooks: - id: check-jsonschema name: Check project inventory YAML files @@ -85,7 +77,7 @@ repos: args: ["--schemafile", "./docs/software/project-inventory-schema.json"] - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v8.0.0 + rev: v8.1.1 hooks: - id: cspell @@ -136,28 +128,21 @@ repos: metadata.vscode - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.3 + rev: v4.0.0-alpha.3-1 hooks: - id: prettier - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.334 + rev: v1.1.339 hooks: - id: pyright - - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 - hooks: - - id: pyupgrade - args: - - --py37-plus - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.4 + rev: v0.1.7 hooks: - id: ruff - args: - - --fix + args: [--fix] + types_or: [python, pyi, jupyter] - repo: https://github.com/ComPWA/mirrors-taplo rev: v0.8.1 diff --git a/.readthedocs.yml b/.readthedocs.yml index 855501d1..f34ae963 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -16,4 +16,4 @@ build: - graphviz jobs: post_install: - - pip install -e .[doc] -c .constraints/py3.8.txt + - pip install -c .constraints/py3.8.txt -e .[doc] diff --git a/.vscode/settings.json b/.vscode/settings.json index 267082a1..a0877d09 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,7 +17,7 @@ }, "[python]": { "editor.codeActionsOnSave": { - "source.organizeImports": true + "source.organizeImports": "explicit" }, "editor.defaultFormatter": "ms-python.black-formatter", "editor.rulers": [88] @@ -31,6 +31,7 @@ "coverage-gutters.showGutterCoverage": false, "coverage-gutters.showLineCoverage": true, "cSpell.enabled": true, + "diffEditor.experimental.showMoves": true, "editor.formatOnSave": true, "files.watcherExclude": { "**/*_cache/**": true, @@ -41,6 +42,7 @@ "git.rebaseWhenSync": true, "github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"], "livePreview.defaultPreviewPath": "docs/_build/html", + "multiDiffEditor.experimental.enabled": true, "mypy-type-checker.args": ["--config-file=${workspaceFolder}/pyproject.toml"], "mypy-type-checker.importStrategy": "fromEnvironment", "myst.preview.extensions": [ diff --git a/docs/.gitignore b/docs/.gitignore index 509b35a9..c0322827 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,5 +1,6 @@ *.doctree *.inv *build/ +api/ !_static/* diff --git a/docs/conf.py b/docs/conf.py index 1ed486fa..02d3c60a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,106 +1,75 @@ """Configuration file for the Sphinx documentation builder. This file only contains a selection of the most common options. For a full list see the -documentation: -https://www.sphinx-doc.org/en/master/usage/configuration.html +documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html """ -# pyright: reportMissingImports=false from __future__ import annotations -import dataclasses -import os -import re -import sys from datetime import datetime -from functools import lru_cache -from typing import TYPE_CHECKING, Any -import sphinxcontrib.bibtex.plugin # type: ignore[import] -from docutils import nodes -from pybtex.plugin import register_plugin -from pybtex.richtext import BaseText, Tag, Text -from pybtex.style.formatting.unsrt import Style as UnsrtStyle -from pybtex.style.template import ( - FieldIsMissing, - Node, - _format_list, - field, - href, - join, - node, - sentence, - words, +from sphinx_api_relink.helpers import ( + get_branch_name, + get_execution_mode, + get_package_version, + pin, + pin_minor, + set_intersphinx_version_remapping, ) -from sphinxcontrib.bibtex.style.referencing.author_year import AuthorYearReferenceStyle - -if TYPE_CHECKING: - from docutils.nodes import Node as docutils_Node - from docutils.nodes import system_message - from docutils.parsers.rst.states import Inliner - from pybtex.database import Entry - from sphinx.application import Sphinx - from sphinx.util.typing import RoleFunction - -if sys.version_info < (3, 8): - from importlib_metadata import PackageNotFoundError - from importlib_metadata import version as get_package_version -else: - from importlib.metadata import PackageNotFoundError - from importlib.metadata import version as get_package_version - -# -- Project information ----------------------------------------------------- -project = "PWA Software Pages" -PACKAGE = "pwa_pages" -copyright = "2020, ComPWA" # noqa: A001 -author = "Common Partial Wave Analysis" - - -def get_branch_name() -> str: - branch = os.environ.get("READTHEDOCS_VERSION") - if branch == "latest": - branch = "main" - if branch is None: - branch = os.environ.get("GITHUB_REF", "main") - branch = branch.replace("refs/heads/", "") # type: ignore[union-attr] - branch = branch.replace("refs/pull/", "") - branch = branch.replace("refs/tags/", "") - if re.match(r"^\d+/[a-z]+$", branch) is not None: # type: ignore[arg-type] - branch = "main" # PR preview - print(f" Branch name: {branch}") - return branch - - -def get_repository_name() -> str: - repo = os.environ.get("GITHUB_REPOSITORY", "ComPWA/PWA-pages") - print(f" Repository: {repo}") - return repo +set_intersphinx_version_remapping({ + "ipython": { + "8.12.2": "8.12.1", + "8.12.3": "8.12.1", + }, + "matplotlib": {"3.5.1": "3.5.0"}, +}) BRANCH = get_branch_name() -REPO_NAME = get_repository_name() - -try: - __VERSION = get_package_version(PACKAGE) - version = ".".join(__VERSION.split(".")[:3]) -except PackageNotFoundError: - pass - +ORGANIZATION = "ComPWA" +PACKAGE = "pwa_pages" +REPO_NAME = "PWA-pages" +REPO_TITLE = "PWA Software Pages" -# -- General configuration --------------------------------------------------- -master_doc = "index.md" -source_suffix = { - ".ipynb": "myst-nb", - ".md": "myst-nb", - ".rst": "restructuredtext", +add_module_names = False +api_github_repo = f"{ORGANIZATION}/{REPO_NAME}" +api_target_substitutions: dict[str, str | tuple[str, str]] = { + "datetime": "datetime.datetime", } - -# The master toctree document. -master_doc = "index" -modindex_common_prefix = [ - f"{PACKAGE}.", +author = "Common Partial Wave Analysis" +autodoc_default_options = { + "members": True, + "undoc-members": True, + "show-inheritance": True, + "special-members": ", ".join([ + "__call__", + "__eq__", + ]), +} +autosectionlabel_prefix_document = True +bibtex_bibfiles = ["bibliography.bib"] +bibtex_default_style = "unsrt_et_al" +bibtex_reference_style = "author_year" +codeautolink_concat_default = True +codeautolink_global_preface = """ +from IPython.display import display +""" +comments_config = { + "hypothesis": True, + "utterances": { + "repo": f"{ORGANIZATION}/{REPO_NAME}", + "issue-term": "pathname", + "label": "📝 Docs", + }, +} +copybutton_prompt_is_regexp = True +copybutton_prompt_text = r">>> |\.\.\. " # doctest +copyright = f"2020, {ORGANIZATION}" +default_role = "py:obj" +exclude_patterns = [ + "**.ipynb_checkpoints", + "*build", ] - extensions = [ "myst_nb", "sphinx.ext.autodoc", @@ -110,36 +79,18 @@ def get_repository_name() -> str: "sphinx.ext.mathjax", "sphinx.ext.napoleon", "sphinx.ext.todo", - "sphinx.ext.viewcode", + "sphinx_api_relink", "sphinx_codeautolink", "sphinx_comments", "sphinx_copybutton", "sphinx_design", "sphinx_hep_pdgref", + "sphinx_pybtex_etal_style", "sphinx_thebe", "sphinx_togglebutton", "sphinxcontrib.bibtex", ] -exclude_patterns = [ - "**.ipynb_checkpoints", - "*build", -] - -# General sphinx settings -add_module_names = False -autodoc_default_options = { - "members": True, - "undoc-members": True, - "show-inheritance": True, - "special-members": ", ".join([ - "__call__", - "__eq__", - ]), -} -codeautolink_concat_default = True -codeautolink_global_preface = """ -from IPython.display import display -""" +generate_apidoc_package_path = f"../src/{PACKAGE}" graphviz_output_format = "svg" html_copy_source = True # needed for download notebook button html_css_files = ["custom.css"] @@ -152,7 +103,7 @@ def get_repository_name() -> str: html_static_path = ["_static"] html_theme = "sphinx_book_theme" html_theme_options = { - "repository_url": f"https://github.com/{REPO_NAME}", + "repository_url": f"https://github.com/{ORGANIZATION}/{REPO_NAME}", "repository_branch": BRANCH, "path_to_docs": "docs", "use_download_button": True, @@ -168,91 +119,13 @@ def get_repository_name() -> str: }, } html_title = "Partial Wave Analysis" -pygments_style = "sphinx" -todo_include_todos = True -viewcode_follow_imported_members = True - -# Cross-referencing configuration -default_role = "py:obj" -primary_domain = "py" -nitpicky = True # warn if cross-references are missing - -# Intersphinx settings -version_remapping = { - "ipython": { - "8.12.2": "8.12.1", - "8.12.3": "8.12.1", - }, - "matplotlib": {"3.5.1": "3.5.0"}, -} - - -def get_version(package_name: str) -> str: - python_version = f"{sys.version_info.major}.{sys.version_info.minor}" - constraints_path = f"../.constraints/py{python_version}.txt" - package_name = package_name.lower() - with open(constraints_path) as stream: - constraints = stream.read() - for line in constraints.split("\n"): - line = line.split("#")[0] # remove comments - line = line.strip() - line = line.lower() - if not line.startswith(package_name): - continue - if not line: - continue - line_segments = tuple(line.split("==")) - if len(line_segments) != 2: # noqa: PLR2004 - continue - _, installed_version, *_ = line_segments - installed_version = installed_version.strip() - remapped_versions = version_remapping.get(package_name) - if remapped_versions is not None: - existing_version = remapped_versions.get(installed_version) - if existing_version is not None: - return existing_version - return installed_version - return "stable" - - -def get_minor_version(package_name: str) -> str: - installed_version = get_version(package_name) - if installed_version == "stable": - return installed_version - matches = re.match(r"^([0-9]+\.[0-9]+).*$", installed_version) - if matches is None: - msg = f"Could not find documentation for {package_name} v{installed_version}" - raise ValueError(msg) - return matches[1] - - intersphinx_mapping = { - "IPython": ( - f"https://ipython.readthedocs.io/en/{get_version('IPython')}", - None, - ), - "matplotlib": ( - f"https://matplotlib.org/{get_version('matplotlib')}", - None, - ), + "IPython": (f"https://ipython.readthedocs.io/en/{pin('IPython')}", None), + "matplotlib": (f"https://matplotlib.org/{pin('matplotlib')}", None), "python": ("https://docs.python.org/3", None), + "pydantic": (f"https://docs.pydantic.dev/{pin_minor('pydantic')}", None), "sympy": ("https://docs.sympy.org/latest", None), } - -# Settings for autosectionlabel -autosectionlabel_prefix_document = True - -# Settings for bibtex -bibtex_bibfiles = [ - "bibliography.bib", -] -bibtex_reference_style = "author_year_no_comma" - -# Settings for copybutton -copybutton_prompt_is_regexp = True -copybutton_prompt_text = r">>> |\.\.\. " # doctest - -# Settings for linkcheck linkcheck_anchors = False linkcheck_ignore = [ "http://127.0.0.1:8000", @@ -262,31 +135,10 @@ def get_minor_version(package_name: str) -> str: "https://home.fnal.gov/~kutschke/Angdist/angdist.ps", "https://physique.cuso.ch", "https://suchung.web.cern.ch", + "https://www.bookfinder.com", ] - - -# Settings for myst_nb -def get_execution_mode() -> str: - if "FORCE_EXECUTE_NB" in os.environ: - print_once("\033[93;1mWill run ALL Jupyter notebooks!\033[0m") - return "force" - if "EXECUTE_NB" in os.environ: - return "cache" - return "off" - - -@lru_cache(maxsize=None) -def print_once(message: str) -> None: - print(message) - - -nb_execution_mode = get_execution_mode() -nb_execution_show_tb = True -nb_execution_timeout = -1 -nb_output_stderr = "remove" -nb_execution_show_tb = True - -# Settings for myst-parser +master_doc = "index" +modindex_common_prefix = [f"{PACKAGE}."] myst_enable_extensions = [ "amsmath", "colon_fence", @@ -297,157 +149,32 @@ def print_once(message: str) -> None: myst_substitutions = { "branch": BRANCH, "build_date": datetime.today().strftime("%d %B %Y"), - "repo": REPO_NAME, + "repo": f"{ORGANIZATION}/{REPO_NAME}", } myst_update_mathjax = False - -# Settings for sphinx_comments -comments_config = { - "hypothesis": True, - "utterances": { - "repo": f"ComPWA/{REPO_NAME}", - "issue-term": "pathname", - "label": "📝 Docs", - }, +nb_execution_mode = get_execution_mode() +nb_execution_show_tb = True +nb_execution_timeout = -1 +nb_output_stderr = "remove" +nitpick_ignore_regex = [ + (r"py:(class|obj)", "ConfigDict"), + (r"py:(class|obj)", "FieldInfo"), + (r"py:(class|obj)", "Model.__fields__"), + (r"py:(class|obj)", "pydantic.main.BaseModel"), +] +nitpicky = True +primary_domain = "py" +project = REPO_TITLE +pygments_style = "sphinx" +release = get_package_version(PACKAGE) +source_suffix = { + ".ipynb": "myst-nb", + ".md": "myst-nb", + ".rst": "restructuredtext", } - -# Settings for Thebe cell output thebe_config = { "repository_url": html_theme_options["repository_url"], "repository_branch": html_theme_options["repository_branch"], } - - -# Add roles to simplify external links -def setup(app: Sphinx) -> dict[str, Any]: - app.add_role( - "wiki", - wikilink("https://en.wikipedia.org/wiki/%s"), - ) - return { - "parallel_read_safe": True, - "parallel_write_safe": True, - } - - -def wikilink(pattern: str) -> RoleFunction: - def role( # noqa: PLR0913 - name: str, - rawtext: str, - text: str, - lineno: int, - inliner: Inliner, - options: dict | None = None, - content: list[str] | None = None, - ) -> tuple[list[docutils_Node], list[system_message]]: - output_text = text - output_text = output_text.replace("_", " ") - url = pattern % (text,) - if options is None: - options = {} - reference_node = nodes.reference(rawtext, output_text, refuri=url, **options) - return [reference_node], [] - - return role - - -# Specify bibliography style -@dataclasses.dataclass -class NoCommaReferenceStyle( - AuthorYearReferenceStyle # pyright: ignore[reportUntypedBaseClass] -): - author_year_sep: BaseText | str = " " - - -sphinxcontrib.bibtex.plugin.register_plugin( - "sphinxcontrib.bibtex.style.referencing", - "author_year_no_comma", - NoCommaReferenceStyle, -) - - -@node -def et_al(children, data, sep="", sep2=None, last_sep=None): # type: ignore[no-untyped-def] - if sep2 is None: - sep2 = sep - if last_sep is None: - last_sep = sep - parts = [part for part in _format_list(children, data) if part] - if len(parts) <= 1: - return Text(*parts) - if len(parts) == 2: # noqa: PLR2004 - return Text(sep2).join(parts) - if len(parts) == 3: # noqa: PLR2004 - return Text(last_sep).join([Text(sep).join(parts[:-1]), parts[-1]]) - return Text(parts[0], Tag("em", " et al")) - - -@node -def names(children, context, role, **kwargs): # type: ignore[no-untyped-def] - """Return formatted names.""" - assert not children - try: - persons = context["entry"].persons[role] - except KeyError: - raise FieldIsMissing(role, context["entry"]) from None - - style = context["style"] - formatted_names = [ - style.format_name(person, style.abbreviate_names) for person in persons - ] - return et_al(**kwargs)[formatted_names].format_data(context) - - -class MyStyle(UnsrtStyle): # pyright: ignore[reportUntypedBaseClass] - def __init__(self) -> None: - super().__init__(abbreviate_names=True) - - def format_names(self, role, as_sentence: bool = True) -> Node: # type: ignore[no-untyped-def] - formatted_names = names(role, sep=", ", sep2=" and ", last_sep=", and ") - if as_sentence: - return sentence[formatted_names] - return formatted_names - - def format_eprint(self, e: Entry) -> Node: - if "doi" in e.fields: - return "" - return super().format_eprint(e) - - def format_url(self, e: Entry) -> Node: - if "doi" in e.fields or "eprint" in e.fields: - return "" - return words[ - href[ - field("url", raw=True), - field("url", raw=True, apply_func=remove_http), - ] - ] - - def format_isbn(self, e: Entry) -> Node: - return href[ - join[ - "https://isbnsearch.org/isbn/", - field("isbn", raw=True, apply_func=remove_dashes_and_spaces), - ], - join[ - "ISBN:", - field("isbn", raw=True), - ], - ] - - -def remove_dashes_and_spaces(isbn: str) -> str: - to_remove = ["-", " "] - for remove in to_remove: - isbn = isbn.replace(remove, "") - return isbn - - -def remove_http(url: str) -> str: - to_remove = ["https://", "http://"] - for remove in to_remove: - url = url.replace(remove, "") - return url - - -register_plugin("pybtex.style.formatting", "unsrt_et_al", MyStyle) +todo_include_todos = True +version = get_package_version(PACKAGE) diff --git a/docs/index.md b/docs/index.md index 86045568..5fa50821 100644 --- a/docs/index.md +++ b/docs/index.md @@ -47,6 +47,7 @@ analysis caption: Appendices hidden: --- +API glossary references ``` diff --git a/environment.yml b/environment.yml index 027fe19c..281625db 100644 --- a/environment.yml +++ b/environment.yml @@ -6,6 +6,6 @@ dependencies: - pip - graphviz # for binder - pip: - - | - -c .constraints/py3.8.txt - -e .[dev] + - -c .constraints/py3.8.txt -e .[dev] +variables: + PRETTIER_LEGACY_CLI: "1" diff --git a/pyproject.toml b/pyproject.toml index 76347e38..57fde262 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,36 +61,35 @@ dev = [ ] doc = [ "Sphinx >=3", - "docutils <0.18", # https://github.com/executablebooks/jupyter-book/issues/2026#issuecomment-1636657741 "feynman", "ipywidgets", "jupyter", "matplotlib", "myst-nb >=0.11", # myst_enable_extensions - "numpy <1.24", # bug in feynman: https://github.com/ComPWA/PWA-pages/actions/runs/3868808372/jobs/6594501436#step:6:177 + "sphinx-api-relink >=0.0.8", "sphinx-book-theme", "sphinx-codeautolink[ipython]", "sphinx-comments", "sphinx-copybutton", "sphinx-design", "sphinx-hep-pdgref", + "sphinx-pybtex-etal-style", "sphinx-thebe", "sphinx-togglebutton", "sphinxcontrib-bibtex >=2.2", # bibtex_reference_style "sympy", - 'importlib-metadata; python_version <"3.8.0"', -] -format = [ - "black", ] +format = ["black"] jupyter = [ "PWA-pages[doc]", + "isort", "jupyterlab", "jupyterlab-code-formatter", + "jupyterlab-git", "jupyterlab-lsp", "jupyterlab-myst", + "python-lsp-ruff", "python-lsp-server[rope]", - 'ypy-websocket <0.8.3; python_version <"3.8.0"', ] lint = [ "PWA-pages[mypy]", @@ -98,6 +97,7 @@ lint = [ ] mypy = [ "mypy >=0.730", # error code support + "sphinx-api-relink >=0.0.8", "types-PyYAML", "types-docutils", "types-pkg-resources", @@ -111,6 +111,7 @@ sty = [ "pre-commit >=1.4.0", ] test = [ + "nbmake", "pytest", "pytest-cov", "pytest-xdist", @@ -195,20 +196,6 @@ module = ["sphinx.*"] ignore_missing_imports = true module = ["sphinxcontrib.bibtex.*"] -[tool.nbqa.addopts] -ruff = [ - "--extend-ignore=B018", - "--extend-ignore=C90", - "--extend-ignore=D", - "--extend-ignore=N806", - "--extend-ignore=N816", - "--extend-ignore=PLR09", - "--extend-ignore=PLR2004", - "--extend-ignore=PLW0602", - "--extend-ignore=PLW0603", - "--line-length=85", -] - [tool.pyright] exclude = [ "**/.git", @@ -265,6 +252,7 @@ testpaths = [ ] [tool.ruff] +extend-include = ["*.ipynb"] extend-select = [ "A", "B", @@ -319,6 +307,22 @@ target-version = "py37" task-tags = ["cspell"] [tool.ruff.per-file-ignores] +"*.ipynb" = [ + "B018", + "C90", + "D", + "E402", + "E703", + "N806", + "N816", + "PLR09", + "PLR2004", + "PLW0602", + "PLW0603", + "S101", + "T20", + "TCH00", +] "docs/*" = [ "E402", "INP001", @@ -327,6 +331,7 @@ task-tags = ["cspell"] "S113", "T201", ] +"docs/conf.py" = ["A001"] "setup.py" = ["D100"] "src/pwa_pages/project_inventory.py" = [ "FA100", @@ -339,6 +344,7 @@ task-tags = ["cspell"] "PLR0913", "PLR2004", "S101", + "T20", ] [tool.ruff.pydocstyle] diff --git a/tox.ini b/tox.ini index ca7bea7e..cb7440a5 100644 --- a/tox.ini +++ b/tox.ini @@ -64,6 +64,7 @@ commands = --re-ignore docs/.*\.yaml \ --re-ignore docs/.*\.yml \ --re-ignore docs/_build/.* \ + --re-ignore docs/api \ --watch docs \ docs/ docs/_build/html description = @@ -88,6 +89,36 @@ setenv = EXECUTE_NB = yes FORCE_COLOR = yes +[testenv:docnblive] +allowlist_externals = + sphinx-autobuild +commands = + sphinx-autobuild \ + --open-browser \ + --re-ignore .*/.ipynb_checkpoints/.* \ + --re-ignore .*/__pycache__/.* \ + --re-ignore .*\.gitignore \ + --re-ignore docs/.*\.csv \ + --re-ignore docs/.*\.gif \ + --re-ignore docs/.*\.gv \ + --re-ignore docs/.*\.inv \ + --re-ignore docs/.*\.json \ + --re-ignore docs/.*\.pickle \ + --re-ignore docs/.*\.png \ + --re-ignore docs/.*\.svg \ + --re-ignore docs/.*\.yaml \ + --re-ignore docs/.*\.yml \ + --re-ignore docs/_build/.* \ + --re-ignore docs/api \ + --watch docs \ + docs/ docs/_build/html +description = + Set up a server to directly preview changes to the HTML pages +passenv = * +setenv = + EXECUTE_NB = yes + FORCE_COLOR = yes + [testenv:jcache] allowlist_externals = jcache @@ -111,6 +142,17 @@ passenv = * setenv = FORCE_COLOR = yes +[testenv:nb] +allowlist_externals = + pytest +commands = + pytest --nbmake {posargs:docs} +description = + Run all notebooks with pytest +passenv = * +setenv = + PYTHONHASHSEED = 0 + [testenv:sty] allowlist_externals = mypy