From 57f38190d110db65df522fd474a293452758acfb Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Sat, 9 Dec 2023 01:50:14 +0100 Subject: [PATCH] MAINT: update pip constraints and pre-commit (#372) * DX: gitignore `.jupyter_ystore.db` This is a file produced by `jupyter-collaboration` * DX: gitignore `oryx-build-commands.txt` Produced when running on GitHub Codespaces * MAINT: clean up `conf.py` with new Sphinx extensions * MAINT: remove `ypy-websocket` version constraints --------- Co-authored-by: GitHub Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .constraints/py3.10.txt | 26 +++++++++++------------ .constraints/py3.11.txt | 26 +++++++++++------------ .constraints/py3.12.txt | 26 +++++++++++------------ .constraints/py3.7.txt | 16 +++++++------- .constraints/py3.8.txt | 26 +++++++++++------------ .constraints/py3.9.txt | 26 +++++++++++------------ .cspell.json | 1 + .gitignore | 2 ++ .gitpod.yml | 1 + .pre-commit-config.yaml | 46 ++++++++++++++++++++--------------------- .readthedocs.yml | 4 ++-- .vscode/settings.json | 2 +- docs/conf.py | 45 ++++++++++++++++------------------------ environment.yml | 4 +--- pyproject.toml | 4 ++-- 15 files changed, 118 insertions(+), 137 deletions(-) diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index 197849042..671670e12 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -47,12 +47,12 @@ gitdb==4.0.11 gitpython==3.1.40 gprof2dot==2022.7.29 graphviz==0.20.1 -greenlet==3.0.1 +greenlet==3.0.2 hepunits==2.3.2 -identify==2.5.32 +identify==2.5.33 idna==3.6 imagesize==1.4.1 -importlib-metadata==6.9.0 +importlib-metadata==7.0.0 iniconfig==2.0.0 ipykernel==6.27.1 ipympl==0.9.3 @@ -72,7 +72,7 @@ jupyter-client==8.6.0 jupyter-core==5.5.0 jupyter-events==0.9.0 jupyter-lsp==2.2.1 -jupyter-server==2.11.1 +jupyter-server==2.12.1 jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.4.4 jupyterlab==4.0.9 @@ -101,7 +101,7 @@ mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==1.0.0 nbclient==0.6.8 -nbconvert==7.11.0 +nbconvert==7.12.0 nbdime==4.0.1 nbformat==5.9.2 nbmake==1.4.6 @@ -117,7 +117,7 @@ particle==0.23.1 pathspec==0.11.2 pexpect==4.9.0 pillow==10.1.0 -platformdirs==4.0.0 +platformdirs==4.1.0 pluggy==1.3.0 pre-commit==3.5.0 prometheus-client==0.19.0 @@ -144,16 +144,16 @@ python-lsp-ruff==2.0.0 python-lsp-server==1.9.0 pytoolconfig==1.2.6 pyyaml==6.0.1 -pyzmq==25.1.1 +pyzmq==25.1.2 qrules==0.9.8 -referencing==0.31.1 +referencing==0.32.0 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.0 rope==1.11.0 rpds-py==0.13.2 -ruff==0.1.6 +ruff==0.1.7 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -161,6 +161,7 @@ sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==5.3.0 +sphinx-api-relink==0.0.6 sphinx-autobuild==2021.3.14 sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 @@ -168,6 +169,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 @@ -188,11 +190,7 @@ tornado==6.4 tox==4.11.4 tqdm==4.66.1 traitlets==5.14.0 -types-docutils==0.20.0.3 -types-pkg-resources==0.1.3 types-python-dateutil==2.8.19.14 -types-requests==2.31.0.10 -types-setuptools==69.0.0.0 typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 @@ -201,7 +199,7 @@ virtualenv==20.25.0 wcwidth==0.2.12 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.4 +websocket-client==1.7.0 wheel==0.42.0 widgetsnbextension==4.0.9 zipp==3.17.0 diff --git a/.constraints/py3.11.txt b/.constraints/py3.11.txt index 187868c6a..22de0624a 100644 --- a/.constraints/py3.11.txt +++ b/.constraints/py3.11.txt @@ -46,12 +46,12 @@ gitdb==4.0.11 gitpython==3.1.40 gprof2dot==2022.7.29 graphviz==0.20.1 -greenlet==3.0.1 +greenlet==3.0.2 hepunits==2.3.2 -identify==2.5.32 +identify==2.5.33 idna==3.6 imagesize==1.4.1 -importlib-metadata==6.9.0 +importlib-metadata==7.0.0 iniconfig==2.0.0 ipykernel==6.27.1 ipympl==0.9.3 @@ -71,7 +71,7 @@ jupyter-client==8.6.0 jupyter-core==5.5.0 jupyter-events==0.9.0 jupyter-lsp==2.2.1 -jupyter-server==2.11.1 +jupyter-server==2.12.1 jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.4.4 jupyterlab==4.0.9 @@ -100,7 +100,7 @@ mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==1.0.0 nbclient==0.6.8 -nbconvert==7.11.0 +nbconvert==7.12.0 nbdime==4.0.1 nbformat==5.9.2 nbmake==1.4.6 @@ -116,7 +116,7 @@ particle==0.23.1 pathspec==0.11.2 pexpect==4.9.0 pillow==10.1.0 -platformdirs==4.0.0 +platformdirs==4.1.0 pluggy==1.3.0 pre-commit==3.5.0 prometheus-client==0.19.0 @@ -143,16 +143,16 @@ python-lsp-ruff==2.0.0 python-lsp-server==1.9.0 pytoolconfig==1.2.6 pyyaml==6.0.1 -pyzmq==25.1.1 +pyzmq==25.1.2 qrules==0.9.8 -referencing==0.31.1 +referencing==0.32.0 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.0 rope==1.11.0 rpds-py==0.13.2 -ruff==0.1.6 +ruff==0.1.7 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -160,6 +160,7 @@ sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==5.3.0 +sphinx-api-relink==0.0.6 sphinx-autobuild==2021.3.14 sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 @@ -167,6 +168,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 @@ -186,11 +188,7 @@ tornado==6.4 tox==4.11.4 tqdm==4.66.1 traitlets==5.14.0 -types-docutils==0.20.0.3 -types-pkg-resources==0.1.3 types-python-dateutil==2.8.19.14 -types-requests==2.31.0.10 -types-setuptools==69.0.0.0 typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 @@ -199,7 +197,7 @@ virtualenv==20.25.0 wcwidth==0.2.12 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.4 +websocket-client==1.7.0 wheel==0.42.0 widgetsnbextension==4.0.9 zipp==3.17.0 diff --git a/.constraints/py3.12.txt b/.constraints/py3.12.txt index db92cd340..b764adfa7 100644 --- a/.constraints/py3.12.txt +++ b/.constraints/py3.12.txt @@ -46,12 +46,12 @@ gitdb==4.0.11 gitpython==3.1.40 gprof2dot==2022.7.29 graphviz==0.20.1 -greenlet==3.0.1 +greenlet==3.0.2 hepunits==2.3.2 -identify==2.5.32 +identify==2.5.33 idna==3.6 imagesize==1.4.1 -importlib-metadata==6.9.0 +importlib-metadata==7.0.0 iniconfig==2.0.0 ipykernel==6.27.1 ipympl==0.9.3 @@ -71,7 +71,7 @@ jupyter-client==8.6.0 jupyter-core==5.5.0 jupyter-events==0.9.0 jupyter-lsp==2.2.1 -jupyter-server==2.11.1 +jupyter-server==2.12.1 jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.4.4 jupyterlab==4.0.9 @@ -100,7 +100,7 @@ mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==1.0.0 nbclient==0.6.8 -nbconvert==7.11.0 +nbconvert==7.12.0 nbdime==4.0.1 nbformat==5.9.2 nbmake==1.4.6 @@ -116,7 +116,7 @@ particle==0.23.1 pathspec==0.11.2 pexpect==4.9.0 pillow==10.1.0 -platformdirs==4.0.0 +platformdirs==4.1.0 pluggy==1.3.0 pre-commit==3.5.0 prometheus-client==0.19.0 @@ -143,16 +143,16 @@ python-lsp-ruff==2.0.0 python-lsp-server==1.9.0 pytoolconfig==1.2.6 pyyaml==6.0.1 -pyzmq==25.1.1 +pyzmq==25.1.2 qrules==0.9.8 -referencing==0.31.1 +referencing==0.32.0 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.0 rope==1.11.0 rpds-py==0.13.2 -ruff==0.1.6 +ruff==0.1.7 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -160,6 +160,7 @@ sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==5.3.0 +sphinx-api-relink==0.0.6 sphinx-autobuild==2021.3.14 sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 @@ -167,6 +168,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 @@ -186,11 +188,7 @@ tornado==6.4 tox==4.11.4 tqdm==4.66.1 traitlets==5.14.0 -types-docutils==0.20.0.3 -types-pkg-resources==0.1.3 types-python-dateutil==2.8.19.14 -types-requests==2.31.0.10 -types-setuptools==69.0.0.0 typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 @@ -199,7 +197,7 @@ virtualenv==20.25.0 wcwidth==0.2.12 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.4 +websocket-client==1.7.0 wheel==0.42.0 widgetsnbextension==4.0.9 zipp==3.17.0 diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index 828076b16..a2e0b6186 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -48,7 +48,7 @@ gitdb==4.0.11 gitpython==3.1.40 gprof2dot==2022.7.29 graphviz==0.20.1 -greenlet==3.0.1 +greenlet==3.0.2 hepunits==2.3.2 identify==2.5.24 idna==3.6 @@ -77,7 +77,7 @@ 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 @@ -159,7 +159,7 @@ rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.0 rope==1.9.0 -ruff==0.1.6 +ruff==0.1.7 send2trash==1.8.2 singledispatchmethod==1.0 ; python_version < "3.8.0" six==1.16.0 @@ -168,6 +168,7 @@ sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.4.1 sphinx==5.3.0 +sphinx-api-relink==0.0.6 sphinx-autobuild==2021.3.14 sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 @@ -175,6 +176,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 @@ -195,10 +197,6 @@ tox==4.8.0 tqdm==4.66.1 traitlets==5.9.0 typed-ast==1.5.5 -types-docutils==0.20.0.3 -types-pkg-resources==0.1.3 -types-requests==2.31.0.10 -types-setuptools==69.0.0.0 typing-extensions==4.7.1 ; python_version < "3.8.0" ujson==5.7.0 uri-template==1.3.0 @@ -210,8 +208,8 @@ webencodings==0.5.1 websocket-client==1.6.1 wheel==0.42.0 widgetsnbextension==4.0.9 -y-py==0.5.9 -ypy-websocket==0.8.2 +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 579a9cc51..9db64db4f 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -48,12 +48,12 @@ gitdb==4.0.11 gitpython==3.1.40 gprof2dot==2022.7.29 graphviz==0.20.1 -greenlet==3.0.1 +greenlet==3.0.2 hepunits==2.3.2 -identify==2.5.32 +identify==2.5.33 idna==3.6 imagesize==1.4.1 -importlib-metadata==6.9.0 +importlib-metadata==7.0.0 importlib-resources==6.1.1 iniconfig==2.0.0 ipykernel==6.27.1 @@ -74,7 +74,7 @@ jupyter-client==8.6.0 jupyter-core==5.5.0 jupyter-events==0.9.0 jupyter-lsp==2.2.1 -jupyter-server==2.11.1 +jupyter-server==2.12.1 jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.4.4 jupyterlab==4.0.9 @@ -103,7 +103,7 @@ mypy-extensions==1.0.0 myst-nb==0.17.2 myst-parser==0.18.1 nbclient==0.6.8 -nbconvert==7.11.0 +nbconvert==7.12.0 nbdime==4.0.1 nbformat==5.9.2 nbmake==1.4.6 @@ -121,7 +121,7 @@ pexpect==4.9.0 pickleshare==0.7.5 pillow==10.1.0 pkgutil-resolve-name==1.3.10 -platformdirs==4.0.0 +platformdirs==4.1.0 pluggy==1.3.0 pre-commit==3.5.0 prometheus-client==0.19.0 @@ -149,16 +149,16 @@ python-lsp-server==1.9.0 pytoolconfig==1.2.6 pytz==2023.3.post1 pyyaml==6.0.1 -pyzmq==25.1.1 +pyzmq==25.1.2 qrules==0.9.8 -referencing==0.31.1 +referencing==0.32.0 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.0 rope==1.11.0 rpds-py==0.13.2 -ruff==0.1.6 +ruff==0.1.7 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -166,6 +166,7 @@ sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==5.3.0 +sphinx-api-relink==0.0.6 sphinx-autobuild==2021.3.14 sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 @@ -173,6 +174,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 @@ -193,11 +195,7 @@ tornado==6.4 tox==4.11.4 tqdm==4.66.1 traitlets==5.14.0 -types-docutils==0.20.0.3 -types-pkg-resources==0.1.3 types-python-dateutil==2.8.19.14 -types-requests==2.31.0.10 -types-setuptools==69.0.0.0 typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 @@ -206,7 +204,7 @@ virtualenv==20.25.0 wcwidth==0.2.12 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.4 +websocket-client==1.7.0 wheel==0.42.0 widgetsnbextension==4.0.9 zipp==3.17.0 diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index 558cba688..dcd3b990f 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -47,12 +47,12 @@ gitdb==4.0.11 gitpython==3.1.40 gprof2dot==2022.7.29 graphviz==0.20.1 -greenlet==3.0.1 +greenlet==3.0.2 hepunits==2.3.2 -identify==2.5.32 +identify==2.5.33 idna==3.6 imagesize==1.4.1 -importlib-metadata==6.9.0 +importlib-metadata==7.0.0 importlib-resources==6.1.1 iniconfig==2.0.0 ipykernel==6.27.1 @@ -73,7 +73,7 @@ jupyter-client==8.6.0 jupyter-core==5.5.0 jupyter-events==0.9.0 jupyter-lsp==2.2.1 -jupyter-server==2.11.1 +jupyter-server==2.12.1 jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.4.4 jupyterlab==4.0.9 @@ -102,7 +102,7 @@ mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==1.0.0 nbclient==0.6.8 -nbconvert==7.11.0 +nbconvert==7.12.0 nbdime==4.0.1 nbformat==5.9.2 nbmake==1.4.6 @@ -118,7 +118,7 @@ particle==0.23.1 pathspec==0.11.2 pexpect==4.9.0 pillow==10.1.0 -platformdirs==4.0.0 +platformdirs==4.1.0 pluggy==1.3.0 pre-commit==3.5.0 prometheus-client==0.19.0 @@ -145,16 +145,16 @@ python-lsp-ruff==2.0.0 python-lsp-server==1.9.0 pytoolconfig==1.2.6 pyyaml==6.0.1 -pyzmq==25.1.1 +pyzmq==25.1.2 qrules==0.9.8 -referencing==0.31.1 +referencing==0.32.0 requests==2.31.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.7.0 rope==1.11.0 rpds-py==0.13.2 -ruff==0.1.6 +ruff==0.1.7 send2trash==1.8.2 six==1.16.0 smmap==5.0.1 @@ -162,6 +162,7 @@ sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==5.3.0 +sphinx-api-relink==0.0.6 sphinx-autobuild==2021.3.14 sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 @@ -169,6 +170,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 @@ -189,11 +191,7 @@ tornado==6.4 tox==4.11.4 tqdm==4.66.1 traitlets==5.14.0 -types-docutils==0.20.0.3 -types-pkg-resources==0.1.3 types-python-dateutil==2.8.19.14 -types-requests==2.31.0.10 -types-setuptools==69.0.0.0 typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 @@ -202,7 +200,7 @@ virtualenv==20.25.0 wcwidth==0.2.12 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.4 +websocket-client==1.7.0 wheel==0.42.0 widgetsnbextension==4.0.9 zipp==3.17.0 diff --git a/.cspell.json b/.cspell.json index 4a266d711..eb60f233f 100644 --- a/.cspell.json +++ b/.cspell.json @@ -21,6 +21,7 @@ ], "ignorePaths": [ "**/*.bib", + "**/*.rst_t", "**/.cspell.json", ".constraints/*.txt", ".editorconfig", diff --git a/.gitignore b/.gitignore index 2b8d0d1a7..5dc65be51 100644 --- a/.gitignore +++ b/.gitignore @@ -25,11 +25,13 @@ version.py .coverage .coverage.* .ipynb_checkpoints/ +.jupyter_ystore.db .mypy*/ .pytest_cache/ .virtual_documents/ __pycache__/ htmlcov/ +oryx-build-commands.txt prof/ # Virtual environments diff --git a/.gitpod.yml b/.gitpod.yml index d534cc07b..fb4acd8d6 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 4a7159868..c0fb6ecab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,24 @@ 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: + - --doc-apt-packages=graphviz + - --no-prettierrc + - --pin-requirements=monthly + - --repo-name=ampform + - --repo-title=AmpForm + - id: colab-toc-visible + - id: fix-nbformat-version + - id: set-nb-cells + args: + - --add-install-cell + - --additional-packages=IPython + - --extras-require=doc,viz + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: @@ -38,24 +56,6 @@ repos: args: ["--django"] - id: trailing-whitespace - - repo: https://github.com/ComPWA/repo-maintenance - rev: 0.1.6 - hooks: - - id: check-dev-files - args: - - --doc-apt-packages=graphviz - - --no-prettierrc - - --pin-requirements=monthly - - --repo-name=ampform - - --repo-title=AmpForm - - id: colab-toc-visible - - id: fix-nbformat-version - - id: set-nb-cells - args: - - --add-install-cell - - --additional-packages=IPython - - --extras-require=doc,viz - - repo: https://github.com/psf/black-pre-commit-mirror rev: 23.11.0 hooks: @@ -70,7 +70,7 @@ repos: - id: blacken-docs - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.27.2 + rev: 0.27.3 hooks: - id: check-jsonschema name: Check CITATION.cff @@ -83,7 +83,7 @@ repos: pass_filenames: false - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v8.0.0 + rev: v8.1.1 hooks: - id: cspell @@ -134,17 +134,17 @@ repos: metadata.vscode - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.3 + rev: v4.0.0-alpha.3-1 hooks: - id: prettier - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.338 + rev: v1.1.339 hooks: - id: pyright - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.6 + rev: v0.1.7 hooks: - id: ruff args: [--fix] diff --git a/.readthedocs.yml b/.readthedocs.yml index 6c62be1ff..f34ae963f 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,11 +9,11 @@ formats: - htmlzip build: - os: ubuntu-20.04 + os: ubuntu-22.04 tools: python: "3.8" apt_packages: - 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 2c0096b2d..dc840b3d0 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] diff --git a/docs/conf.py b/docs/conf.py index 5f0dea166..a0dd94647 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,37 +19,33 @@ ) sys.path.insert(0, os.path.abspath(".")) - from _extend_docstrings import extend_docstrings extend_docstrings() - -BRANCH = get_branch_name() -ORGANIZATION = "ComPWA" -PACKAGE = "ampform" -REPO_NAME = "ampform" -REPO_TITLE = "AmpForm" - -BINDER_LINK = f"https://mybinder.org/v2/gh/{ORGANIZATION}/{REPO_NAME}/{BRANCH}?filepath=docs/usage" -EXECUTE_NB = get_execution_mode() != "off" - - set_intersphinx_version_remapping({ "ipython": { "8.12.2": "8.12.1", "8.12.3": "8.12.1", }, - "mpl-interactions": { - "0.24.1": "0.24.0", - }, "ipywidgets": { "8.0.3": "8.0.5", "8.0.4": "8.0.5", "8.0.6": "8.0.5", "8.1.1": "8.1.2", }, + "mpl-interactions": {"0.24.1": "0.24.0"}, }) +BRANCH = get_branch_name() +ORGANIZATION = "ComPWA" +PACKAGE = "ampform" +REPO_NAME = "ampform" +REPO_TITLE = "AmpForm" + +BINDER_LINK = f"https://mybinder.org/v2/gh/{ORGANIZATION}/{REPO_NAME}/{BRANCH}?filepath=docs/usage" +EXECUTE_NB = get_execution_mode() != "off" + + add_module_names = False api_github_repo = f"{ORGANIZATION}/{REPO_NAME}" api_target_substitutions: dict[str, str | tuple[str, str]] = { @@ -123,7 +119,6 @@ import numpy as np import sympy as sp from IPython.display import display - """ comments_config = { "hypothesis": True, @@ -261,7 +256,6 @@ "https://suchung.web.cern.ch", "https://www.bookfinder.com", ] -project = REPO_TITLE master_doc = "index" modindex_common_prefix = [f"{PACKAGE}."] myst_enable_extensions = [ @@ -284,19 +278,17 @@ """, } myst_update_mathjax = False -nitpicky = True -nitpick_ignore = [ - ("py:class", "ArraySum"), - ("py:class", "ampform.sympy._array_expressions.MatrixMultiplication"), - ("py:class", "ipywidgets.widgets.widget_float.FloatSlider"), - ("py:class", "ipywidgets.widgets.widget_int.IntSlider"), - ("py:class", "typing_extensions.Protocol"), -] nb_execution_mode = get_execution_mode() nb_execution_show_tb = True nb_execution_timeout = -1 nb_output_stderr = "remove" +nitpick_ignore = [ + ("py:class", "ArraySum"), + ("py:class", "ampform.sympy._array_expressions.MatrixMultiplication"), +] +nitpicky = True primary_domain = "py" +project = REPO_TITLE pygments_style = "sphinx" release = get_package_version(PACKAGE) source_suffix = { @@ -305,14 +297,13 @@ ".rst": "restructuredtext", } suppress_warnings = [ + "myst.domains", # skipping unknown output mime type: application/json # https://github.com/ComPWA/ampform/runs/8132373732?check_suite_focus=true#step:5:127 "mystnb.unknown_mime_type", - "myst.domains", ] thebe_config = { "repository_url": html_theme_options["repository_url"], "repository_branch": html_theme_options["repository_branch"], } version = get_package_version(PACKAGE) -viewcode_follow_imported_members = True diff --git a/environment.yml b/environment.yml index b60c6f243..e12b86d6b 100644 --- a/environment.yml +++ b/environment.yml @@ -6,9 +6,7 @@ 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" PYTHONHASHSEED: 0 diff --git a/pyproject.toml b/pyproject.toml index 4a4e57c8f..19978b804 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,7 +93,6 @@ jupyter = [ "jupyterlab-myst", "python-lsp-ruff", "python-lsp-server[rope]", - 'ypy-websocket <0.8.3; python_version <"3.8.0"', ] lint = [ "ampform[mypy]", @@ -341,7 +340,7 @@ known-third-party = ["sympy"] "PLW0603", "S101", "S301", - "T201", + "T20", "TCH00", ] "docs/*" = [ @@ -363,6 +362,7 @@ known-third-party = ["sympy"] "PLR0913", "PLR2004", "S101", + "T20", ] [tool.ruff.pydocstyle]