From f99a8aed1332309c045d8b8fadd795e71851de23 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Sat, 9 Dec 2023 20:53:18 +0100 Subject: [PATCH 1/2] DX: define `docnblive` job in `tox.ini` (#510) * DX: activate VSCode multi-file diff editor https://code.visualstudio.com/updates/v1_85\#_multifile-diff-editor * DX: run mypy over more libraries --- .vscode/settings.json | 1 + pyproject.toml | 24 +++++------------------- tox.ini | 32 ++++++++++++++++++++++++++++++++ typings/README.md | 4 ++-- 4 files changed, 40 insertions(+), 21 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 6581b8fb..dec80666 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -53,6 +53,7 @@ } ], "livePreview.defaultPreviewPath": "docs/_build/html", + "multiDiffEditor.experimental.enabled": true, "mypy-type-checker.args": ["--config-file=${workspaceFolder}/pyproject.toml"], "mypy-type-checker.importStrategy": "fromEnvironment", "notebook.gotoSymbols.showAllSymbols": true, diff --git a/pyproject.toml b/pyproject.toml index dc16fc80..a7292b58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -115,6 +115,8 @@ mypy = [ "tensorwaves[test-types]", "types-PyYAML", "types-requests", + "types-tensorflow", + "types-tqdm", ] numba = [ "numba", @@ -230,10 +232,6 @@ module = ["benchmarks.*", "tests.*"] ignore_errors = true module = ["typings.*"] -[[tool.mypy.overrides]] -ignore_missing_imports = true -module = ["IPython.*"] - [[tool.mypy.overrides]] ignore_missing_imports = true module = ["iminuit.*"] @@ -244,27 +242,15 @@ module = ["numba.*"] [[tool.mypy.overrides]] ignore_missing_imports = true -module = ["numpy.*"] - -[[tool.mypy.overrides]] -ignore_missing_imports = true -module = ["phasespace.*"] - -[[tool.mypy.overrides]] -ignore_missing_imports = true -module = ["scipy.*"] - -[[tool.mypy.overrides]] -ignore_missing_imports = true -module = ["sphinx.*"] +module = ["phasespace"] [[tool.mypy.overrides]] ignore_missing_imports = true -module = ["tensorflow.*"] +module = ["scipy.optimize"] [[tool.mypy.overrides]] ignore_missing_imports = true -module = ["tqdm.*"] +module = ["tensorflow.python.ops.numpy_ops"] [tool.pyright] exclude = [ diff --git a/tox.ini b/tox.ini index 1076cce6..355ba30d 100644 --- a/tox.ini +++ b/tox.ini @@ -106,6 +106,38 @@ 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 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/.* \ + --re-ignore docs/usage/logs/.* \ + --re-ignore docs/usage/sub_expr_f? \ + --watch docs \ + --watch src \ + 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:jax] allowlist_externals = pytest diff --git a/typings/README.md b/typings/README.md index adaf1971..472914d6 100644 --- a/typings/README.md +++ b/typings/README.md @@ -6,12 +6,12 @@ external libraries. You can do this using [`stubgen`](https://mypy.readthedocs.io/en/stable/stubgen.html). For instance: ```shell -stubgen -p tensorflow -o typings +stubgen -p sympy -o typings ``` Alternatively, use [Pyright](https://github.com/microsoft/pyright) to generate stub files that contain docstrings as well: ```shell -pyright --createstub tensorflow +pyright --createstub sympy ``` From fb4dcadeadd06505c5d4bc4635a4675e8a17b6d8 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Fri, 12 Jan 2024 18:58:47 +0100 Subject: [PATCH 2/2] MAINT: update pip constraints and pre-commit (#512) Co-authored-by: GitHub Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .constraints/py3.10.txt | 121 +++++++++++---------- .constraints/py3.11.txt | 121 +++++++++++---------- .constraints/py3.8.txt | 116 ++++++++++---------- .constraints/py3.9.txt | 119 ++++++++++---------- .github/workflows/ci.yml | 3 + .github/workflows/requirements.yml | 1 - .gitpod.yml | 6 +- .pre-commit-config.yaml | 15 +-- .readthedocs.yml | 4 +- .vscode/extensions.json | 3 +- docs/usage.ipynb | 6 +- docs/usage/basics.ipynb | 8 +- docs/usage/unbinned-fit.ipynb | 4 +- environment.yml | 4 +- pyproject.toml | 7 +- src/tensorwaves/function/sympy/_printer.py | 1 + 16 files changed, 281 insertions(+), 258 deletions(-) diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index 5ed3be18..1e6d6643 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -6,19 +6,19 @@ # absl-py==2.0.0 accessible-pygments==0.0.4 -alabaster==0.7.13 -ampform==0.14.6 -anyio==4.1.0 +alabaster==0.7.16 +ampform==0.14.8 +anyio==4.2.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 asttokens==2.4.1 astunparse==1.6.3 async-lru==2.0.4 -attrs==23.1.0 -babel==2.13.1 +attrs==23.2.0 +babel==2.14.0 beautifulsoup4==4.12.2 -black==23.11.0 +black==23.12.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 @@ -30,68 +30,68 @@ charset-normalizer==3.3.2 click==8.1.7 cloudpickle==3.0.0 colorama==0.4.6 -comm==0.2.0 +comm==0.2.1 contourpy==1.2.0 -coverage==7.3.2 +coverage==7.4.0 cycler==0.12.1 debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 -distlib==0.3.7 +distlib==0.3.8 dm-tree==0.1.8 docstring-to-markdown==0.13 -docutils==0.19 +docutils==0.20.1 exceptiongroup==1.2.0 execnet==2.0.2 executing==2.0.1 -fastjsonschema==2.19.0 +fastjsonschema==2.19.1 filelock==3.13.1 flatbuffers==23.5.26 -fonttools==4.46.0 +fonttools==4.47.2 fqdn==1.5.1 gast==0.5.4 gitdb==4.0.11 -gitpython==3.1.40 -google-auth==2.25.2 -google-auth-oauthlib==1.1.0 +gitpython==3.1.41 +google-auth==2.26.2 +google-auth-oauthlib==1.2.0 google-pasta==0.2.0 graphviz==0.20.1 -greenlet==3.0.2 +greenlet==3.0.3 grpcio==1.60.0 h5py==3.10.0 -hepunits==2.3.2 +hepunits==2.3.3 identify==2.5.33 idna==3.6 imagesize==1.4.1 iminuit==2.24.0 -importlib-metadata==7.0.0 +importlib-metadata==7.0.1 iniconfig==2.0.0 -ipykernel==6.27.1 +ipykernel==6.28.0 ipympl==0.9.3 -ipython==8.18.1 +ipython==8.20.0 ipython-genutils==0.2.0 ipywidgets==8.1.1 isoduration==20.11.0 -isort==5.12.0 -jax==0.4.21 -jaxlib==0.4.21 +isort==5.13.2 +jax==0.4.23 +jaxlib==0.4.23 jedi==0.19.1 -jinja2==3.1.2 +jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 jsonschema==4.20.0 -jsonschema-specifications==2023.11.2 +jsonschema-specifications==2023.12.1 jupyter==1.0.0 jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-console==6.6.3 -jupyter-core==5.5.0 +jupyter-core==5.7.1 jupyter-events==0.9.0 jupyter-lsp==2.2.1 -jupyter-server==2.12.1 +jupyter-server==2.12.4 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.4.4 -jupyterlab==4.0.9 +jupyter-server-terminals==0.5.1 +jupyterlab==4.0.10 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 jupyterlab-lsp==5.0.1 @@ -104,8 +104,8 @@ kiwisolver==1.4.5 libclang==16.0.6 livereload==2.6.3 llvmlite==0.41.1 -lsprotocol==2023.0.0 -markdown==3.5.1 +lsprotocol==2023.0.1 +markdown==3.5.2 markdown-it-py==3.0.0 markupsafe==2.1.3 matplotlib==3.8.2 @@ -115,12 +115,12 @@ mdurl==0.1.2 mistune==3.0.2 ml-dtypes==0.2.0 mpmath==1.3.0 -mypy==1.7.1 +mypy==1.8.0 mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==2.0.0 nbclient==0.6.8 -nbconvert==7.12.0 +nbconvert==7.14.1 nbdime==4.0.1 nbformat==5.9.2 nbmake==1.4.6 @@ -129,7 +129,7 @@ nodeenv==1.8.0 notebook==7.0.6 notebook-shim==0.2.3 numba==0.58.1 -numpy==1.26.2 +numpy==1.26.3 oauthlib==3.2.2 opt-einsum==3.3.0 overrides==7.4.0 @@ -138,28 +138,28 @@ pandas==2.1.4 pandocfilters==1.5.0 parso==0.8.3 particle==0.23.1 -pathspec==0.11.2 +pathspec==0.12.1 pexpect==4.9.0 phasespace==1.9.0 -pillow==10.1.0 +pillow==10.2.0 platformdirs==4.1.0 pluggy==1.3.0 -pre-commit==3.5.0 +pre-commit==3.6.0 prometheus-client==0.19.0 -prompt-toolkit==3.0.41 +prompt-toolkit==3.0.43 protobuf==4.23.4 -psutil==5.9.6 +psutil==5.9.7 ptyprocess==0.7.0 pure-eval==0.2.2 py-cpuinfo==9.0.0 pyasn1==0.5.1 pyasn1-modules==0.3.0 pycparser==2.21 -pydata-sphinx-theme==0.14.4 +pydata-sphinx-theme==0.15.1 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.3 +pytest==7.4.4 pytest-benchmark==4.0.0 pytest-cov==4.1.0 pytest-mock==3.12.0 @@ -168,24 +168,24 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.0 +python-lsp-ruff==2.0.2 python-lsp-server==1.9.0 -pytoolconfig==1.2.6 +pytoolconfig==1.3.1 pytz==2023.3.post1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 qtconsole==5.5.1 qtpy==2.4.1 -referencing==0.32.0 +referencing==0.32.1 requests==2.31.0 requests-oauthlib==1.3.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.11.0 -rpds-py==0.13.2 +rpds-py==0.16.2 rsa==4.9 -ruff==0.1.7 +ruff==0.1.13 scipy==1.11.4 send2trash==1.8.2 six==1.16.0 @@ -193,10 +193,10 @@ smmap==5.0.1 sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 -sphinx==6.2.1 -sphinx-api-relink==0.0.6 +sphinx==7.2.6 +sphinx-api-relink==0.0.8 sphinx-autobuild==2021.3.14 -sphinx-book-theme==1.0.1 +sphinx-book-theme==1.1.0 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 @@ -210,7 +210,7 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.6 sphinxcontrib-serializinghtml==1.1.9 sphobjinv==2.3.1 -sqlalchemy==2.0.23 +sqlalchemy==2.0.25 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 @@ -218,26 +218,29 @@ tensorboard==2.15.1 tensorboard-data-server==0.7.2 tensorflow==2.15.0 tensorflow-estimator==2.15.0 -tensorflow-io-gcs-filesystem==0.34.0 +tensorflow-io-gcs-filesystem==0.35.0 tensorflow-probability==0.23.0 termcolor==2.4.0 terminado==0.18.0 tinycss2==1.2.1 tomli==2.0.1 tornado==6.4 -tox==4.11.4 +tox==4.12.0 tqdm==4.66.1 -traitlets==5.14.0 -types-python-dateutil==2.8.19.14 +traitlets==5.14.1 +types-protobuf==4.24.0.20240106 +types-python-dateutil==2.8.19.20240106 types-pyyaml==6.0.12.12 -types-requests==2.31.0.10 -typing-extensions==4.8.0 -tzdata==2023.3 -ujson==5.8.0 +types-requests==2.31.0.20240106 +types-tensorflow==2.12.0.20240106 +types-tqdm==4.66.0.20240106 +typing-extensions==4.9.0 +tzdata==2023.4 +ujson==5.9.0 uri-template==1.3.0 urllib3==2.1.0 virtualenv==20.25.0 -wcwidth==0.2.12 +wcwidth==0.2.13 webcolors==1.13 webencodings==0.5.1 websocket-client==1.7.0 diff --git a/.constraints/py3.11.txt b/.constraints/py3.11.txt index 925935f9..a53e2219 100644 --- a/.constraints/py3.11.txt +++ b/.constraints/py3.11.txt @@ -6,19 +6,19 @@ # absl-py==2.0.0 accessible-pygments==0.0.4 -alabaster==0.7.13 -ampform==0.14.6 -anyio==4.1.0 +alabaster==0.7.16 +ampform==0.14.8 +anyio==4.2.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 asttokens==2.4.1 astunparse==1.6.3 async-lru==2.0.4 -attrs==23.1.0 -babel==2.13.1 +attrs==23.2.0 +babel==2.14.0 beautifulsoup4==4.12.2 -black==23.11.0 +black==23.12.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 @@ -30,67 +30,67 @@ charset-normalizer==3.3.2 click==8.1.7 cloudpickle==3.0.0 colorama==0.4.6 -comm==0.2.0 +comm==0.2.1 contourpy==1.2.0 -coverage==7.3.2 +coverage==7.4.0 cycler==0.12.1 debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 -distlib==0.3.7 +distlib==0.3.8 dm-tree==0.1.8 docstring-to-markdown==0.13 -docutils==0.19 +docutils==0.20.1 execnet==2.0.2 executing==2.0.1 -fastjsonschema==2.19.0 +fastjsonschema==2.19.1 filelock==3.13.1 flatbuffers==23.5.26 -fonttools==4.46.0 +fonttools==4.47.2 fqdn==1.5.1 gast==0.5.4 gitdb==4.0.11 -gitpython==3.1.40 -google-auth==2.25.2 -google-auth-oauthlib==1.1.0 +gitpython==3.1.41 +google-auth==2.26.2 +google-auth-oauthlib==1.2.0 google-pasta==0.2.0 graphviz==0.20.1 -greenlet==3.0.2 +greenlet==3.0.3 grpcio==1.60.0 h5py==3.10.0 -hepunits==2.3.2 +hepunits==2.3.3 identify==2.5.33 idna==3.6 imagesize==1.4.1 iminuit==2.24.0 -importlib-metadata==7.0.0 +importlib-metadata==7.0.1 iniconfig==2.0.0 -ipykernel==6.27.1 +ipykernel==6.28.0 ipympl==0.9.3 -ipython==8.18.1 +ipython==8.20.0 ipython-genutils==0.2.0 ipywidgets==8.1.1 isoduration==20.11.0 -isort==5.12.0 -jax==0.4.21 -jaxlib==0.4.21 +isort==5.13.2 +jax==0.4.23 +jaxlib==0.4.23 jedi==0.19.1 -jinja2==3.1.2 +jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 jsonschema==4.20.0 -jsonschema-specifications==2023.11.2 +jsonschema-specifications==2023.12.1 jupyter==1.0.0 jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-console==6.6.3 -jupyter-core==5.5.0 +jupyter-core==5.7.1 jupyter-events==0.9.0 jupyter-lsp==2.2.1 -jupyter-server==2.12.1 +jupyter-server==2.12.4 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.4.4 -jupyterlab==4.0.9 +jupyter-server-terminals==0.5.1 +jupyterlab==4.0.10 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 jupyterlab-lsp==5.0.1 @@ -103,8 +103,8 @@ kiwisolver==1.4.5 libclang==16.0.6 livereload==2.6.3 llvmlite==0.41.1 -lsprotocol==2023.0.0 -markdown==3.5.1 +lsprotocol==2023.0.1 +markdown==3.5.2 markdown-it-py==3.0.0 markupsafe==2.1.3 matplotlib==3.8.2 @@ -114,12 +114,12 @@ mdurl==0.1.2 mistune==3.0.2 ml-dtypes==0.2.0 mpmath==1.3.0 -mypy==1.7.1 +mypy==1.8.0 mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==2.0.0 nbclient==0.6.8 -nbconvert==7.12.0 +nbconvert==7.14.1 nbdime==4.0.1 nbformat==5.9.2 nbmake==1.4.6 @@ -128,7 +128,7 @@ nodeenv==1.8.0 notebook==7.0.6 notebook-shim==0.2.3 numba==0.58.1 -numpy==1.26.2 +numpy==1.26.3 oauthlib==3.2.2 opt-einsum==3.3.0 overrides==7.4.0 @@ -137,28 +137,28 @@ pandas==2.1.4 pandocfilters==1.5.0 parso==0.8.3 particle==0.23.1 -pathspec==0.11.2 +pathspec==0.12.1 pexpect==4.9.0 phasespace==1.9.0 -pillow==10.1.0 +pillow==10.2.0 platformdirs==4.1.0 pluggy==1.3.0 -pre-commit==3.5.0 +pre-commit==3.6.0 prometheus-client==0.19.0 -prompt-toolkit==3.0.41 +prompt-toolkit==3.0.43 protobuf==4.23.4 -psutil==5.9.6 +psutil==5.9.7 ptyprocess==0.7.0 pure-eval==0.2.2 py-cpuinfo==9.0.0 pyasn1==0.5.1 pyasn1-modules==0.3.0 pycparser==2.21 -pydata-sphinx-theme==0.14.4 +pydata-sphinx-theme==0.15.1 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.3 +pytest==7.4.4 pytest-benchmark==4.0.0 pytest-cov==4.1.0 pytest-mock==3.12.0 @@ -167,24 +167,24 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.0 +python-lsp-ruff==2.0.2 python-lsp-server==1.9.0 -pytoolconfig==1.2.6 +pytoolconfig==1.3.1 pytz==2023.3.post1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 qtconsole==5.5.1 qtpy==2.4.1 -referencing==0.32.0 +referencing==0.32.1 requests==2.31.0 requests-oauthlib==1.3.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.11.0 -rpds-py==0.13.2 +rpds-py==0.16.2 rsa==4.9 -ruff==0.1.7 +ruff==0.1.13 scipy==1.11.4 send2trash==1.8.2 six==1.16.0 @@ -192,10 +192,10 @@ smmap==5.0.1 sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 -sphinx==6.2.1 -sphinx-api-relink==0.0.6 +sphinx==7.2.6 +sphinx-api-relink==0.0.8 sphinx-autobuild==2021.3.14 -sphinx-book-theme==1.0.1 +sphinx-book-theme==1.1.0 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 @@ -209,7 +209,7 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.6 sphinxcontrib-serializinghtml==1.1.9 sphobjinv==2.3.1 -sqlalchemy==2.0.23 +sqlalchemy==2.0.25 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 @@ -217,25 +217,28 @@ tensorboard==2.15.1 tensorboard-data-server==0.7.2 tensorflow==2.15.0 tensorflow-estimator==2.15.0 -tensorflow-io-gcs-filesystem==0.34.0 +tensorflow-io-gcs-filesystem==0.35.0 tensorflow-probability==0.23.0 termcolor==2.4.0 terminado==0.18.0 tinycss2==1.2.1 tornado==6.4 -tox==4.11.4 +tox==4.12.0 tqdm==4.66.1 -traitlets==5.14.0 -types-python-dateutil==2.8.19.14 +traitlets==5.14.1 +types-protobuf==4.24.0.20240106 +types-python-dateutil==2.8.19.20240106 types-pyyaml==6.0.12.12 -types-requests==2.31.0.10 -typing-extensions==4.8.0 -tzdata==2023.3 -ujson==5.8.0 +types-requests==2.31.0.20240106 +types-tensorflow==2.12.0.20240106 +types-tqdm==4.66.0.20240106 +typing-extensions==4.9.0 +tzdata==2023.4 +ujson==5.9.0 uri-template==1.3.0 urllib3==2.1.0 virtualenv==20.25.0 -wcwidth==0.2.12 +wcwidth==0.2.13 webcolors==1.13 webencodings==0.5.1 websocket-client==1.7.0 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index e61ea915..3183348d 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -7,19 +7,19 @@ absl-py==2.0.0 accessible-pygments==0.0.4 alabaster==0.7.13 -ampform==0.14.6 -anyio==4.1.0 +ampform==0.14.8 +anyio==4.2.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 asttokens==2.4.1 astunparse==1.6.3 async-lru==2.0.4 -attrs==23.1.0 -babel==2.13.1 +attrs==23.2.0 +babel==2.14.0 backcall==0.2.0 beautifulsoup4==4.12.2 -black==23.11.0 +black==23.12.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 @@ -31,69 +31,69 @@ charset-normalizer==3.3.2 click==8.1.7 cloudpickle==3.0.0 colorama==0.4.6 -comm==0.2.0 +comm==0.2.1 contourpy==1.1.1 -coverage==7.3.2 +coverage==7.4.0 cycler==0.12.1 debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 -distlib==0.3.7 +distlib==0.3.8 dm-tree==0.1.8 docstring-to-markdown==0.13 docutils==0.19 exceptiongroup==1.2.0 execnet==2.0.2 executing==2.0.1 -fastjsonschema==2.19.0 +fastjsonschema==2.19.1 filelock==3.13.1 flatbuffers==23.5.26 -fonttools==4.46.0 +fonttools==4.47.2 fqdn==1.5.1 gast==0.4.0 gitdb==4.0.11 -gitpython==3.1.40 -google-auth==2.25.2 -google-auth-oauthlib==1.0.0 +gitpython==3.1.41 +google-auth==2.26.2 +google-auth-oauthlib==0.4.6 google-pasta==0.2.0 graphviz==0.20.1 -greenlet==3.0.2 +greenlet==3.0.3 grpcio==1.60.0 h5py==3.10.0 -hepunits==2.3.2 +hepunits==2.3.3 identify==2.5.33 idna==3.6 imagesize==1.4.1 iminuit==2.24.0 -importlib-metadata==7.0.0 +importlib-metadata==7.0.1 importlib-resources==6.1.1 iniconfig==2.0.0 -ipykernel==6.27.1 +ipykernel==6.28.0 ipympl==0.9.3 ipython==8.12.3 ipython-genutils==0.2.0 ipywidgets==8.1.1 isoduration==20.11.0 -isort==5.12.0 +isort==5.13.2 jax==0.4.13 jaxlib==0.4.13 jedi==0.19.1 -jinja2==3.1.2 +jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 jsonschema==4.20.0 -jsonschema-specifications==2023.11.2 +jsonschema-specifications==2023.12.1 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-core==5.7.1 jupyter-events==0.9.0 jupyter-lsp==2.2.1 -jupyter-server==2.12.1 +jupyter-server==2.12.4 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.4.4 -jupyterlab==4.0.9 +jupyter-server-terminals==0.5.1 +jupyterlab==4.0.10 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 jupyterlab-lsp==5.0.1 @@ -101,13 +101,13 @@ jupyterlab-myst==2.1.0 jupyterlab-pygments==0.3.0 jupyterlab-server==2.25.2 jupyterlab-widgets==3.0.9 -keras==2.13.1 +keras==2.11.0 kiwisolver==1.4.5 libclang==16.0.6 livereload==2.6.3 llvmlite==0.41.1 -lsprotocol==2023.0.0 -markdown==3.5.1 +lsprotocol==2023.0.1 +markdown==3.5.2 markdown-it-py==2.2.0 markupsafe==2.1.3 matplotlib==3.7.4 @@ -117,12 +117,12 @@ mdurl==0.1.2 mistune==3.0.2 ml-dtypes==0.2.0 mpmath==1.3.0 -mypy==1.7.1 +mypy==1.8.0 mypy-extensions==1.0.0 myst-nb==0.17.2 myst-parser==0.18.1 nbclient==0.6.8 -nbconvert==7.12.0 +nbconvert==7.14.1 nbdime==4.0.1 nbformat==5.9.2 nbmake==1.4.6 @@ -131,7 +131,7 @@ nodeenv==1.8.0 notebook==7.0.6 notebook-shim==0.2.3 numba==0.58.1 -numpy==1.24.3 +numpy==1.24.4 oauthlib==3.2.2 opt-einsum==3.3.0 overrides==7.4.0 @@ -140,19 +140,19 @@ pandas==2.0.3 pandocfilters==1.5.0 parso==0.8.3 particle==0.23.1 -pathspec==0.11.2 +pathspec==0.12.1 pexpect==4.9.0 phasespace==1.9.0 pickleshare==0.7.5 -pillow==10.1.0 +pillow==10.2.0 pkgutil-resolve-name==1.3.10 platformdirs==4.1.0 pluggy==1.3.0 pre-commit==3.5.0 prometheus-client==0.19.0 -prompt-toolkit==3.0.41 -protobuf==4.25.1 -psutil==5.9.6 +prompt-toolkit==3.0.43 +protobuf==3.19.6 +psutil==5.9.7 ptyprocess==0.7.0 pure-eval==0.2.2 py-cpuinfo==9.0.0 @@ -163,7 +163,7 @@ pydata-sphinx-theme==0.14.4 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.3 +pytest==7.4.4 pytest-benchmark==4.0.0 pytest-cov==4.1.0 pytest-mock==3.12.0 @@ -172,24 +172,24 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.0 +python-lsp-ruff==2.0.2 python-lsp-server==1.9.0 -pytoolconfig==1.2.6 +pytoolconfig==1.3.1 pytz==2023.3.post1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 qtconsole==5.5.1 qtpy==2.4.1 -referencing==0.32.0 +referencing==0.32.1 requests==2.31.0 requests-oauthlib==1.3.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.11.0 -rpds-py==0.13.2 +rpds-py==0.16.2 rsa==4.9 -ruff==0.1.7 +ruff==0.1.13 scipy==1.10.1 send2trash==1.8.2 six==1.16.0 @@ -198,7 +198,7 @@ sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 sphinx==5.3.0 -sphinx-api-relink==0.0.6 +sphinx-api-relink==0.0.8 sphinx-autobuild==2021.3.14 sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 @@ -214,34 +214,38 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 sphobjinv==2.3.1 -sqlalchemy==2.0.23 +sqlalchemy==2.0.25 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 -tensorboard==2.13.0 -tensorboard-data-server==0.7.2 -tensorflow==2.13.1 -tensorflow-estimator==2.13.0 +tensorboard==2.11.2 +tensorboard-data-server==0.6.1 +tensorboard-plugin-wit==1.8.1 +tensorflow==2.11.1 +tensorflow-estimator==2.11.0 tensorflow-io-gcs-filesystem==0.34.0 -tensorflow-probability==0.21.0 +tensorflow-probability==0.20.1 termcolor==2.4.0 terminado==0.18.0 tinycss2==1.2.1 tomli==2.0.1 tornado==6.4 -tox==4.11.4 +tox==4.12.0 tqdm==4.66.1 -traitlets==5.14.0 -types-python-dateutil==2.8.19.14 +traitlets==5.14.1 +types-protobuf==4.24.0.20240106 +types-python-dateutil==2.8.19.20240106 types-pyyaml==6.0.12.12 -types-requests==2.31.0.10 -typing-extensions==4.5.0 -tzdata==2023.3 -ujson==5.8.0 +types-requests==2.31.0.20240106 +types-tensorflow==2.12.0.20240106 +types-tqdm==4.66.0.20240106 +typing-extensions==4.9.0 +tzdata==2023.4 +ujson==5.9.0 uri-template==1.3.0 urllib3==2.1.0 virtualenv==20.25.0 -wcwidth==0.2.12 +wcwidth==0.2.13 webcolors==1.13 webencodings==0.5.1 websocket-client==1.7.0 diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index 748a2990..e84b422b 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -6,19 +6,19 @@ # absl-py==2.0.0 accessible-pygments==0.0.4 -alabaster==0.7.13 -ampform==0.14.6 -anyio==4.1.0 +alabaster==0.7.16 +ampform==0.14.8 +anyio==4.2.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 asttokens==2.4.1 astunparse==1.6.3 async-lru==2.0.4 -attrs==23.1.0 -babel==2.13.1 +attrs==23.2.0 +babel==2.14.0 beautifulsoup4==4.12.2 -black==23.11.0 +black==23.12.1 bleach==6.1.0 cachetools==5.3.2 cattrs==23.2.3 @@ -30,69 +30,69 @@ charset-normalizer==3.3.2 click==8.1.7 cloudpickle==3.0.0 colorama==0.4.6 -comm==0.2.0 +comm==0.2.1 contourpy==1.2.0 -coverage==7.3.2 +coverage==7.4.0 cycler==0.12.1 debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 -distlib==0.3.7 +distlib==0.3.8 dm-tree==0.1.8 docstring-to-markdown==0.13 -docutils==0.19 +docutils==0.20.1 exceptiongroup==1.2.0 execnet==2.0.2 executing==2.0.1 -fastjsonschema==2.19.0 +fastjsonschema==2.19.1 filelock==3.13.1 flatbuffers==23.5.26 -fonttools==4.46.0 +fonttools==4.47.2 fqdn==1.5.1 gast==0.5.4 gitdb==4.0.11 -gitpython==3.1.40 -google-auth==2.25.2 -google-auth-oauthlib==1.1.0 +gitpython==3.1.41 +google-auth==2.26.2 +google-auth-oauthlib==1.2.0 google-pasta==0.2.0 graphviz==0.20.1 -greenlet==3.0.2 +greenlet==3.0.3 grpcio==1.60.0 h5py==3.10.0 -hepunits==2.3.2 +hepunits==2.3.3 identify==2.5.33 idna==3.6 imagesize==1.4.1 iminuit==2.24.0 -importlib-metadata==7.0.0 +importlib-metadata==7.0.1 importlib-resources==6.1.1 iniconfig==2.0.0 -ipykernel==6.27.1 +ipykernel==6.28.0 ipympl==0.9.3 ipython==8.18.1 ipython-genutils==0.2.0 ipywidgets==8.1.1 isoduration==20.11.0 -isort==5.12.0 -jax==0.4.21 -jaxlib==0.4.21 +isort==5.13.2 +jax==0.4.23 +jaxlib==0.4.23 jedi==0.19.1 -jinja2==3.1.2 +jinja2==3.1.3 json5==0.9.14 jsonpointer==2.4 jsonschema==4.20.0 -jsonschema-specifications==2023.11.2 +jsonschema-specifications==2023.12.1 jupyter==1.0.0 jupyter-cache==1.0.0 jupyter-client==8.6.0 jupyter-console==6.6.3 -jupyter-core==5.5.0 +jupyter-core==5.7.1 jupyter-events==0.9.0 jupyter-lsp==2.2.1 -jupyter-server==2.12.1 +jupyter-server==2.12.4 jupyter-server-mathjax==0.2.6 -jupyter-server-terminals==0.4.4 -jupyterlab==4.0.9 +jupyter-server-terminals==0.5.1 +jupyterlab==4.0.10 jupyterlab-code-formatter==2.2.1 jupyterlab-git==0.50.0 jupyterlab-lsp==5.0.1 @@ -105,8 +105,8 @@ kiwisolver==1.4.5 libclang==16.0.6 livereload==2.6.3 llvmlite==0.41.1 -lsprotocol==2023.0.0 -markdown==3.5.1 +lsprotocol==2023.0.1 +markdown==3.5.2 markdown-it-py==3.0.0 markupsafe==2.1.3 matplotlib==3.8.2 @@ -116,12 +116,12 @@ mdurl==0.1.2 mistune==3.0.2 ml-dtypes==0.2.0 mpmath==1.3.0 -mypy==1.7.1 +mypy==1.8.0 mypy-extensions==1.0.0 myst-nb==1.0.0 myst-parser==2.0.0 nbclient==0.6.8 -nbconvert==7.12.0 +nbconvert==7.14.1 nbdime==4.0.1 nbformat==5.9.2 nbmake==1.4.6 @@ -130,7 +130,7 @@ nodeenv==1.8.0 notebook==7.0.6 notebook-shim==0.2.3 numba==0.58.1 -numpy==1.26.2 +numpy==1.26.3 oauthlib==3.2.2 opt-einsum==3.3.0 overrides==7.4.0 @@ -139,28 +139,28 @@ pandas==2.1.4 pandocfilters==1.5.0 parso==0.8.3 particle==0.23.1 -pathspec==0.11.2 +pathspec==0.12.1 pexpect==4.9.0 phasespace==1.9.0 -pillow==10.1.0 +pillow==10.2.0 platformdirs==4.1.0 pluggy==1.3.0 -pre-commit==3.5.0 +pre-commit==3.6.0 prometheus-client==0.19.0 -prompt-toolkit==3.0.41 +prompt-toolkit==3.0.43 protobuf==4.23.4 -psutil==5.9.6 +psutil==5.9.7 ptyprocess==0.7.0 pure-eval==0.2.2 py-cpuinfo==9.0.0 pyasn1==0.5.1 pyasn1-modules==0.3.0 pycparser==2.21 -pydata-sphinx-theme==0.14.4 +pydata-sphinx-theme==0.15.1 pygments==2.17.2 pyparsing==3.1.1 pyproject-api==1.6.1 -pytest==7.4.3 +pytest==7.4.4 pytest-benchmark==4.0.0 pytest-cov==4.1.0 pytest-mock==3.12.0 @@ -169,24 +169,24 @@ python-constraint==1.4.0 python-dateutil==2.8.2 python-json-logger==2.0.7 python-lsp-jsonrpc==1.1.2 -python-lsp-ruff==2.0.0 +python-lsp-ruff==2.0.2 python-lsp-server==1.9.0 -pytoolconfig==1.2.6 +pytoolconfig==1.3.1 pytz==2023.3.post1 pyyaml==6.0.1 pyzmq==25.1.2 qrules==0.9.8 qtconsole==5.5.1 qtpy==2.4.1 -referencing==0.32.0 +referencing==0.32.1 requests==2.31.0 requests-oauthlib==1.3.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.11.0 -rpds-py==0.13.2 +rpds-py==0.16.2 rsa==4.9 -ruff==0.1.7 +ruff==0.1.13 scipy==1.11.4 send2trash==1.8.2 six==1.16.0 @@ -194,10 +194,10 @@ smmap==5.0.1 sniffio==1.3.0 snowballstemmer==2.2.0 soupsieve==2.5 -sphinx==6.2.1 -sphinx-api-relink==0.0.6 +sphinx==7.2.6 +sphinx-api-relink==0.0.8 sphinx-autobuild==2021.3.14 -sphinx-book-theme==1.0.1 +sphinx-book-theme==1.1.0 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 @@ -211,7 +211,7 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.6 sphinxcontrib-serializinghtml==1.1.9 sphobjinv==2.3.1 -sqlalchemy==2.0.23 +sqlalchemy==2.0.25 stack-data==0.6.3 sympy==1.12 tabulate==0.9.0 @@ -219,26 +219,29 @@ tensorboard==2.15.1 tensorboard-data-server==0.7.2 tensorflow==2.15.0 tensorflow-estimator==2.15.0 -tensorflow-io-gcs-filesystem==0.34.0 +tensorflow-io-gcs-filesystem==0.35.0 tensorflow-probability==0.23.0 termcolor==2.4.0 terminado==0.18.0 tinycss2==1.2.1 tomli==2.0.1 tornado==6.4 -tox==4.11.4 +tox==4.12.0 tqdm==4.66.1 -traitlets==5.14.0 -types-python-dateutil==2.8.19.14 +traitlets==5.14.1 +types-protobuf==4.24.0.20240106 +types-python-dateutil==2.8.19.20240106 types-pyyaml==6.0.12.12 -types-requests==2.31.0.10 -typing-extensions==4.8.0 -tzdata==2023.3 -ujson==5.8.0 +types-requests==2.31.0.20240106 +types-tensorflow==2.12.0.20240106 +types-tqdm==4.66.0.20240106 +typing-extensions==4.9.0 +tzdata==2023.4 +ujson==5.9.0 uri-template==1.3.0 urllib3==2.1.0 virtualenv==20.25.0 -wcwidth==0.2.12 +wcwidth==0.2.13 webcolors==1.13 webencodings==0.5.1 websocket-client==1.7.0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa6eb5af..c0615dfa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,7 @@ jobs: id-token: write with: apt-packages: graphviz + python-version: "3.10" specific-pip-packages: ${{ inputs.specific-pip-packages }} pytest: uses: ComPWA/actions/.github/workflows/pytest.yml@v1 @@ -47,3 +48,5 @@ jobs: secrets: token: ${{ secrets.PAT }} uses: ComPWA/actions/.github/workflows/pre-commit.yml@v1 + with: + python-version: "3.10" diff --git a/.github/workflows/requirements.yml b/.github/workflows/requirements.yml index feea6420..32b95f19 100644 --- a/.github/workflows/requirements.yml +++ b/.github/workflows/requirements.yml @@ -12,7 +12,6 @@ on: paths: - .constraints/py3.*.txt - .pre-commit-config.yaml - - setup.cfg schedule: - cron: "0 3 7 */1 *" workflow_dispatch: diff --git a/.gitpod.yml b/.gitpod.yml index 7945c72f..17bad74a 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,6 +1,6 @@ tasks: - - init: pyenv local 3.8 - - init: pip install -c .constraints/py3.8.txt -e .[dev] + - init: pyenv local 3.10 + - init: pip install -c .constraints/py3.10.txt -e .[dev] github: prebuilds: @@ -20,7 +20,6 @@ vscode: - editorconfig.editorconfig - esbenp.prettier-vscode - executablebookproject.myst-highlight - - garaioag.garaio-vscode-unwanted-recommendations - github.vscode-github-actions - github.vscode-pull-request-github - ms-python.black-formatter @@ -31,6 +30,7 @@ vscode: - ms-vsliveshare.vsliveshare - redhat.vscode-yaml - ryanluker.vscode-coverage-gutters + - Soulcode.vscode-unwanted-extensions - stkb.rewrap - streetsidesoftware.code-spell-checker - tamasfe.even-better-toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 63a6fddc..65d7f9e2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,12 +14,13 @@ repos: - id: check-hooks-apply - id: check-useless-excludes - - repo: https://github.com/ComPWA/repo-maintenance - rev: 0.1.9 + - repo: https://github.com/ComPWA/policy + rev: 0.2.0 hooks: - id: check-dev-files args: - --ci-test-extras=all + - --dev-python-version=3.10 - --doc-apt-packages=graphviz - --no-prettierrc - --pin-requirements=monthly @@ -61,7 +62,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.11.0 + rev: 23.12.1 hooks: - id: black - id: black-jupyter @@ -87,7 +88,7 @@ repos: pass_filenames: false - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v8.1.1 + rev: v8.3.0 hooks: - id: cspell @@ -138,17 +139,17 @@ repos: metadata.vscode - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.3-1 + rev: v4.0.0-alpha.8 hooks: - id: prettier - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.339 + rev: v1.1.345 hooks: - id: pyright - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.7 + rev: v0.1.13 hooks: - id: ruff args: [--fix] diff --git a/.readthedocs.yml b/.readthedocs.yml index f34ae963..2bda1f49 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -11,9 +11,9 @@ formats: build: os: ubuntu-22.04 tools: - python: "3.8" + python: "3.10" apt_packages: - graphviz jobs: post_install: - - pip install -c .constraints/py3.8.txt -e .[doc] + - pip install -c .constraints/py3.10.txt -e .[doc] diff --git a/.vscode/extensions.json b/.vscode/extensions.json index bdeb608f..a90a5fa2 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -6,7 +6,6 @@ "editorconfig.editorconfig", "esbenp.prettier-vscode", "executablebookproject.myst-highlight", - "garaioag.garaio-vscode-unwanted-recommendations", "github.vscode-github-actions", "github.vscode-pull-request-github", "ms-python.black-formatter", @@ -17,6 +16,7 @@ "ms-vsliveshare.vsliveshare", "redhat.vscode-yaml", "ryanluker.vscode-coverage-gutters", + "Soulcode.vscode-unwanted-extensions", "stkb.rewrap", "streetsidesoftware.code-spell-checker", "tamasfe.even-better-toml", @@ -26,6 +26,7 @@ "unwantedRecommendations": [ "bungcip.better-toml", "davidanson.vscode-markdownlint", + "garaioag.garaio-vscode-unwanted-recommendations", "ms-python.flake8", "ms-python.isort", "ms-python.pylint", diff --git a/docs/usage.ipynb b/docs/usage.ipynb index a51dc013..1186e491 100644 --- a/docs/usage.ipynb +++ b/docs/usage.ipynb @@ -806,9 +806,9 @@ ")\n", "def plot(dphi, k_r, k_phi, sigma):\n", " global color_mesh, X, Y\n", - " polar_function.update_parameters({\n", - " R\"\\Delta\\phi\": dphi, \"k_r\": k_r, \"k_phi\": k_phi, \"sigma\": sigma\n", - " })\n", + " polar_function.update_parameters(\n", + " {R\"\\Delta\\phi\": dphi, \"k_r\": k_r, \"k_phi\": k_phi, \"sigma\": sigma}\n", + " )\n", " Z = polar_function(polar_domain)\n", " if color_mesh is not None:\n", " color_mesh.remove()\n", diff --git a/docs/usage/basics.ipynb b/docs/usage/basics.ipynb index af3f37c8..edf7cc0f 100644 --- a/docs/usage/basics.ipynb +++ b/docs/usage/basics.ipynb @@ -1286,10 +1286,10 @@ "fig.suptitle(\"Evolution of the parameter values during the fit\")\n", "ax1.set_title(\"Minuit2\")\n", "ax2.set_title(\"Scipy (Nelder-Mead)\")\n", - "ax1.get_shared_x_axes().join(ax1, ax3)\n", - "ax2.get_shared_x_axes().join(ax2, ax4)\n", - "ax1.get_shared_y_axes().join(ax1, ax2)\n", - "ax3.get_shared_y_axes().join(ax3, ax4)\n", + "ax1.sharex(ax3)\n", + "ax2.sharex(ax4)\n", + "ax1.sharey(ax2)\n", + "ax3.sharey(ax4)\n", "ax2.set_ylim(\n", " 1.02 * scipy_traceback[\"estimator_value\"].min(),\n", " 0.98 * scipy_traceback[\"estimator_value\"].max(),\n", diff --git a/docs/usage/unbinned-fit.ipynb b/docs/usage/unbinned-fit.ipynb index 31e4e245..35eb9c4a 100644 --- a/docs/usage/unbinned-fit.ipynb +++ b/docs/usage/unbinned-fit.ipynb @@ -128,8 +128,8 @@ "empty.remove()\n", "ax2d.set_xlabel(\"$x$\")\n", "ax2d.set_ylabel(\"$y$\")\n", - "ax2d.get_shared_x_axes().join(ax2d, ax_x)\n", - "ax2d.get_shared_y_axes().join(ax2d, ax_y)\n", + "ax2d.sharex(ax_x)\n", + "ax2d.sharey(ax_y)\n", "for ax in [ax_x, ax_y]:\n", " ax.set_xticks([])\n", " ax.set_yticks([])\n", diff --git a/environment.yml b/environment.yml index 65cec60b..ea2105ca 100644 --- a/environment.yml +++ b/environment.yml @@ -2,11 +2,11 @@ name: tensorwaves channels: - defaults dependencies: - - python==3.8.* + - python==3.10.* - pip>=19 - graphviz # for binder - pip: - - -c .constraints/py3.8.txt -e .[dev] + - -c .constraints/py3.10.txt -e .[dev] variables: PRETTIER_LEGACY_CLI: "1" PYTHONHASHSEED: 0 diff --git a/pyproject.toml b/pyproject.toml index a7292b58..8fc469ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -159,6 +159,7 @@ test-types = [ tf = [ "tensorflow !=2.15.0.post1", # https://github.com/ComPWA/tensorwaves/actions/runs/7147814088/job/19467965144?pr=509 "tensorflow >=2.4", # tensorflow.experimental.numpy + 'tensorflow <2.12; python_version <"3.9.0"', ] viz = [ "graphviz", @@ -282,6 +283,7 @@ reportUnusedVariable = true typeCheckingMode = "strict" [tool.pytest.ini_options] +addopts = ["--color=yes"] filterwarnings = [ "error", "ignore: `np.bool8` is a deprecated alias for `np.bool_`.*:DeprecationWarning", @@ -406,7 +408,10 @@ task-tags = ["cspell"] "S113", "T201", ] -"docs/conf.py" = ["A001"] +"docs/conf.py" = [ + "A001", + "D100", +] "setup.py" = ["D100"] "tests/*" = [ "D", diff --git a/src/tensorwaves/function/sympy/_printer.py b/src/tensorwaves/function/sympy/_printer.py index 228abe70..c2ced124 100644 --- a/src/tensorwaves/function/sympy/_printer.py +++ b/src/tensorwaves/function/sympy/_printer.py @@ -81,5 +81,6 @@ class TensorflowPrinter(CustomNumPyPrinter): def __init__(self) -> None: # https://github.com/sympy/sympy/blob/f1384c2/sympy/printing/printer.py#L21-L72 super().__init__() + self.known_functions["ArraySize"] = "len" self.known_functions["ComplexSqrt"] = "sqrt" self.printmethod = "_tensorflow_code"