From 95897ef622505fb64053deed529eb7272a6e0f58 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Thu, 2 Dec 2021 17:59:40 +0100 Subject: [PATCH 01/13] ci: update workflow configs with repo-maintenance --- .cspell.json | 5 +++ .github/workflows/cd.yml | 42 +++++++++++++++++++--- .github/workflows/ci-docs.yml | 10 +++--- .github/workflows/requirements-pr.yml | 51 ++++++++++++++++----------- .pre-commit-config.yaml | 2 +- docs/develop.md | 2 -- 6 files changed, 79 insertions(+), 33 deletions(-) diff --git a/.cspell.json b/.cspell.json index 30a6e3a4..bb0b1471 100644 --- a/.cspell.json +++ b/.cspell.json @@ -109,6 +109,7 @@ "axhline", "axvline", "azim", + "bdist", "boldsymbol", "celltoolbar", "clim", @@ -186,9 +187,11 @@ "phsp", "pmatrix", "preorder", + "prereleased", "py's", "pygments", "pylance", + "pypi", "pyplot", "pyright", "pythoncode", @@ -203,8 +206,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/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..8414cf79 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: 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 From afca033bfb0720950eebcc57d5492a14b9a55463 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:02:26 +0100 Subject: [PATCH 02/13] ci: rename tox testnb job to nb --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 76620e1b..7c907806 100644 --- a/tox.ini +++ b/tox.ini @@ -89,7 +89,7 @@ setenv = commands = pre-commit run {posargs} -a -[testenv:testnb] +[testenv:nb] description = Run all notebooks with pytest allowlist_externals = From 103e0d939441277e43773c7e4083d08f3403abcd Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:16:36 +0100 Subject: [PATCH 03/13] ci: switch to nbmake --- pytest.ini | 7 +------ setup.cfg | 3 +-- tox.ini | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) 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..e095365d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -59,9 +59,8 @@ 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" diff --git a/tox.ini b/tox.ini index 7c907806..10ee08fb 100644 --- a/tox.ini +++ b/tox.ini @@ -95,4 +95,4 @@ description = allowlist_externals = pytest commands = - pytest {posargs:docs} --nb-test-files + pytest --nbmake {posargs:docs} From 1a08bda102802f408947bb384e8617ddf2002da4 Mon Sep 17 00:00:00 2001 From: GitHub Date: Thu, 2 Dec 2021 17:20:22 +0000 Subject: [PATCH 04/13] ci: update pip constraints and pre-commit config --- .constraints/py3.6.txt | 16 +++++++++------- .constraints/py3.7.txt | 20 +++++++++++--------- .constraints/py3.8.txt | 20 +++++++++++--------- .constraints/py3.9.txt | 21 +++++++++++---------- .pre-commit-config.yaml | 4 ++-- 5 files changed, 44 insertions(+), 37 deletions(-) diff --git a/.constraints/py3.6.txt b/.constraints/py3.6.txt index 7e63b1ff..5e414b9a 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,6 +162,7 @@ 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 @@ -168,7 +171,6 @@ pyparsing==2.4.7 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..112138a9 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 @@ -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,6 +161,7 @@ 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 @@ -167,7 +170,6 @@ pyparsing==2.4.7 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..44e59c3c 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 @@ -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,6 +160,7 @@ 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 @@ -166,7 +169,6 @@ pyparsing==2.4.7 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..ff47a01f 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,7 +68,6 @@ 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 ipympl==0.8.2 @@ -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,6 +159,7 @@ 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 @@ -166,7 +168,6 @@ pyparsing==2.4.7 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/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8414cf79..395168f9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 From 3800129300fbc0912c059978685ddabb97c88a11 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:30:54 +0100 Subject: [PATCH 05/13] fix: explicitly run pytest nbmake --- .cspell.json | 3 ++- .github/workflows/ci-tests.yml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.cspell.json b/.cspell.json index bb0b1471..0f372501 100644 --- a/.cspell.json +++ b/.cspell.json @@ -95,6 +95,7 @@ "Zenodo" ], "ignoreWords": [ + "Colab", "adrs", "allclose", "appmode", @@ -117,7 +118,6 @@ "cmath", "codegen", "codemirror", - "Colab", "colorbar", "commitlint", "compat", @@ -175,6 +175,7 @@ "multiline", "nbconvert", "nbformat", + "nbmake", "ncols", "nonlocal", "noqa", 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 From b275e778679847b36fc3b86c4824d76922fe5260 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 2 Dec 2021 17:31:30 +0000 Subject: [PATCH 06/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .cspell.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cspell.json b/.cspell.json index 0f372501..76a85aa8 100644 --- a/.cspell.json +++ b/.cspell.json @@ -95,7 +95,6 @@ "Zenodo" ], "ignoreWords": [ - "Colab", "adrs", "allclose", "appmode", @@ -118,6 +117,7 @@ "cmath", "codegen", "codemirror", + "Colab", "colorbar", "commitlint", "compat", From 2e0efcd9d3cf8d3b6b2a623f3501577ab6a8b5e6 Mon Sep 17 00:00:00 2001 From: GitHub Date: Thu, 2 Dec 2021 17:34:57 +0000 Subject: [PATCH 07/13] ci: update pip constraints and pre-commit config --- .constraints/py3.7.txt | 2 +- .constraints/py3.8.txt | 2 +- .constraints/py3.9.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index 112138a9..4498a2e3 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -73,7 +73,7 @@ importlib-resources==5.4.0 iniconfig==1.1.1 ipykernel==6.4.2 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 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index 44e59c3c..032f2444 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -72,7 +72,7 @@ importlib-resources==5.4.0 iniconfig==1.1.1 ipykernel==6.4.2 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 diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index ff47a01f..9b9d33e4 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -71,7 +71,7 @@ importlib-metadata==4.8.2 iniconfig==1.1.1 ipykernel==6.4.2 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 From 0da2b17508eb0406ef70602506d570aa98b9da8e Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:43:27 +0100 Subject: [PATCH 08/13] fix: remove limits from black and pylint --- setup.cfg | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index e095365d..65306333 100644 --- a/setup.cfg +++ b/setup.cfg @@ -63,8 +63,7 @@ test = pytest 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 isort flake8 = flake8 >=4 # extend-select @@ -80,8 +79,7 @@ flake8 = pep8-naming 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 radon sty = %(format)s From e05cc79bba859344ba8da654367115ef2bdfb31a Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:50:51 +0100 Subject: [PATCH 09/13] Revert "fix: remove limits from black and pylint" This reverts commit 0da2b17508eb0406ef70602506d570aa98b9da8e. --- setup.cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 65306333..e095365d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -63,7 +63,8 @@ test = pytest pytest-xdist format = - black + black; python_version >="3.7.0" + black <21.8*; python_version=="3.6.*" # https://github.com/ComPWA/compwa-org/runs/4140426087 isort flake8 = flake8 >=4 # extend-select @@ -79,7 +80,8 @@ flake8 = pep8-naming lint = %(flake8)s - pylint + pylint; python_version >="3.7.0" + pylint <2.11; python_version=="3.6.*" # https://github.com/ComPWA/compwa-org/runs/4140426087 radon sty = %(format)s From 28debf09cc675096fec2de9cc8718f69bc3567cd Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:51:54 +0100 Subject: [PATCH 10/13] fix: remove ipykernel version constraint --- setup.cfg | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index e095365d..ef72eb4d 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 @@ -64,7 +63,7 @@ test = 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 @@ -81,7 +80,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 From b1a97cbbecf669060ddddc88f1e5dc070b3dfec9 Mon Sep 17 00:00:00 2001 From: GitHub Date: Thu, 2 Dec 2021 17:54:13 +0000 Subject: [PATCH 11/13] ci: update pip constraints and pre-commit config --- .constraints/py3.7.txt | 2 +- .constraints/py3.8.txt | 2 +- .constraints/py3.9.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index 4498a2e3..237b90d8 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -71,7 +71,7 @@ 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.1 ipython-genutils==0.2.0 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index 032f2444..55d2145d 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -70,7 +70,7 @@ 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.1 ipython-genutils==0.2.0 diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index 9b9d33e4..55dda8b9 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -69,7 +69,7 @@ imagesize==1.3.0 iminuit==2.8.4 importlib-metadata==4.8.2 iniconfig==1.1.1 -ipykernel==6.4.2 +ipykernel==6.6.0 ipympl==0.8.2 ipython==7.30.1 ipython-genutils==0.2.0 From 468e46c9702abaee393a7b1569e1347ecffc71a4 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Thu, 2 Dec 2021 19:00:37 +0100 Subject: [PATCH 12/13] fix: remove version limit on pyparsing --- setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index ef72eb4d..a993d680 100644 --- a/setup.cfg +++ b/setup.cfg @@ -44,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 From 7d9fb700cb198814527851695902ebb9400d287b Mon Sep 17 00:00:00 2001 From: GitHub Date: Thu, 2 Dec 2021 18:02:53 +0000 Subject: [PATCH 13/13] ci: update pip constraints and pre-commit config --- .constraints/py3.6.txt | 2 +- .constraints/py3.7.txt | 2 +- .constraints/py3.8.txt | 2 +- .constraints/py3.9.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.constraints/py3.6.txt b/.constraints/py3.6.txt index 5e414b9a..7df426f9 100644 --- a/.constraints/py3.6.txt +++ b/.constraints/py3.6.txt @@ -167,7 +167,7 @@ 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 diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index 237b90d8..a71283fb 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -166,7 +166,7 @@ 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 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index 55d2145d..7840e5f2 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -165,7 +165,7 @@ 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 diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index 55dda8b9..bf8b38fd 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -164,7 +164,7 @@ 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