From 359f47ca6cd4e06d638c743a9053d6f45dfa0788 Mon Sep 17 00:00:00 2001 From: Remco de Boer Date: Mon, 29 Mar 2021 09:57:58 +0200 Subject: [PATCH] ci: autoupdate pre-commit hooks through GitHub (#77) * ci: upgrade developer dependencies --- .github/workflows/requirements-cron.yml | 32 +++++++++++++++++++++--- .github/workflows/requirements-pr.yml | 3 ++- .gitignore | 2 ++ .pre-commit-config.yaml | 6 ++--- .pylintrc | 4 ++- cspell.json | 4 ++- pyrightconfig.json | 5 ++-- reqs/3.6/requirements-dev.txt | 22 ++++++++--------- reqs/3.6/requirements-doc.txt | 12 ++++----- reqs/3.6/requirements-sty.txt | 10 ++++---- reqs/3.7/requirements-dev.txt | 28 ++++++++++----------- reqs/3.7/requirements-doc.txt | 18 +++++++------- reqs/3.7/requirements-sty.txt | 14 +++++------ reqs/3.7/requirements.txt | 4 +-- reqs/3.8/requirements-dev.txt | 28 ++++++++++----------- reqs/3.8/requirements-doc.txt | 18 +++++++------- reqs/3.8/requirements-sty.txt | 12 ++++----- reqs/3.8/requirements.txt | 4 +-- reqs/3.9/requirements-dev.txt | 28 ++++++++++----------- reqs/3.9/requirements-doc.txt | 18 +++++++------- reqs/3.9/requirements-sty.txt | 12 ++++----- reqs/3.9/requirements.txt | 4 +-- setup.cfg | 3 +++ tox.ini | 33 +++++++++++++++++++++++++ typings/.gitignore | 2 ++ typings/README.md | 17 +++++++++++++ typings/tox.ini | 4 +++ 27 files changed, 218 insertions(+), 129 deletions(-) create mode 100644 typings/.gitignore create mode 100644 typings/README.md create mode 100644 typings/tox.ini diff --git a/.github/workflows/requirements-cron.yml b/.github/workflows/requirements-cron.yml index b4a7aefe..2898600a 100644 --- a/.github/workflows/requirements-cron.yml +++ b/.github/workflows/requirements-cron.yml @@ -1,4 +1,4 @@ -# cspell:ignore noreply +# cspell:ignore autoupdate noreply name: Requirements (scheduled) @@ -8,7 +8,7 @@ on: workflow_dispatch: jobs: - upgrade: + upgrade-reqs: name: Upgrade requirement files runs-on: ubuntu-20.04 strategy: @@ -27,7 +27,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pip-tools + pip install pip-tools!=6.0.0 + # https://github.com/jazzband/pip-tools/pull/1353 - name: Upgrade dependencies run: bash reqs/upgrade.sh - uses: actions/upload-artifact@v2 @@ -35,11 +36,33 @@ jobs: name: ${{ matrix.python-version }} path: reqs/${{ matrix.python-version }} + upgrade-pre-commit: + name: Upgrade pre-commit hooks + needs: + - upgrade-reqs + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r reqs/3.7/requirements-sty.txt + - name: Perform style checks + run: pre-commit autoupdate + - uses: actions/upload-artifact@v2 + with: + name: pre-commit + path: .pre-commit-config.yaml + push: name: Create PR runs-on: ubuntu-20.04 needs: - - upgrade + - upgrade-pre-commit steps: - uses: actions/checkout@v2 with: @@ -47,6 +70,7 @@ jobs: - uses: actions/download-artifact@v2 with: path: reqs + - run: mv -f reqs/pre-commit/.pre-commit-config.yaml . - run: git status -s - name: Create Pull Request uses: peter-evans/create-pull-request@v3 diff --git a/.github/workflows/requirements-pr.yml b/.github/workflows/requirements-pr.yml index 1b027b50..d29a43df 100644 --- a/.github/workflows/requirements-pr.yml +++ b/.github/workflows/requirements-pr.yml @@ -45,7 +45,8 @@ jobs: if: steps.git-diff.outputs.dependency-changes != '' run: | python -m pip install --upgrade pip - pip install pip-tools + pip install pip-tools!=6.0.0 + # https://github.com/jazzband/pip-tools/pull/1353 - name: Upgrade dependencies if: steps.git-diff.outputs.dependency-changes != '' run: bash reqs/upgrade.sh diff --git a/.gitignore b/.gitignore index c3462ef8..2ad31247 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,10 @@ *.json *.npy *.pdf +*.pickle *.png *.svg +*.v2 *.xml *.yaml *.yml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ba2e6a79..a9087b71 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: check-useless-excludes - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.3.0 + rev: v3.4.0 hooks: - id: check-ast - id: check-case-conflict @@ -31,12 +31,12 @@ repos: - id: cspell - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.25.0 + rev: v0.27.1 hooks: - id: markdownlint - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.2.0 + rev: v2.2.1 hooks: - id: prettier language_version: 12.18.2 # prettier does not specify node correctly diff --git a/.pylintrc b/.pylintrc index bc0c538d..76d80483 100644 --- a/.pylintrc +++ b/.pylintrc @@ -4,12 +4,12 @@ [BASIC] good-names= + _, i, j, k, q, x, - _, [VARIABLES] init-import=yes @@ -30,6 +30,8 @@ disable= [MASTER] ignore= conf.py +ignore-patterns= + .*\.pyi [DESIGN] # Minimum number of public methods for a class (see R0903). Default is 2. diff --git a/cspell.json b/cspell.json index deb9c252..f91d1880 100644 --- a/cspell.json +++ b/cspell.json @@ -30,6 +30,7 @@ ".vscode/*", ".vscode/.gitignore", "Makefile", + "docs/adr/*/*", "codecov.yml", "cspell.json", "docs/_templates/*", @@ -41,7 +42,8 @@ "requirements*.txt", "setup.cfg", "setup.py", - "tox.ini" + "tox.ini", + "typings" ], "language": "en-US", "words": [ diff --git a/pyrightconfig.json b/pyrightconfig.json index bbad5e89..b7968978 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -1,11 +1,10 @@ { "exclude": [".git", ".tox", "docs/_build"], - "include": ["docs", "src", "tests"], + "include": ["docs/conf.py", "src", "tests"], "reportGeneralTypeIssues": false, "reportUnboundVariable": false, "reportUnusedClass": true, "reportUnusedFunction": true, "reportUnusedImport": true, - "reportUnusedVariable": true, - "stubPath": "" + "reportUnusedVariable": true } diff --git a/reqs/3.6/requirements-dev.txt b/reqs/3.6/requirements-dev.txt index 7c53a272..d328b05b 100644 --- a/reqs/3.6/requirements-dev.txt +++ b/reqs/3.6/requirements-dev.txt @@ -8,7 +8,7 @@ alabaster==0.7.12 anyio==2.2.0 appdirs==1.4.4 argon2-cffi==20.1.0 -astroid==2.5.1 +astroid==2.5.2 async-generator==1.10 attrs==20.3.0 babel==2.9.0 @@ -37,14 +37,14 @@ flake8-builtins==1.5.3 flake8-polyfill==1.0.2 flake8-rst-docstrings==0.0.14 flake8==3.9.0 -gitdb==4.0.5 +gitdb==4.0.7 gitpython==3.1.14 graphviz==0.16 -identify==2.2.0 +identify==2.2.2 idna==2.10 imagesize==1.2.0 immutables==0.15 -importlib-metadata==3.7.3 +importlib-metadata==3.9.0 importlib-resources==3.0.0 ipykernel==5.5.0 ipython-genutils==0.2.0 @@ -57,10 +57,10 @@ json5==0.9.5 jsonschema==3.2.0 jupyter-cache==0.4.2 jupyter-client==6.1.12 -jupyter-console==6.3.0 +jupyter-console==6.4.0 jupyter-core==4.7.1 jupyter-packaging==0.7.12 -jupyter-server==1.4.1 +jupyter-server==1.5.1 jupyter-sphinx==0.3.1 jupyter==1.0.0 jupyterlab-code-formatter==1.4.5 @@ -70,7 +70,7 @@ jupyterlab==3.0.12 kiwisolver==1.3.1 labels==20.1.0 latexcodec==2.0.1 -lazy-object-proxy==1.5.2 +lazy-object-proxy==1.6.0 livereload==2.6.3 markdown-it-py==0.6.2 markupsafe==1.1.1 @@ -91,7 +91,7 @@ nbformat==5.1.2 nbstripout==0.3.9 nest-asyncio==1.5.1 nodeenv==1.5.0 -notebook==6.2.0 +notebook==6.3.0 numpy==1.19.5 packaging==20.9 pandocfilters==1.4.3 @@ -106,7 +106,7 @@ pip-tools==6.0.1 pluggy==0.13.1 pre-commit==2.11.1 prometheus-client==0.9.0 -prompt-toolkit==3.0.17 +prompt-toolkit==3.0.18 ptyprocess==0.7.0 py==1.10.0 pybtex-docutils==1.0.0 @@ -116,7 +116,7 @@ pycparser==2.20 pydata-sphinx-theme==0.4.3 pydeps==1.9.13 pydocstyle==6.0.0 -pyflakes==2.3.0 +pyflakes==2.3.1 pygments==2.8.1 pylint==2.7.2 pyparsing==2.4.7 @@ -133,7 +133,7 @@ requests==2.25.1 restructuredtext-lint==1.3.2 send2trash==1.5.0 six==1.15.0 -smmap==3.0.5 +smmap==4.0.0 sniffio==1.2.0 snowballstemmer==2.1.0 soupsieve==2.2.1 diff --git a/reqs/3.6/requirements-doc.txt b/reqs/3.6/requirements-doc.txt index 1937f066..5c830933 100644 --- a/reqs/3.6/requirements-doc.txt +++ b/reqs/3.6/requirements-doc.txt @@ -23,12 +23,12 @@ decorator==4.4.2 defusedxml==0.7.1 docutils==0.16 entrypoints==0.3 -gitdb==4.0.5 +gitdb==4.0.7 gitpython==3.1.14 graphviz==0.16 idna==2.10 imagesize==1.2.0 -importlib-metadata==3.7.3 +importlib-metadata==3.9.0 importlib-resources==3.0.0 ipykernel==5.5.0 ipython-genutils==0.2.0 @@ -39,7 +39,7 @@ jinja2==2.11.3 jsonschema==3.2.0 jupyter-cache==0.4.2 jupyter-client==6.1.12 -jupyter-console==6.3.0 +jupyter-console==6.4.0 jupyter-core==4.7.1 jupyter-sphinx==0.3.1 jupyter==1.0.0 @@ -59,7 +59,7 @@ nbconvert==5.6.1 nbdime==2.1.0 nbformat==5.1.2 nest-asyncio==1.5.1 -notebook==6.2.0 +notebook==6.3.0 numpy==1.19.5 packaging==20.9 pandocfilters==1.4.3 @@ -68,7 +68,7 @@ pexpect==4.8.0 pickleshare==0.7.5 pillow==8.1.2 prometheus-client==0.9.0 -prompt-toolkit==3.0.17 +prompt-toolkit==3.0.18 ptyprocess==0.7.0 pybtex-docutils==1.0.0 pybtex==0.24.0 @@ -86,7 +86,7 @@ qtpy==1.9.0 requests==2.25.1 send2trash==1.5.0 six==1.15.0 -smmap==3.0.5 +smmap==4.0.0 snowballstemmer==2.1.0 soupsieve==2.2.1 sphinx-book-theme==0.0.42 diff --git a/reqs/3.6/requirements-sty.txt b/reqs/3.6/requirements-sty.txt index a859dae1..21a5c1c4 100644 --- a/reqs/3.6/requirements-sty.txt +++ b/reqs/3.6/requirements-sty.txt @@ -5,7 +5,7 @@ # pip-compile --no-annotate --output-file=reqs/3.6/requirements-sty.txt reqs/3.6/requirements-sty.in # appdirs==1.4.4 -astroid==2.5.1 +astroid==2.5.2 attrs==20.3.0 black==20.8b1 cfgv==3.2.0 @@ -22,15 +22,15 @@ flake8-builtins==1.5.3 flake8-polyfill==1.0.2 flake8-rst-docstrings==0.0.14 flake8==3.9.0 -identify==2.2.0 -importlib-metadata==3.7.3 +identify==2.2.2 +importlib-metadata==3.9.0 importlib-resources==3.0.0 ipython-genutils==0.2.0 isort==5.8.0 jsonschema==3.2.0 jupyter-core==4.7.1 kiwisolver==1.3.1 -lazy-object-proxy==1.5.2 +lazy-object-proxy==1.6.0 matplotlib==3.3.4 mccabe==0.6.1 mypy-extensions==0.4.3 @@ -45,7 +45,7 @@ pillow==8.1.2 pre-commit==2.11.1 pycodestyle==2.7.0 pydocstyle==6.0.0 -pyflakes==2.3.0 +pyflakes==2.3.1 pylint==2.7.2 pyparsing==2.4.7 pyrsistent==0.17.3 diff --git a/reqs/3.7/requirements-dev.txt b/reqs/3.7/requirements-dev.txt index b66eed88..5d28c842 100644 --- a/reqs/3.7/requirements-dev.txt +++ b/reqs/3.7/requirements-dev.txt @@ -8,7 +8,7 @@ alabaster==0.7.12 anyio==2.2.0 appdirs==1.4.4 argon2-cffi==20.1.0 -astroid==2.5.1 +astroid==2.5.2 async-generator==1.10 attrs==20.3.0 babel==2.9.0 @@ -35,16 +35,16 @@ flake8-builtins==1.5.3 flake8-polyfill==1.0.2 flake8-rst-docstrings==0.0.14 flake8==3.9.0 -gitdb==4.0.5 +gitdb==4.0.7 gitpython==3.1.14 graphviz==0.16 -identify==2.2.0 +identify==2.2.2 idna==2.10 imagesize==1.2.0 -importlib-metadata==3.7.3 +importlib-metadata==3.9.0 ipykernel==5.5.0 ipython-genutils==0.2.0 -ipython==7.21.0 +ipython==7.22.0 ipywidgets==7.6.3 isort==5.8.0 jedi==0.18.0 @@ -53,10 +53,10 @@ json5==0.9.5 jsonschema==3.2.0 jupyter-cache==0.4.2 jupyter-client==6.1.12 -jupyter-console==6.3.0 +jupyter-console==6.4.0 jupyter-core==4.7.1 jupyter-packaging==0.7.12 -jupyter-server==1.4.1 +jupyter-server==1.5.1 jupyter-sphinx==0.3.1 jupyter==1.0.0 jupyterlab-code-formatter==1.4.5 @@ -66,11 +66,11 @@ jupyterlab==3.0.12 kiwisolver==1.3.1 labels==20.1.0 latexcodec==2.0.1 -lazy-object-proxy==1.5.2 +lazy-object-proxy==1.6.0 livereload==2.6.3 markdown-it-py==0.6.2 markupsafe==1.1.1 -matplotlib==3.3.4 +matplotlib==3.4.0 mccabe==0.6.1 mdit-py-plugins==0.2.6 mistune==0.8.4 @@ -87,8 +87,8 @@ nbformat==5.1.2 nbstripout==0.3.9 nest-asyncio==1.5.1 nodeenv==1.5.0 -notebook==6.2.0 -numpy==1.20.1 +notebook==6.3.0 +numpy==1.20.2 packaging==20.9 pandocfilters==1.4.3 parso==0.8.1 @@ -102,7 +102,7 @@ pip-tools==6.0.1 pluggy==0.13.1 pre-commit==2.11.1 prometheus-client==0.9.0 -prompt-toolkit==3.0.17 +prompt-toolkit==3.0.18 ptyprocess==0.7.0 py==1.10.0 pybtex-docutils==1.0.0 @@ -112,7 +112,7 @@ pycparser==2.20 pydata-sphinx-theme==0.4.3 pydeps==1.9.13 pydocstyle==6.0.0 -pyflakes==2.3.0 +pyflakes==2.3.1 pygments==2.8.1 pylint==2.7.2 pyparsing==2.4.7 @@ -129,7 +129,7 @@ requests==2.25.1 restructuredtext-lint==1.3.2 send2trash==1.5.0 six==1.15.0 -smmap==3.0.5 +smmap==4.0.0 sniffio==1.2.0 snowballstemmer==2.1.0 soupsieve==2.2.1 diff --git a/reqs/3.7/requirements-doc.txt b/reqs/3.7/requirements-doc.txt index a17d4e08..fce03aaa 100644 --- a/reqs/3.7/requirements-doc.txt +++ b/reqs/3.7/requirements-doc.txt @@ -22,22 +22,22 @@ decorator==4.4.2 defusedxml==0.7.1 docutils==0.16 entrypoints==0.3 -gitdb==4.0.5 +gitdb==4.0.7 gitpython==3.1.14 graphviz==0.16 idna==2.10 imagesize==1.2.0 -importlib-metadata==3.7.3 +importlib-metadata==3.9.0 ipykernel==5.5.0 ipython-genutils==0.2.0 -ipython==7.21.0 +ipython==7.22.0 ipywidgets==7.6.3 jedi==0.18.0 jinja2==2.11.3 jsonschema==3.2.0 jupyter-cache==0.4.2 jupyter-client==6.1.12 -jupyter-console==6.3.0 +jupyter-console==6.4.0 jupyter-core==4.7.1 jupyter-sphinx==0.3.1 jupyter==1.0.0 @@ -46,7 +46,7 @@ kiwisolver==1.3.1 latexcodec==2.0.1 markdown-it-py==0.6.2 markupsafe==1.1.1 -matplotlib==3.3.4 +matplotlib==3.4.0 mdit-py-plugins==0.2.6 mistune==0.8.4 mpmath==1.2.1 @@ -57,8 +57,8 @@ nbconvert==5.6.1 nbdime==2.1.0 nbformat==5.1.2 nest-asyncio==1.5.1 -notebook==6.2.0 -numpy==1.20.1 +notebook==6.3.0 +numpy==1.20.2 packaging==20.9 pandocfilters==1.4.3 parso==0.8.1 @@ -66,7 +66,7 @@ pexpect==4.8.0 pickleshare==0.7.5 pillow==8.1.2 prometheus-client==0.9.0 -prompt-toolkit==3.0.17 +prompt-toolkit==3.0.18 ptyprocess==0.7.0 pybtex-docutils==1.0.0 pybtex==0.24.0 @@ -84,7 +84,7 @@ qtpy==1.9.0 requests==2.25.1 send2trash==1.5.0 six==1.15.0 -smmap==3.0.5 +smmap==4.0.0 snowballstemmer==2.1.0 soupsieve==2.2.1 sphinx-book-theme==0.0.42 diff --git a/reqs/3.7/requirements-sty.txt b/reqs/3.7/requirements-sty.txt index aefaccc1..9c44a489 100644 --- a/reqs/3.7/requirements-sty.txt +++ b/reqs/3.7/requirements-sty.txt @@ -5,7 +5,7 @@ # pip-compile --no-annotate --output-file=reqs/3.7/requirements-sty.txt reqs/3.7/requirements-sty.in # appdirs==1.4.4 -astroid==2.5.1 +astroid==2.5.2 attrs==20.3.0 black==20.8b1 cfgv==3.2.0 @@ -20,29 +20,29 @@ flake8-builtins==1.5.3 flake8-polyfill==1.0.2 flake8-rst-docstrings==0.0.14 flake8==3.9.0 -identify==2.2.0 -importlib-metadata==3.7.3 +identify==2.2.2 +importlib-metadata==3.9.0 ipython-genutils==0.2.0 isort==5.8.0 jsonschema==3.2.0 jupyter-core==4.7.1 kiwisolver==1.3.1 -lazy-object-proxy==1.5.2 -matplotlib==3.3.4 +lazy-object-proxy==1.6.0 +matplotlib==3.4.0 mccabe==0.6.1 mypy-extensions==0.4.3 mypy==0.812 nbformat==5.1.2 nbstripout==0.3.9 nodeenv==1.5.0 -numpy==1.20.1 +numpy==1.20.2 pathspec==0.8.1 pep8-naming==0.11.1 pillow==8.1.2 pre-commit==2.11.1 pycodestyle==2.7.0 pydocstyle==6.0.0 -pyflakes==2.3.0 +pyflakes==2.3.1 pylint==2.7.2 pyparsing==2.4.7 pyrsistent==0.17.3 diff --git a/reqs/3.7/requirements.txt b/reqs/3.7/requirements.txt index 502f18ce..6194b775 100644 --- a/reqs/3.7/requirements.txt +++ b/reqs/3.7/requirements.txt @@ -6,8 +6,8 @@ # cycler==0.10.0 kiwisolver==1.3.1 -matplotlib==3.3.4 -numpy==1.20.1 +matplotlib==3.4.0 +numpy==1.20.2 pillow==8.1.2 pyparsing==2.4.7 python-dateutil==2.8.1 diff --git a/reqs/3.8/requirements-dev.txt b/reqs/3.8/requirements-dev.txt index d1546a3b..a99b9daa 100644 --- a/reqs/3.8/requirements-dev.txt +++ b/reqs/3.8/requirements-dev.txt @@ -8,7 +8,7 @@ alabaster==0.7.12 anyio==2.2.0 appdirs==1.4.4 argon2-cffi==20.1.0 -astroid==2.5.1 +astroid==2.5.2 async-generator==1.10 attrs==20.3.0 babel==2.9.0 @@ -35,16 +35,16 @@ flake8-builtins==1.5.3 flake8-polyfill==1.0.2 flake8-rst-docstrings==0.0.14 flake8==3.9.0 -gitdb==4.0.5 +gitdb==4.0.7 gitpython==3.1.14 graphviz==0.16 -identify==2.2.0 +identify==2.2.2 idna==2.10 imagesize==1.2.0 -importlib-metadata==3.7.3 +importlib-metadata==3.9.0 ipykernel==5.5.0 ipython-genutils==0.2.0 -ipython==7.21.0 +ipython==7.22.0 ipywidgets==7.6.3 isort==5.8.0 jedi==0.18.0 @@ -53,10 +53,10 @@ json5==0.9.5 jsonschema==3.2.0 jupyter-cache==0.4.2 jupyter-client==6.1.12 -jupyter-console==6.3.0 +jupyter-console==6.4.0 jupyter-core==4.7.1 jupyter-packaging==0.7.12 -jupyter-server==1.4.1 +jupyter-server==1.5.1 jupyter-sphinx==0.3.1 jupyter==1.0.0 jupyterlab-code-formatter==1.4.5 @@ -66,11 +66,11 @@ jupyterlab==3.0.12 kiwisolver==1.3.1 labels==20.1.0 latexcodec==2.0.1 -lazy-object-proxy==1.5.2 +lazy-object-proxy==1.6.0 livereload==2.6.3 markdown-it-py==0.6.2 markupsafe==1.1.1 -matplotlib==3.3.4 +matplotlib==3.4.0 mccabe==0.6.1 mdit-py-plugins==0.2.6 mistune==0.8.4 @@ -87,8 +87,8 @@ nbformat==5.1.2 nbstripout==0.3.9 nest-asyncio==1.5.1 nodeenv==1.5.0 -notebook==6.2.0 -numpy==1.20.1 +notebook==6.3.0 +numpy==1.20.2 packaging==20.9 pandocfilters==1.4.3 parso==0.8.1 @@ -102,7 +102,7 @@ pip-tools==6.0.1 pluggy==0.13.1 pre-commit==2.11.1 prometheus-client==0.9.0 -prompt-toolkit==3.0.17 +prompt-toolkit==3.0.18 ptyprocess==0.7.0 py==1.10.0 pybtex-docutils==1.0.0 @@ -112,7 +112,7 @@ pycparser==2.20 pydata-sphinx-theme==0.4.3 pydeps==1.9.13 pydocstyle==6.0.0 -pyflakes==2.3.0 +pyflakes==2.3.1 pygments==2.8.1 pylint==2.7.2 pyparsing==2.4.7 @@ -129,7 +129,7 @@ requests==2.25.1 restructuredtext-lint==1.3.2 send2trash==1.5.0 six==1.15.0 -smmap==3.0.5 +smmap==4.0.0 sniffio==1.2.0 snowballstemmer==2.1.0 soupsieve==2.2.1 diff --git a/reqs/3.8/requirements-doc.txt b/reqs/3.8/requirements-doc.txt index edb613b0..40f75944 100644 --- a/reqs/3.8/requirements-doc.txt +++ b/reqs/3.8/requirements-doc.txt @@ -22,22 +22,22 @@ decorator==4.4.2 defusedxml==0.7.1 docutils==0.16 entrypoints==0.3 -gitdb==4.0.5 +gitdb==4.0.7 gitpython==3.1.14 graphviz==0.16 idna==2.10 imagesize==1.2.0 -importlib-metadata==3.7.3 +importlib-metadata==3.9.0 ipykernel==5.5.0 ipython-genutils==0.2.0 -ipython==7.21.0 +ipython==7.22.0 ipywidgets==7.6.3 jedi==0.18.0 jinja2==2.11.3 jsonschema==3.2.0 jupyter-cache==0.4.2 jupyter-client==6.1.12 -jupyter-console==6.3.0 +jupyter-console==6.4.0 jupyter-core==4.7.1 jupyter-sphinx==0.3.1 jupyter==1.0.0 @@ -46,7 +46,7 @@ kiwisolver==1.3.1 latexcodec==2.0.1 markdown-it-py==0.6.2 markupsafe==1.1.1 -matplotlib==3.3.4 +matplotlib==3.4.0 mdit-py-plugins==0.2.6 mistune==0.8.4 mpmath==1.2.1 @@ -57,8 +57,8 @@ nbconvert==5.6.1 nbdime==2.1.0 nbformat==5.1.2 nest-asyncio==1.5.1 -notebook==6.2.0 -numpy==1.20.1 +notebook==6.3.0 +numpy==1.20.2 packaging==20.9 pandocfilters==1.4.3 parso==0.8.1 @@ -66,7 +66,7 @@ pexpect==4.8.0 pickleshare==0.7.5 pillow==8.1.2 prometheus-client==0.9.0 -prompt-toolkit==3.0.17 +prompt-toolkit==3.0.18 ptyprocess==0.7.0 pybtex-docutils==1.0.0 pybtex==0.24.0 @@ -84,7 +84,7 @@ qtpy==1.9.0 requests==2.25.1 send2trash==1.5.0 six==1.15.0 -smmap==3.0.5 +smmap==4.0.0 snowballstemmer==2.1.0 soupsieve==2.2.1 sphinx-book-theme==0.0.42 diff --git a/reqs/3.8/requirements-sty.txt b/reqs/3.8/requirements-sty.txt index 99c688ce..fe6138cd 100644 --- a/reqs/3.8/requirements-sty.txt +++ b/reqs/3.8/requirements-sty.txt @@ -5,7 +5,7 @@ # pip-compile --no-annotate --output-file=reqs/3.8/requirements-sty.txt reqs/3.8/requirements-sty.in # appdirs==1.4.4 -astroid==2.5.1 +astroid==2.5.2 attrs==20.3.0 black==20.8b1 cfgv==3.2.0 @@ -20,28 +20,28 @@ flake8-builtins==1.5.3 flake8-polyfill==1.0.2 flake8-rst-docstrings==0.0.14 flake8==3.9.0 -identify==2.2.0 +identify==2.2.2 ipython-genutils==0.2.0 isort==5.8.0 jsonschema==3.2.0 jupyter-core==4.7.1 kiwisolver==1.3.1 -lazy-object-proxy==1.5.2 -matplotlib==3.3.4 +lazy-object-proxy==1.6.0 +matplotlib==3.4.0 mccabe==0.6.1 mypy-extensions==0.4.3 mypy==0.812 nbformat==5.1.2 nbstripout==0.3.9 nodeenv==1.5.0 -numpy==1.20.1 +numpy==1.20.2 pathspec==0.8.1 pep8-naming==0.11.1 pillow==8.1.2 pre-commit==2.11.1 pycodestyle==2.7.0 pydocstyle==6.0.0 -pyflakes==2.3.0 +pyflakes==2.3.1 pylint==2.7.2 pyparsing==2.4.7 pyrsistent==0.17.3 diff --git a/reqs/3.8/requirements.txt b/reqs/3.8/requirements.txt index 636a7331..0db077c5 100644 --- a/reqs/3.8/requirements.txt +++ b/reqs/3.8/requirements.txt @@ -6,8 +6,8 @@ # cycler==0.10.0 kiwisolver==1.3.1 -matplotlib==3.3.4 -numpy==1.20.1 +matplotlib==3.4.0 +numpy==1.20.2 pillow==8.1.2 pyparsing==2.4.7 python-dateutil==2.8.1 diff --git a/reqs/3.9/requirements-dev.txt b/reqs/3.9/requirements-dev.txt index a28253b9..5b8fc921 100644 --- a/reqs/3.9/requirements-dev.txt +++ b/reqs/3.9/requirements-dev.txt @@ -8,7 +8,7 @@ alabaster==0.7.12 anyio==2.2.0 appdirs==1.4.4 argon2-cffi==20.1.0 -astroid==2.5.1 +astroid==2.5.2 async-generator==1.10 attrs==20.3.0 babel==2.9.0 @@ -35,16 +35,16 @@ flake8-builtins==1.5.3 flake8-polyfill==1.0.2 flake8-rst-docstrings==0.0.14 flake8==3.9.0 -gitdb==4.0.5 +gitdb==4.0.7 gitpython==3.1.14 graphviz==0.16 -identify==2.2.0 +identify==2.2.2 idna==2.10 imagesize==1.2.0 -importlib-metadata==3.7.3 +importlib-metadata==3.9.0 ipykernel==5.5.0 ipython-genutils==0.2.0 -ipython==7.21.0 +ipython==7.22.0 ipywidgets==7.6.3 isort==5.8.0 jedi==0.18.0 @@ -53,10 +53,10 @@ json5==0.9.5 jsonschema==3.2.0 jupyter-cache==0.4.2 jupyter-client==6.1.12 -jupyter-console==6.3.0 +jupyter-console==6.4.0 jupyter-core==4.7.1 jupyter-packaging==0.7.12 -jupyter-server==1.4.1 +jupyter-server==1.5.1 jupyter-sphinx==0.3.1 jupyter==1.0.0 jupyterlab-code-formatter==1.4.5 @@ -66,11 +66,11 @@ jupyterlab==3.0.12 kiwisolver==1.3.1 labels==20.1.0 latexcodec==2.0.1 -lazy-object-proxy==1.5.2 +lazy-object-proxy==1.6.0 livereload==2.6.3 markdown-it-py==0.6.2 markupsafe==1.1.1 -matplotlib==3.3.4 +matplotlib==3.4.0 mccabe==0.6.1 mdit-py-plugins==0.2.6 mistune==0.8.4 @@ -87,8 +87,8 @@ nbformat==5.1.2 nbstripout==0.3.9 nest-asyncio==1.5.1 nodeenv==1.5.0 -notebook==6.2.0 -numpy==1.20.1 +notebook==6.3.0 +numpy==1.20.2 packaging==20.9 pandocfilters==1.4.3 parso==0.8.1 @@ -102,7 +102,7 @@ pip-tools==6.0.1 pluggy==0.13.1 pre-commit==2.11.1 prometheus-client==0.9.0 -prompt-toolkit==3.0.17 +prompt-toolkit==3.0.18 ptyprocess==0.7.0 py==1.10.0 pybtex-docutils==1.0.0 @@ -112,7 +112,7 @@ pycparser==2.20 pydata-sphinx-theme==0.4.3 pydeps==1.9.13 pydocstyle==6.0.0 -pyflakes==2.3.0 +pyflakes==2.3.1 pygments==2.8.1 pylint==2.7.2 pyparsing==2.4.7 @@ -129,7 +129,7 @@ requests==2.25.1 restructuredtext-lint==1.3.2 send2trash==1.5.0 six==1.15.0 -smmap==3.0.5 +smmap==4.0.0 sniffio==1.2.0 snowballstemmer==2.1.0 soupsieve==2.2.1 diff --git a/reqs/3.9/requirements-doc.txt b/reqs/3.9/requirements-doc.txt index ac922c39..883234b6 100644 --- a/reqs/3.9/requirements-doc.txt +++ b/reqs/3.9/requirements-doc.txt @@ -22,22 +22,22 @@ decorator==4.4.2 defusedxml==0.7.1 docutils==0.16 entrypoints==0.3 -gitdb==4.0.5 +gitdb==4.0.7 gitpython==3.1.14 graphviz==0.16 idna==2.10 imagesize==1.2.0 -importlib-metadata==3.7.3 +importlib-metadata==3.9.0 ipykernel==5.5.0 ipython-genutils==0.2.0 -ipython==7.21.0 +ipython==7.22.0 ipywidgets==7.6.3 jedi==0.18.0 jinja2==2.11.3 jsonschema==3.2.0 jupyter-cache==0.4.2 jupyter-client==6.1.12 -jupyter-console==6.3.0 +jupyter-console==6.4.0 jupyter-core==4.7.1 jupyter-sphinx==0.3.1 jupyter==1.0.0 @@ -46,7 +46,7 @@ kiwisolver==1.3.1 latexcodec==2.0.1 markdown-it-py==0.6.2 markupsafe==1.1.1 -matplotlib==3.3.4 +matplotlib==3.4.0 mdit-py-plugins==0.2.6 mistune==0.8.4 mpmath==1.2.1 @@ -57,8 +57,8 @@ nbconvert==5.6.1 nbdime==2.1.0 nbformat==5.1.2 nest-asyncio==1.5.1 -notebook==6.2.0 -numpy==1.20.1 +notebook==6.3.0 +numpy==1.20.2 packaging==20.9 pandocfilters==1.4.3 parso==0.8.1 @@ -66,7 +66,7 @@ pexpect==4.8.0 pickleshare==0.7.5 pillow==8.1.2 prometheus-client==0.9.0 -prompt-toolkit==3.0.17 +prompt-toolkit==3.0.18 ptyprocess==0.7.0 pybtex-docutils==1.0.0 pybtex==0.24.0 @@ -84,7 +84,7 @@ qtpy==1.9.0 requests==2.25.1 send2trash==1.5.0 six==1.15.0 -smmap==3.0.5 +smmap==4.0.0 snowballstemmer==2.1.0 soupsieve==2.2.1 sphinx-book-theme==0.0.42 diff --git a/reqs/3.9/requirements-sty.txt b/reqs/3.9/requirements-sty.txt index 9971cb54..17f538dc 100644 --- a/reqs/3.9/requirements-sty.txt +++ b/reqs/3.9/requirements-sty.txt @@ -5,7 +5,7 @@ # pip-compile --no-annotate --output-file=reqs/3.9/requirements-sty.txt reqs/3.9/requirements-sty.in # appdirs==1.4.4 -astroid==2.5.1 +astroid==2.5.2 attrs==20.3.0 black==20.8b1 cfgv==3.2.0 @@ -20,28 +20,28 @@ flake8-builtins==1.5.3 flake8-polyfill==1.0.2 flake8-rst-docstrings==0.0.14 flake8==3.9.0 -identify==2.2.0 +identify==2.2.2 ipython-genutils==0.2.0 isort==5.8.0 jsonschema==3.2.0 jupyter-core==4.7.1 kiwisolver==1.3.1 -lazy-object-proxy==1.5.2 -matplotlib==3.3.4 +lazy-object-proxy==1.6.0 +matplotlib==3.4.0 mccabe==0.6.1 mypy-extensions==0.4.3 mypy==0.812 nbformat==5.1.2 nbstripout==0.3.9 nodeenv==1.5.0 -numpy==1.20.1 +numpy==1.20.2 pathspec==0.8.1 pep8-naming==0.11.1 pillow==8.1.2 pre-commit==2.11.1 pycodestyle==2.7.0 pydocstyle==6.0.0 -pyflakes==2.3.0 +pyflakes==2.3.1 pylint==2.7.2 pyparsing==2.4.7 pyrsistent==0.17.3 diff --git a/reqs/3.9/requirements.txt b/reqs/3.9/requirements.txt index 96809170..5c99c2a0 100644 --- a/reqs/3.9/requirements.txt +++ b/reqs/3.9/requirements.txt @@ -6,8 +6,8 @@ # cycler==0.10.0 kiwisolver==1.3.1 -matplotlib==3.3.4 -numpy==1.20.1 +matplotlib==3.4.0 +numpy==1.20.2 pillow==8.1.2 pyparsing==2.4.7 python-dateutil==2.8.1 diff --git a/setup.cfg b/setup.cfg index fc6bded4..70fce35f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -63,6 +63,9 @@ files = **/*.py, **/*.pyi, +[mypy-typings.*] +ignore_errors = True + ; External packages that miss stubs or type hints [mypy-matplotlib.*] ignore_missing_imports = True diff --git a/tox.ini b/tox.ini index fb979272..5f5a4481 100644 --- a/tox.ini +++ b/tox.ini @@ -22,17 +22,46 @@ description = allowlist_externals = sphinx-autobuild passenv = + EXECUTE_NB TERM commands = sphinx-autobuild \ --watch docs \ --watch src \ + --re-ignore .*/.ipynb_checkpoints/.* \ + --re-ignore .*/__pycache__/.* \ + --re-ignore docs/.*\.csv \ + --re-ignore docs/.*\.gv \ --re-ignore docs/.*\.inv \ + --re-ignore docs/.*\.json \ + --re-ignore docs/.*\.pickle \ + --re-ignore docs/.*\.yaml \ + --re-ignore docs/.*\.yml \ --re-ignore docs/_build/.* \ --re-ignore docs/api/.* \ --open-browser \ docs/ docs/_build/html +[testenv:docnb] +description = + Build documentation through Sphinx WITH output of Jupyter notebooks +setenv = + EXECUTE_NB = "yes" +changedir = docs +allowlist_externals = + make +commands = + make html + +[testenv:doctest] +description = + Check the doctests in docstrings of the API +changedir = docs +allowlist_externals = + make +commands = + make ignore-warnings=1 doctest # for margin directive + [testenv:linkcheck] description = Check external links in the documentation (requires internet connection) @@ -83,11 +112,13 @@ ignore = # more info: https://www.flake8rules.com/ E203 # https://github.com/psf/black#slices E231 # allowed by black E501 # https://github.com/psf/black#line-length + RST299 # missing pygments RST201 # block quote ends without a blank line (black formatting) RST301 # unexpected indentation (related to google style docstring) W503 # https://github.com/psf/black#line-breaks--binary-operators rst-roles = attr, + cite, class, doc, download, @@ -100,6 +131,8 @@ rst-directives = deprecated, envvar, exception, + glue:figure, + glue:math, seealso, [pydocstyle] diff --git a/typings/.gitignore b/typings/.gitignore new file mode 100644 index 00000000..8f4080f1 --- /dev/null +++ b/typings/.gitignore @@ -0,0 +1,2 @@ +*.pyi +/*/ diff --git a/typings/README.md b/typings/README.md new file mode 100644 index 00000000..8685d878 --- /dev/null +++ b/typings/README.md @@ -0,0 +1,17 @@ +# Stubs for external libraries + +To speed up linting and code navigation, it's often useful to generate +[stub files](https://mypy.readthedocs.io/en/stable/stubs.html) (`.pyi` files) +for the external libraries. You can do this using +[`stubgen`](https://mypy.readthedocs.io/en/stable/stubgen.html). For instance: + +```shell +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 sympy +``` diff --git a/typings/tox.ini b/typings/tox.ini new file mode 100644 index 00000000..26d0703b --- /dev/null +++ b/typings/tox.ini @@ -0,0 +1,4 @@ +; ignore all pydocstyle errors in this folder + +[pydocstyle] +add_ignore = D