From 2da7069b3bfed0bfc5d56ecce9ee052eb769f3b8 Mon Sep 17 00:00:00 2001 From: Remco de Boer Date: Thu, 2 Dec 2021 19:08:59 +0100 Subject: [PATCH] ci: run notebooks with nbmake (#91) * ci: rename tox testnb job to nb * ci: switch to nbmake * ci: update pip constraints and pre-commit config * ci: update workflow configs with repo-maintenance * fix: remove ipykernel version constraint * fix: remove version limit on pyparsing Co-authored-by: GitHub --- .constraints/py3.6.txt | 18 +++++----- .constraints/py3.7.txt | 26 +++++++------- .constraints/py3.8.txt | 26 +++++++------- .constraints/py3.9.txt | 27 +++++++------- .cspell.json | 6 ++++ .github/workflows/cd.yml | 42 +++++++++++++++++++--- .github/workflows/ci-docs.yml | 10 +++--- .github/workflows/ci-tests.yml | 4 +-- .github/workflows/requirements-pr.yml | 51 ++++++++++++++++----------- .pre-commit-config.yaml | 6 ++-- docs/develop.md | 2 -- pytest.ini | 7 +--- setup.cfg | 9 ++--- tox.ini | 4 +-- 14 files changed, 142 insertions(+), 96 deletions(-) diff --git a/.constraints/py3.6.txt b/.constraints/py3.6.txt index 7e63b1ff..7df426f9 100644 --- a/.constraints/py3.6.txt +++ b/.constraints/py3.6.txt @@ -14,7 +14,7 @@ argon2-cffi==21.1.0 astroid==2.7.3 astunparse==1.6.3 async-generator==1.10 -attrs==20.3.0 +attrs==21.2.0 babel==2.9.1 backcall==0.2.0 backports.entry-points-selectable==1.1.1 @@ -45,7 +45,7 @@ execnet==1.9.0 filelock==3.4.0 flake8==4.0.1 flake8-blind-except==0.2.0 -flake8-bugbear==21.11.28 +flake8-bugbear==21.11.29 flake8-builtins==1.5.3 flake8-comprehensions==3.7.0 flake8-plugin-utils==1.3.2 @@ -88,7 +88,7 @@ json5==0.9.6 jsonschema==3.2.0 jupyter==1.0.0 jupyter-cache==0.4.3 -jupyter-client==6.1.12 +jupyter-client==7.1.0 jupyter-console==6.4.0 jupyter-contrib-core==0.3.3 jupyter-contrib-nbextensions==0.5.1 @@ -101,6 +101,7 @@ jupyter-server-mathjax==0.2.3 jupyter-sphinx==0.3.2 jupyterlab==3.2.4 jupyterlab-code-formatter==1.4.10 +jupyterlab-pygments==0.1.2 jupyterlab-server==2.8.2 jupyterlab-widgets==1.0.2 keras==2.6.0 @@ -125,10 +126,11 @@ myst-nb==0.13.1 myst-parser==0.15.2 nbclassic==0.3.4 nbclient==0.5.9 -nbconvert==5.6.1 +nbconvert==6.0.7 nbdime==3.1.1 nbformat==5.1.3 -nest-asyncio==1.5.1 +nbmake==1.0 +nest-asyncio==1.5.4 nodeenv==1.6.0 notebook==6.4.6 numpy==1.19.5 @@ -148,7 +150,7 @@ pillow==8.4.0 pip-tools==6.4.0 platformdirs==2.4.0 pluggy==1.0.0 -pre-commit==2.15.0 +pre-commit==2.16.0 prometheus-client==0.12.0 prompt-toolkit==3.0.23 protobuf==3.19.1 @@ -160,15 +162,15 @@ pybtex==0.24.0 pybtex-docutils==1.0.1 pycodestyle==2.8.0 pycparser==2.21 +pydantic==1.8.2 pydata-sphinx-theme==0.7.2 pyflakes==2.4.0 pygments==2.10.0 pylint==2.10.2 ; python_version == "3.6.*" -pyparsing==2.4.7 +pyparsing==3.0.6 pyrsistent==0.18.0 pytest==6.2.5 pytest-forked==1.3.0 -pytest-notebook==0.6.1 pytest-xdist==2.4.0 python-constraint==1.4.0 python-dateutil==2.8.2 diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index b6dbc87b..a71283fb 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -13,7 +13,7 @@ argcomplete==1.12.3 argon2-cffi==21.1.0 astroid==2.9.0 astunparse==1.6.3 -attrs==20.3.0 +attrs==21.2.0 babel==2.9.1 backcall==0.2.0 backports.entry-points-selectable==1.1.1 @@ -42,7 +42,7 @@ execnet==1.9.0 filelock==3.4.0 flake8==4.0.1 flake8-blind-except==0.2.0 -flake8-bugbear==21.11.28 +flake8-bugbear==21.11.29 flake8-builtins==1.5.3 flake8-comprehensions==3.7.0 flake8-plugin-utils==1.3.2 @@ -71,9 +71,9 @@ iminuit==2.8.4 importlib-metadata==4.2.0 importlib-resources==5.4.0 iniconfig==1.1.1 -ipykernel==6.4.2 +ipykernel==6.6.0 ipympl==0.8.2 -ipython==7.30.0 +ipython==7.30.1 ipython-genutils==0.2.0 ipywidgets==7.6.5 isort==5.10.1 @@ -85,7 +85,7 @@ json5==0.9.6 jsonschema==4.2.1 jupyter==1.0.0 jupyter-cache==0.4.3 -jupyter-client==6.1.12 +jupyter-client==7.1.0 jupyter-console==6.4.0 jupyter-contrib-core==0.3.3 jupyter-contrib-nbextensions==0.5.1 @@ -98,6 +98,7 @@ jupyter-server-mathjax==0.2.3 jupyter-sphinx==0.3.2 jupyterlab==3.2.4 jupyterlab-code-formatter==1.4.10 +jupyterlab-pygments==0.1.2 jupyterlab-server==2.8.2 jupyterlab-widgets==1.0.2 keras==2.7.0 @@ -124,10 +125,11 @@ myst-nb==0.13.1 myst-parser==0.15.2 nbclassic==0.3.4 nbclient==0.5.9 -nbconvert==5.6.1 +nbconvert==6.3.0 nbdime==3.1.1 nbformat==5.1.3 -nest-asyncio==1.5.1 +nbmake==1.0 +nest-asyncio==1.5.4 nodeenv==1.6.0 notebook==6.4.6 numpy==1.20.3 @@ -135,7 +137,7 @@ oauthlib==3.1.1 opt-einsum==3.3.0 packaging==21.3 pandocfilters==1.5.0 -parso==0.8.2 +parso==0.8.3 particle==0.16.2 pathspec==0.9.0 pep517==0.12.0 @@ -147,7 +149,7 @@ pillow==8.4.0 pip-tools==6.4.0 platformdirs==2.4.0 pluggy==1.0.0 -pre-commit==2.15.0 +pre-commit==2.16.0 prometheus-client==0.12.0 prompt-toolkit==3.0.23 protobuf==3.19.1 @@ -159,15 +161,15 @@ pybtex==0.24.0 pybtex-docutils==1.0.1 pycodestyle==2.8.0 pycparser==2.21 +pydantic==1.8.2 pydata-sphinx-theme==0.7.2 pyflakes==2.4.0 pygments==2.10.0 pylint==2.12.1 ; python_version >= "3.7.0" -pyparsing==2.4.7 +pyparsing==3.0.6 pyrsistent==0.18.0 pytest==6.2.5 pytest-forked==1.3.0 -pytest-notebook==0.6.1 pytest-xdist==2.4.0 python-constraint==1.4.0 python-dateutil==2.8.2 @@ -229,7 +231,7 @@ tox==3.24.4 tqdm==4.62.3 traitlets==5.1.1 typed-ast==1.5.0 -typing-extensions==4.0.0 +typing-extensions==4.0.1 urllib3==1.26.7 virtualenv==20.10.0 wcwidth==0.2.5 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index c0383f0f..7840e5f2 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -12,7 +12,7 @@ aquirdturtle-collapsible-headings==3.1.0 argon2-cffi==21.1.0 astroid==2.9.0 astunparse==1.6.3 -attrs==20.3.0 +attrs==21.2.0 babel==2.9.1 backcall==0.2.0 backports.entry-points-selectable==1.1.1 @@ -40,7 +40,7 @@ execnet==1.9.0 filelock==3.4.0 flake8==4.0.1 flake8-blind-except==0.2.0 -flake8-bugbear==21.11.28 +flake8-bugbear==21.11.29 flake8-builtins==1.5.3 flake8-comprehensions==3.7.0 flake8-plugin-utils==1.3.2 @@ -70,9 +70,9 @@ iminuit==2.8.4 importlib-metadata==4.8.2 importlib-resources==5.4.0 iniconfig==1.1.1 -ipykernel==6.4.2 +ipykernel==6.6.0 ipympl==0.8.2 -ipython==7.30.0 +ipython==7.30.1 ipython-genutils==0.2.0 ipywidgets==7.6.5 isort==5.10.1 @@ -84,7 +84,7 @@ json5==0.9.6 jsonschema==4.2.1 jupyter==1.0.0 jupyter-cache==0.4.3 -jupyter-client==6.1.12 +jupyter-client==7.1.0 jupyter-console==6.4.0 jupyter-contrib-core==0.3.3 jupyter-contrib-nbextensions==0.5.1 @@ -97,6 +97,7 @@ jupyter-server-mathjax==0.2.3 jupyter-sphinx==0.3.2 jupyterlab==3.2.4 jupyterlab-code-formatter==1.4.10 +jupyterlab-pygments==0.1.2 jupyterlab-server==2.8.2 jupyterlab-widgets==1.0.2 keras==2.7.0 @@ -123,10 +124,11 @@ myst-nb==0.13.1 myst-parser==0.15.2 nbclassic==0.3.4 nbclient==0.5.9 -nbconvert==5.6.1 +nbconvert==6.3.0 nbdime==3.1.1 nbformat==5.1.3 -nest-asyncio==1.5.1 +nbmake==1.0 +nest-asyncio==1.5.4 nodeenv==1.6.0 notebook==6.4.6 numpy==1.20.3 @@ -134,7 +136,7 @@ oauthlib==3.1.1 opt-einsum==3.3.0 packaging==21.3 pandocfilters==1.5.0 -parso==0.8.2 +parso==0.8.3 particle==0.16.2 pathspec==0.9.0 pep517==0.12.0 @@ -146,7 +148,7 @@ pillow==8.4.0 pip-tools==6.4.0 platformdirs==2.4.0 pluggy==1.0.0 -pre-commit==2.15.0 +pre-commit==2.16.0 prometheus-client==0.12.0 prompt-toolkit==3.0.23 protobuf==3.19.1 @@ -158,15 +160,15 @@ pybtex==0.24.0 pybtex-docutils==1.0.1 pycodestyle==2.8.0 pycparser==2.21 +pydantic==1.8.2 pydata-sphinx-theme==0.7.2 pyflakes==2.4.0 pygments==2.10.0 pylint==2.12.1 ; python_version >= "3.7.0" -pyparsing==2.4.7 +pyparsing==3.0.6 pyrsistent==0.18.0 pytest==6.2.5 pytest-forked==1.3.0 -pytest-notebook==0.6.1 pytest-xdist==2.4.0 python-constraint==1.4.0 python-dateutil==2.8.2 @@ -227,7 +229,7 @@ tornado==6.1 tox==3.24.4 tqdm==4.62.3 traitlets==5.1.1 -typing-extensions==4.0.0 +typing-extensions==4.0.1 urllib3==1.26.7 virtualenv==20.10.0 wcwidth==0.2.5 diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index cb22355e..bf8b38fd 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -12,7 +12,7 @@ aquirdturtle-collapsible-headings==3.1.0 argon2-cffi==21.1.0 astroid==2.9.0 astunparse==1.6.3 -attrs==20.3.0 +attrs==21.2.0 babel==2.9.1 backcall==0.2.0 backports.entry-points-selectable==1.1.1 @@ -40,7 +40,7 @@ execnet==1.9.0 filelock==3.4.0 flake8==4.0.1 flake8-blind-except==0.2.0 -flake8-bugbear==21.11.28 +flake8-bugbear==21.11.29 flake8-builtins==1.5.3 flake8-comprehensions==3.7.0 flake8-plugin-utils==1.3.2 @@ -68,11 +68,10 @@ idna==3.3 imagesize==1.3.0 iminuit==2.8.4 importlib-metadata==4.8.2 -importlib-resources==5.4.0 iniconfig==1.1.1 -ipykernel==6.4.2 +ipykernel==6.6.0 ipympl==0.8.2 -ipython==7.30.0 +ipython==7.30.1 ipython-genutils==0.2.0 ipywidgets==7.6.5 isort==5.10.1 @@ -84,7 +83,7 @@ json5==0.9.6 jsonschema==4.2.1 jupyter==1.0.0 jupyter-cache==0.4.3 -jupyter-client==6.1.12 +jupyter-client==7.1.0 jupyter-console==6.4.0 jupyter-contrib-core==0.3.3 jupyter-contrib-nbextensions==0.5.1 @@ -97,6 +96,7 @@ jupyter-server-mathjax==0.2.3 jupyter-sphinx==0.3.2 jupyterlab==3.2.4 jupyterlab-code-formatter==1.4.10 +jupyterlab-pygments==0.1.2 jupyterlab-server==2.8.2 jupyterlab-widgets==1.0.2 keras==2.7.0 @@ -123,10 +123,11 @@ myst-nb==0.13.1 myst-parser==0.15.2 nbclassic==0.3.4 nbclient==0.5.9 -nbconvert==5.6.1 +nbconvert==6.3.0 nbdime==3.1.1 nbformat==5.1.3 -nest-asyncio==1.5.1 +nbmake==1.0 +nest-asyncio==1.5.4 nodeenv==1.6.0 notebook==6.4.6 numpy==1.20.3 @@ -134,7 +135,7 @@ oauthlib==3.1.1 opt-einsum==3.3.0 packaging==21.3 pandocfilters==1.5.0 -parso==0.8.2 +parso==0.8.3 particle==0.16.2 pathspec==0.9.0 pep517==0.12.0 @@ -146,7 +147,7 @@ pillow==8.4.0 pip-tools==6.4.0 platformdirs==2.4.0 pluggy==1.0.0 -pre-commit==2.15.0 +pre-commit==2.16.0 prometheus-client==0.12.0 prompt-toolkit==3.0.23 protobuf==3.19.1 @@ -158,15 +159,15 @@ pybtex==0.24.0 pybtex-docutils==1.0.1 pycodestyle==2.8.0 pycparser==2.21 +pydantic==1.8.2 pydata-sphinx-theme==0.7.2 pyflakes==2.4.0 pygments==2.10.0 pylint==2.12.1 ; python_version >= "3.7.0" -pyparsing==2.4.7 +pyparsing==3.0.6 pyrsistent==0.18.0 pytest==6.2.5 pytest-forked==1.3.0 -pytest-notebook==0.6.1 pytest-xdist==2.4.0 python-constraint==1.4.0 python-dateutil==2.8.2 @@ -227,7 +228,7 @@ tornado==6.1 tox==3.24.4 tqdm==4.62.3 traitlets==5.1.1 -typing-extensions==4.0.0 +typing-extensions==4.0.1 urllib3==1.26.7 virtualenv==20.10.0 wcwidth==0.2.5 diff --git a/.cspell.json b/.cspell.json index 30a6e3a4..76a85aa8 100644 --- a/.cspell.json +++ b/.cspell.json @@ -109,6 +109,7 @@ "axhline", "axvline", "azim", + "bdist", "boldsymbol", "celltoolbar", "clim", @@ -174,6 +175,7 @@ "multiline", "nbconvert", "nbformat", + "nbmake", "ncols", "nonlocal", "noqa", @@ -186,9 +188,11 @@ "phsp", "pmatrix", "preorder", + "prereleased", "py's", "pygments", "pylance", + "pypi", "pyplot", "pyright", "pythoncode", @@ -203,8 +207,10 @@ "rules's", "savefig", "scimath", + "sdist", "seealso", "seterr", + "setuptools", "sharex", "showcode", "showmarkdowntxt", diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 61586ffd..54338422 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,5 +1,3 @@ -# cspell:ignore noreply prereleased - name: CD on: @@ -10,13 +8,47 @@ on: jobs: push: - name: Push to stable branch + name: Push to version branches if: startsWith(github.ref, 'refs/tags') runs-on: ubuntu-20.04 steps: - uses: actions/checkout@master - - name: Push to stable branch + - name: Configure Git credentials run: | git config --global user.name "GitHub Action" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - git push origin HEAD:refs/heads/stable -f + - name: Push to stable branch + run: | + git push origin HEAD:refs/heads/stable + - name: Push to matching minor version branch + env: + TAG: ${{ github.ref_name }} + run: | + re='^([0-9]+)\.([0-9]+)\.[0-9]+' + if [[ $TAG =~ $re ]]; then + MINOR_VERSION_BRANCH="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.x" + git push origin HEAD:refs/heads/$MINOR_VERSION_BRANCH + fi + + pypi: + name: Publish to PyPI + if: startsWith(github.ref, 'refs/tags') + needs: push + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.8" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index 7a3910ff..3bb3f085 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -31,11 +31,6 @@ jobs: EXECUTE_NB: YES GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: make html - - uses: actions/upload-artifact@v2 - if: ${{ always() }} - with: - name: html - path: docs/_build/html - name: Print error logs with color if: ${{ failure() }} # cspell:ignore printf @@ -48,3 +43,8 @@ jobs: echo cat "$log_file" done + - uses: actions/upload-artifact@v2 + if: ${{ always() }} + with: + name: html + path: docs/_build/html diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index b5b05b05..b59b2a67 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -41,7 +41,7 @@ jobs: sudo apt-get -y install graphviz - name: Run notebooks with pytest (diff only) if: steps.git-diff.outputs.modified-notebooks != '' - run: pytest ${{join(steps.git-diff.outputs.*, '\n')}} + run: pytest --nbmake ${{join(steps.git-diff.outputs.*, '\n')}} pytest-demos: name: Test demo notebooks @@ -62,4 +62,4 @@ jobs: pip install -c .constraints/py3.7.txt .[test] sudo apt-get -y install graphviz - name: Run demo notebooks - run: pytest demo + run: pytest --nbmake demo diff --git a/.github/workflows/requirements-pr.yml b/.github/workflows/requirements-pr.yml index f768ea7c..ba72e003 100644 --- a/.github/workflows/requirements-pr.yml +++ b/.github/workflows/requirements-pr.yml @@ -7,8 +7,30 @@ on: - epic/* jobs: + diff: + name: Check dependency changes + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Determine dependency changes + run: | + DIFF="$(git diff origin/main --color -- .constraints .pre-commit-config.yaml setup.cfg)" + echo ::set-output name=diff::"${DIFF}" + id: diff + outputs: + diff: ${{ steps.diff.outputs.diff }} + pip-constraints: - name: Update pip constraints files + name: Update pip constraints + needs: diff + if: > + github.event.pull_request.head.repo.full_name == github.repository && + needs.diff.outputs.diff != '' + # Only run if PR does not come from a fork + # https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -20,40 +42,29 @@ jobs: - "3.9" steps: - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Check if there are dependency changes - run: | - DIFF="$(git diff origin/main --color -- .constraints setup.cfg)" - echo ::set-output name=diff::"${DIFF}" - id: diff - uses: ComPWA/update-pip-constraints@main - if: steps.diff.outputs.diff != '' with: python-version: ${{ matrix.python-version }} pre-commit: name: pre-commit autoupdate + needs: diff + if: > + github.event.pull_request.head.repo.full_name == github.repository && + needs.diff.outputs.diff != '' runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Check if there are changes to pre-commit config - run: | - DIFF="$(git diff origin/main --color -- .pre-commit-config.yaml)" - echo ::set-output name=diff::"${DIFF}" - id: diff - uses: ComPWA/update-pre-commit@main - if: steps.diff.outputs.diff != '' push: name: Push changes - if: github.event.pull_request.head.repo.full_name == github.repository - # Only run if PR does not come from a fork - # https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow + if: > + github.event.pull_request.head.repo.full_name == github.repository && + needs.diff.outputs.diff != '' runs-on: ubuntu-20.04 needs: + - diff - pip-constraints - pre-commit steps: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 56a8322e..395168f9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,7 +42,7 @@ repos: )$ - repo: https://github.com/ComPWA/repo-maintenance - rev: 0.0.88 + rev: 0.0.92 hooks: - id: check-dev-files args: @@ -69,7 +69,7 @@ repos: - id: blacken-docs - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v5.6.10 + rev: v5.6.11 hooks: - id: cspell @@ -126,7 +126,7 @@ repos: - id: prettier - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.190 + rev: v1.1.191 hooks: - id: pyright diff --git a/docs/develop.md b/docs/develop.md index 56703e2f..b945e0ed 100644 --- a/docs/develop.md +++ b/docs/develop.md @@ -698,8 +698,6 @@ branch". ### Release flow - - Releases are managed with the [GitHub release page](https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/managing-releases-in-a-repository), see for instance diff --git a/pytest.ini b/pytest.ini index f689f1a0..c21b0b1e 100644 --- a/pytest.ini +++ b/pytest.ini @@ -5,17 +5,12 @@ addopts = --ignore=docs/adr/001/sympy.ipynb --ignore=docs/conf.py --ignore-glob=*/.ipynb_checkpoints/* - --nb-test-files filterwarnings = error ignore:Passing a schema to Validator.iter_errors is deprecated.*:DeprecationWarning ignore:open_text is deprecated.*:DeprecationWarning ignore:read_text is deprecated.*:DeprecationWarning -nb_diff_ignore = - /cells/*/execution_count - /cells/*/outputs - /metadata/language_info - /metadata/widgets + ignore:unclosed .*:ResourceWarning norecursedirs = _build testpaths = diff --git a/setup.cfg b/setup.cfg index f1c34c16..a993d680 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,6 @@ python_requires = >=3.6, <3.10 install_requires = ampform ==0.11.* # wrapped dynamics classes + K-matrix ipympl - ipykernel <6.5 # https://github.com/ComPWA/compwa-org/runs/4140206684?check_suite_focus=true#step:9:12 matplotlib mpl_interactions phasespace <1.5.0 # https://github.com/zfit/phasespace/pull/69 @@ -45,7 +44,6 @@ setup_requires = doc = myst-nb >=0.11 # myst_enable_extensions nbformat - pyparsing <3 # https://github.com/ComPWA/compwa-org/runs/4011465343?check_suite_focus=true#step:5:353 RISE Sphinx >=3 sphinx-book-theme @@ -59,13 +57,12 @@ doc = sphinxcontrib-hep-pdgref test = jupyter - jupyter-client <7 # https://stackoverflow.com/a/67062211/13219025 + nbmake pytest - pytest-notebook pytest-xdist format = black; python_version >="3.7.0" - black <21.8*; python_version=="3.6.*" # https://github.com/ComPWA/compwa-org/runs/4140426087 + black <21.8*; python_version=="3.6.*" # https://github.com/ComPWA/compwa-org/runs/4398753864 isort flake8 = flake8 >=4 # extend-select @@ -82,7 +79,7 @@ flake8 = lint = %(flake8)s pylint; python_version >="3.7.0" - pylint <2.11; python_version=="3.6.*" # https://github.com/ComPWA/compwa-org/runs/4140426087 + pylint <2.11; python_version=="3.6.*" # https://github.com/ComPWA/compwa-org/runs/4398753864 radon sty = %(format)s diff --git a/tox.ini b/tox.ini index 76620e1b..10ee08fb 100644 --- a/tox.ini +++ b/tox.ini @@ -89,10 +89,10 @@ setenv = commands = pre-commit run {posargs} -a -[testenv:testnb] +[testenv:nb] description = Run all notebooks with pytest allowlist_externals = pytest commands = - pytest {posargs:docs} --nb-test-files + pytest --nbmake {posargs:docs}