diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 46bc9ad..1d17fee 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -3,8 +3,6 @@ current_version = 0.2.1 commit = True tag = True -[bumpversion:file:__pkginfo__.py] - [bumpversion:file:notebook2script/__init__.py] search = : str = "{current_version}" @@ -17,3 +15,5 @@ replace = : str = "{new_version}" [bumpversion:file:doc-source/index.rst] [bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 4beea97..7549169 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -44,7 +44,7 @@ If possible, please include a small, self-contained reproduction. * notebook2script: ## Installation source - + ## Other Additional Information: diff --git a/.github/milestones.py b/.github/milestones.py new file mode 100755 index 0000000..5e868dc --- /dev/null +++ b/.github/milestones.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +# stdlib +import os +import sys + +# 3rd party +from github3 import GitHub +from github3.repos import Repository +from packaging.version import InvalidVersion, Version + +latest_tag = os.environ["GITHUB_REF_NAME"] + +try: + current_version = Version(latest_tag) +except InvalidVersion: + sys.exit() + +gh: GitHub = GitHub(token=os.environ["GITHUB_TOKEN"]) +repo: Repository = gh.repository(*os.environ["GITHUB_REPOSITORY"].split('/', 1)) + +for milestone in repo.milestones(state="open"): + try: + milestone_version = Version(milestone.title) + except InvalidVersion: + continue + if milestone_version == current_version: + sys.exit(not milestone.update(state="closed")) diff --git a/.github/stale.yml b/.github/stale.yml index bb7ca3f..bb7fa62 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -7,7 +7,7 @@ daysUntilStale: 180 # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 180 +daysUntilClose: false # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) onlyLabels: [] @@ -28,13 +28,13 @@ exemptMilestones: false exemptAssignees: false # Label to use when marking as stale -staleLabel: wontfix +staleLabel: stale # Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. +markComment: false +# This issue has been automatically marked as stale because it has not had +# recent activity. It will be closed if no further activity occurs. Thank you +# for your contributions. # Comment to post when removing the stale label. # unmarkComment: > diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml deleted file mode 100644 index 741c0bd..0000000 --- a/.github/workflows/cleanup.yml +++ /dev/null @@ -1,14 +0,0 @@ -# This file is managed by 'repo_helper'. Don't edit it directly. ---- -name: Artefact Cleaner -on: - schedule: - - cron: 0 9 1 * * -jobs: - Clean: - runs-on: ubuntu-latest - steps: - - name: cleanup - uses: glassechidna/artifact-cleaner@v2 - with: - minimumAge: 1000000.0 diff --git a/.github/workflows/docs_test_action.yml b/.github/workflows/docs_test_action.yml index 51d1d73..d258e8d 100644 --- a/.github/workflows/docs_test_action.yml +++ b/.github/workflows/docs_test_action.yml @@ -2,17 +2,36 @@ --- name: "Docs Check" on: - - push + push: + branches-ignore: + - 'repo-helper-update' + - 'pre-commit-ci-update-config' + - 'imgbot' + pull_request: + +permissions: + contents: read jobs: docs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: "actions/checkout@v1" + uses: "actions/checkout@v2" + + - name: Check for changed files + uses: dorny/paths-filter@v2 + id: changes + with: + list-files: "json" + filters: | + code: + - '!tests/**' + - name: Install and Build 🔧 - uses: ammaraskar/sphinx-action@master + uses: sphinx-toolbox/sphinx-action@sphinx-3.3.1 + if: steps.changes.outputs.code == 'true' with: - pre-build-command: apt-get update && apt-get install gcc python3-dev git pandoc -y && python -m pip install tox + pre-build-command: python -m pip install tox docs-folder: "doc-source/" build-command: "tox -e docs -- " diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 29303d6..84e9436 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -4,6 +4,14 @@ name: Flake8 on: push: + branches-ignore: + - 'repo-helper-update' + - 'pre-commit-ci-update-config' + - 'imgbot' + pull_request: + +permissions: + contents: read jobs: Run: @@ -14,12 +22,23 @@ jobs: - name: Checkout 🛎️ uses: "actions/checkout@v2" + - name: Check for changed files + uses: dorny/paths-filter@v2 + id: changes + with: + list-files: "json" + filters: | + code: + - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' + - name: Setup Python 🐍 + if: steps.changes.outputs.code == 'true' uses: "actions/setup-python@v2" with: - python-version: "3.8" + python-version: "3.6" - name: Install dependencies 🔧 + if: steps.changes.outputs.code == 'true' run: | python -VV python -m site @@ -27,4 +46,5 @@ jobs: python -m pip install tox - name: "Run Flake8" - run: "python -m tox -e lint -- --format github" + if: steps.changes.outputs.code == 'true' + run: "python -m tox -e lint -s false -- --format github" diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index e10cf9b..db8ab06 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -4,6 +4,14 @@ name: mypy on: push: + branches-ignore: + - 'repo-helper-update' + - 'pre-commit-ci-update-config' + - 'imgbot' + pull_request: + +permissions: + contents: read jobs: Run: @@ -19,7 +27,17 @@ jobs: - name: Checkout 🛎️ uses: "actions/checkout@v2" + - name: Check for changed files + uses: dorny/paths-filter@v2 + id: changes + with: + list-files: "json" + filters: | + code: + - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' + - name: Setup Python 🐍 + if: steps.changes.outputs.code == 'true' uses: "actions/setup-python@v2" with: python-version: "3.6" @@ -29,7 +47,8 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv + python -m pip install --upgrade tox virtualenv!=20.16.0 - name: "Run mypy" - run: "python -m tox -e mypy" + if: steps.changes.outputs.code == 'true' + run: "python -m tox -e mypy -s false" diff --git a/.github/workflows/octocheese.yml b/.github/workflows/octocheese.yml index 0242cca..ae825c7 100644 --- a/.github/workflows/octocheese.yml +++ b/.github/workflows/octocheese.yml @@ -3,10 +3,8 @@ name: "GitHub Releases" on: - push: - branches: ["master"] schedule: - - cron: 0 12 * * 2,4,6 + - cron: 0 12 * * * jobs: Run: diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index fd2d483..e17433e 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -4,6 +4,17 @@ name: Windows on: push: + branches-ignore: + - 'repo-helper-update' + - 'pre-commit-ci-update-config' + - 'imgbot' + + pull_request: + +permissions: + actions: write + issues: write + contents: read jobs: tests: @@ -26,24 +37,38 @@ jobs: - name: Checkout 🛎️ uses: "actions/checkout@v2" + - name: Check for changed files + if: startsWith(github.ref, 'refs/tags/') != true + uses: dorny/paths-filter@v2 + id: changes + with: + list-files: "json" + filters: | + code: + - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' + - name: Setup Python 🐍 + id: setup-python + if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} uses: "actions/setup-python@v2" with: python-version: "${{ matrix.config.python-version }}" - name: Install dependencies 🔧 + if: steps.setup-python.outcome == 'success' run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv + python -m pip install --upgrade tox virtualenv!=20.16.0 - name: "Run Tests for Python ${{ matrix.config.python-version }}" - run: python -m tox -e "${{ matrix.config.testenvs }}" + if: steps.setup-python.outcome == 'success' + run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" uses: actions/upload-artifact@v2 - if: ${{ always() }} + if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 1e9be36..80ee082 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -4,6 +4,18 @@ name: Linux on: push: + branches-ignore: + - 'repo-helper-update' + - 'pre-commit-ci-update-config' + - 'imgbot' + tags: + - '*' + pull_request: + +permissions: + actions: write + issues: write + contents: read jobs: tests: @@ -26,25 +38,39 @@ jobs: - name: Checkout 🛎️ uses: "actions/checkout@v2" + - name: Check for changed files + if: startsWith(github.ref, 'refs/tags/') != true + uses: dorny/paths-filter@v2 + id: changes + with: + list-files: "json" + filters: | + code: + - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' + - name: Setup Python 🐍 + id: setup-python + if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} uses: "actions/setup-python@v2" with: python-version: "${{ matrix.config.python-version }}" - name: Install dependencies 🔧 + if: steps.setup-python.outcome == 'success' run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv + python -m pip install --upgrade tox virtualenv!=20.16.0 python -m pip install --upgrade coverage_pyver_pragma - name: "Run Tests for Python ${{ matrix.config.python-version }}" - run: python -m tox -e "${{ matrix.config.testenvs }}" + if: steps.setup-python.outcome == 'success' + run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" uses: actions/upload-artifact@v2 - if: ${{ always() }} + if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage @@ -73,21 +99,26 @@ jobs: path: coverage - name: Display structure of downloaded files + id: show run: ls -R working-directory: coverage + continue-on-error: true - name: Combine Coverage 👷 + if: ${{ steps.show.outcome != 'failure' }} run: | shopt -s globstar python -m coverage combine coverage/**/.coverage - name: "Upload Combined Coverage Artefact 🚀" + if: ${{ steps.show.outcome != 'failure' }} uses: actions/upload-artifact@v2 with: name: "combined-coverage" path: .coverage - name: "Upload Combined Coverage to Coveralls" + if: ${{ steps.show.outcome != 'failure' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -104,21 +135,21 @@ jobs: - name: Setup Python 🐍 uses: "actions/setup-python@v2" + if: startsWith(github.ref, 'refs/tags/') with: python-version: 3.8 - if: startsWith(github.ref, 'refs/tags/') - name: Install dependencies 🔧 + if: startsWith(github.ref, 'refs/tags/') run: | python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade tox - if: startsWith(github.ref, 'refs/tags/') - name: Build distributions 📦 + if: startsWith(github.ref, 'refs/tags/') run: | tox -e build - if: startsWith(github.ref, 'refs/tags/') - name: Upload distribution to PyPI 🚀 if: startsWith(github.ref, 'refs/tags/') @@ -127,3 +158,11 @@ jobs: user: __token__ password: ${{ secrets.PYPI_TOKEN }} skip_existing: true + + - name: Close milestone 🚪 + if: startsWith(github.ref, 'refs/tags/') + run: | + python -m pip install --upgrade github3.py packaging + python .github/milestones.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index a0bb81e..66485d5 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -4,6 +4,17 @@ name: macOS on: push: + branches-ignore: + - 'repo-helper-update' + - 'pre-commit-ci-update-config' + - 'imgbot' + + pull_request: + +permissions: + actions: write + issues: write + contents: read jobs: tests: @@ -26,24 +37,38 @@ jobs: - name: Checkout 🛎️ uses: "actions/checkout@v2" + - name: Check for changed files + if: startsWith(github.ref, 'refs/tags/') != true + uses: dorny/paths-filter@v2 + id: changes + with: + list-files: "json" + filters: | + code: + - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' + - name: Setup Python 🐍 + id: setup-python + if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} uses: "actions/setup-python@v2" with: python-version: "${{ matrix.config.python-version }}" - name: Install dependencies 🔧 + if: steps.setup-python.outcome == 'success' run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv + python -m pip install --upgrade tox virtualenv!=20.16.0 - name: "Run Tests for Python ${{ matrix.config.python-version }}" - run: python -m tox -e "${{ matrix.config.testenvs }}" + if: steps.setup-python.outcome == 'success' + run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" uses: actions/upload-artifact@v2 - if: ${{ always() }} + if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2c30c26..fb9051c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,6 +4,11 @@ exclude: ^$ repos: + - repo: https://github.com/repo-helper/pyproject-parser + rev: v0.7.0 + hooks: + - id: reformat-pyproject + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.4.0 hooks: @@ -25,28 +30,28 @@ repos: - id: end-of-file-fixer - repo: https://github.com/domdfcoding/pre-commit-hooks - rev: v0.2.1 + rev: v0.4.0 hooks: - id: requirements-txt-sorter args: - --allow-git - id: check-docstring-first - exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup|tests/.*)\.py$ + exclude: ^(doc-source/conf|__pkginfo__|setup|tests/.*)\.py$ - id: bind-requirements - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.1.7 + rev: v0.2.2 hooks: - id: ensure-dunder-all files: ^notebook2script/.*\.py$ - repo: https://github.com/domdfcoding/flake2lint - rev: v0.4.0 + rev: v0.4.2 hooks: - id: flake2lint - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.8.0 + rev: v1.9.0 hooks: - id: python-no-eval - id: rst-backticks @@ -62,19 +67,24 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.9 + rev: v1.2.0 hooks: - id: remove-crlf - id: forbid-crlf - - repo: https://github.com/repo-helper/formate - rev: v0.4.3 + - repo: https://github.com/python-formate/snippet-fmt + rev: v0.1.4 + hooks: + - id: snippet-fmt + + - repo: https://github.com/python-formate/formate + rev: v0.4.10 hooks: - id: formate - exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup)\.(_)?py$ + exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ - repo: https://github.com/domdfcoding/dep_checker - rev: v0.6.1 + rev: v0.7.0 hooks: - id: dep_checker args: diff --git a/.pylintrc b/.pylintrc index a21206a..81ecba0 100644 --- a/.pylintrc +++ b/.pylintrc @@ -66,7 +66,7 @@ confidence= # no Warning level messages displayed, use"--disable=all --enable=classes # --disable=W" disable=all -enable=assert-on-tuple,astroid-error,bad-except-order,bad-inline-option,bad-option-value,bad-reversed-sequence,bare-except,binary-op-exception,boolean-datetime,catching-non-exception,cell-var-from-loop,confusing-with-statement,consider-merging-isinstance,consider-using-enumerate,consider-using-ternary,continue-in-finally,cyclic-import,deprecated-pragma,django-not-available,duplicate-except,duplicate-key,eval-used,exec-used,expression-not-assigned,fatal,file-ignored,fixme,global-at-module-level,global-statement,global-variable-not-assigned,global-variable-undefined,http-response-with-content-type-json,http-response-with-json-dumps,invalid-all-object,invalid-characters-in-docstring,len-as-condition,literal-comparison,locally-disabled,locally-enabled,lost-exception,lowercase-l-suffix,misplaced-bare-raise,missing-kwoa,mixed-line-endings,model-has-unicode,model-missing-unicode,model-no-explicit-unicode,model-unicode-not-callable,multiple-imports,new-db-field-with-default,non-ascii-bytes-literals,nonexistent-operator,not-in-loop,notimplemented-raised,overlapping-except,parse-error,pointless-statement,pointless-string-statement,raising-bad-type,raising-non-exception,raw-checker-failed,redefine-in-handler,redefined-argument-from-local,redefined-builtin,redundant-content-type-for-json-response,reimported,relative-import,return-outside-function,simplifiable-if-statement,singleton-comparison,syntax-error,trailing-comma-tuple,trailing-newlines,unbalanced-tuple-unpacking,undefined-all-variable,undefined-loop-variable,unexpected-line-ending-format,unidiomatic-typecheck,unnecessary-lambda,unnecessary-pass,unnecessary-semicolon,unneeded-not,unpacking-non-sequence,unreachable,unrecognized-inline-option,used-before-assignment,useless-else-on-loop,using-constant-test,wildcard-import,yield-outside-function,useless-return +enable=assert-on-tuple,astroid-error,bad-except-order,bad-inline-option,bad-option-value,bad-reversed-sequence,bare-except,binary-op-exception,boolean-datetime,catching-non-exception,cell-var-from-loop,confusing-with-statement,consider-merging-isinstance,consider-using-enumerate,consider-using-ternary,continue-in-finally,deprecated-pragma,django-not-available,duplicate-except,duplicate-key,eval-used,exec-used,expression-not-assigned,fatal,file-ignored,fixme,global-at-module-level,global-statement,global-variable-not-assigned,global-variable-undefined,http-response-with-content-type-json,http-response-with-json-dumps,invalid-all-object,invalid-characters-in-docstring,len-as-condition,literal-comparison,locally-disabled,locally-enabled,lost-exception,lowercase-l-suffix,misplaced-bare-raise,missing-kwoa,mixed-line-endings,model-has-unicode,model-missing-unicode,model-no-explicit-unicode,model-unicode-not-callable,multiple-imports,new-db-field-with-default,non-ascii-bytes-literals,nonexistent-operator,not-in-loop,notimplemented-raised,overlapping-except,parse-error,pointless-statement,pointless-string-statement,raising-bad-type,raising-non-exception,raw-checker-failed,redefine-in-handler,redefined-argument-from-local,redefined-builtin,redundant-content-type-for-json-response,reimported,relative-import,return-outside-function,simplifiable-if-statement,singleton-comparison,syntax-error,trailing-comma-tuple,trailing-newlines,unbalanced-tuple-unpacking,undefined-all-variable,undefined-loop-variable,unexpected-line-ending-format,unidiomatic-typecheck,unnecessary-lambda,unnecessary-pass,unnecessary-semicolon,unneeded-not,unpacking-non-sequence,unreachable,unrecognized-inline-option,used-before-assignment,useless-else-on-loop,using-constant-test,wildcard-import,yield-outside-function,useless-return [REPORTS] diff --git a/README.rst b/README.rst index 3fa094c..578aa4d 100644 --- a/README.rst +++ b/README.rst @@ -23,7 +23,7 @@ notebook2script * - Activity - |commits-latest| |commits-since| |maintained| |pypi-downloads| * - QA - - |codefactor| |actions_flake8| |actions_mypy| |pre_commit_ci| + - |codefactor| |actions_flake8| |actions_mypy| * - Other - |license| |language| |requires| @@ -55,8 +55,8 @@ notebook2script :target: https://github.com/PyMassSpec/notebook2script/actions?query=workflow%3A%22mypy%22 :alt: mypy status -.. |requires| image:: https://requires.io/github/PyMassSpec/notebook2script/requirements.svg?branch=master - :target: https://requires.io/github/PyMassSpec/notebook2script/requirements/?branch=master +.. |requires| image:: https://dependency-dash.herokuapp.com/github/PyMassSpec/notebook2script/badge.svg + :target: https://dependency-dash.herokuapp.com/github/PyMassSpec/notebook2script/ :alt: Requirements Status .. |coveralls| image:: https://img.shields.io/coveralls/github/PyMassSpec/notebook2script/master?logo=coveralls @@ -98,17 +98,13 @@ notebook2script :target: https://github.com/PyMassSpec/notebook2script/commit/master :alt: GitHub last commit -.. |maintained| image:: https://img.shields.io/maintenance/yes/2021 +.. |maintained| image:: https://img.shields.io/maintenance/yes/2022 :alt: Maintenance .. |pypi-downloads| image:: https://img.shields.io/pypi/dm/notebook2script :target: https://pypi.org/project/notebook2script/ :alt: PyPI - Downloads -.. |pre_commit_ci| image:: https://results.pre-commit.ci/badge/github/PyMassSpec/notebook2script/master.svg - :target: https://results.pre-commit.ci/latest/github/PyMassSpec/notebook2script/master - :alt: pre-commit.ci status - .. end shields | diff --git a/__pkginfo__.py b/__pkginfo__.py deleted file mode 100644 index 2022197..0000000 --- a/__pkginfo__.py +++ /dev/null @@ -1,32 +0,0 @@ -# This file is managed by 'repo_helper'. Don't edit it directly. -# Copyright © 2020 Dominic Davis-Foster -# -# This file is distributed under the same license terms as the program it came with. -# There will probably be a file called LICEN[S/C]E in the same directory as this file. -# -# In any case, this program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# This script based on https://github.com/rocky/python-uncompyle6/blob/master/__pkginfo__.py -# - -# stdlib -import pathlib - -__all__ = [ - "__copyright__", - "__version__", - "repo_root", - "install_requires", - "extras_require", - ] - -__copyright__ = """ -2020-2021 Dominic Davis-Foster -""" - -__version__ = "0.2.1" -repo_root = pathlib.Path(__file__).parent -install_requires = (repo_root / "requirements.txt").read_text(encoding="utf-8").split('\n') -extras_require = {} diff --git a/doc-source/Source.rst b/doc-source/Source.rst index af4ffca..280a276 100644 --- a/doc-source/Source.rst +++ b/doc-source/Source.rst @@ -7,24 +7,27 @@ and can be accessed from the following URL: https://github.com/PyMassSpec/notebo If you have ``git`` installed, you can clone the repository with the following command: -.. code-block:: bash +.. prompt:: bash + + git clone https://github.com/PyMassSpec/notebook2script + +.. parsed-literal:: - $ git clone https://github.com/PyMassSpec/notebook2script" - > Cloning into 'notebook2script'... - > remote: Enumerating objects: 47, done. - > remote: Counting objects: 100% (47/47), done. - > remote: Compressing objects: 100% (41/41), done. - > remote: Total 173 (delta 16), reused 17 (delta 6), pack-reused 126 - > Receiving objects: 100% (173/173), 126.56 KiB | 678.00 KiB/s, done. - > Resolving deltas: 100% (66/66), done. + Cloning into 'notebook2script'... + remote: Enumerating objects: 47, done. + remote: Counting objects: 100% (47/47), done. + remote: Compressing objects: 100% (41/41), done. + remote: Total 173 (delta 16), reused 17 (delta 6), pack-reused 126 + Receiving objects: 100% (173/173), 126.56 KiB | 678.00 KiB/s, done. + Resolving deltas: 100% (66/66), done. | Alternatively, the code can be downloaded in a 'zip' file by clicking: | :guilabel:`Clone or download` --> :guilabel:`Download Zip` .. figure:: git_download.png - :alt: Downloading a 'zip' file of the source code. + :alt: Downloading a 'zip' file of the source code. - Downloading a 'zip' file of the source code + Downloading a 'zip' file of the source code Building from source diff --git a/doc-source/_static/style.css b/doc-source/_static/style.css index 644e48b..a6b8e4d 100644 --- a/doc-source/_static/style.css +++ b/doc-source/_static/style.css @@ -8,3 +8,12 @@ div.highlight { .field-list dt, dl.simple dt { margin-top: 0.5rem; } + +div.versionchanged ul, div.versionremoved ul { + margin-left: 20px; + margin-top: 0; +} + +.longtable.autosummary { + width: 100%; +} diff --git a/doc-source/_templates/sidebar/navigation.html b/doc-source/_templates/sidebar/navigation.html deleted file mode 100644 index b99c54c..0000000 --- a/doc-source/_templates/sidebar/navigation.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/doc-source/conf.py b/doc-source/conf.py index f965697..0e3edf9 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -7,68 +7,34 @@ import re import sys -sys.path.append(os.path.abspath('.')) -sys.path.append(os.path.abspath("..")) +# 3rd party +from sphinx_pyproject import SphinxConfig -# this package -from __pkginfo__ import __version__ +sys.path.append('.') -github_username = "PyMassSpec" -github_repository = "notebook2script" -github_url = f"https://github.com/{github_username}/{github_repository}" +config = SphinxConfig(globalns=globals()) +project = config["project"] +author = config["author"] +documentation_summary = config.description + +github_url = "https://github.com/{github_username}/{github_repository}".format_map(config) rst_prolog = f""".. |pkgname| replace:: notebook2script .. |pkgname2| replace:: ``notebook2script`` .. |browse_github| replace:: `Browse the GitHub Repository <{github_url}>`__ """ -author = "Dominic Davis-Foster" -project = "notebook2script".replace('_', '-') slug = re.sub(r'\W+', '-', project.lower()) -release = version = __version__ -copyright = "2020-2021 Dominic Davis-Foster" # pylint: disable=redefined-builtin -language = "en" -package_root = "notebook2script" - -extensions = [ - "sphinx_toolbox", - "sphinx_toolbox.more_autodoc", - "sphinx_toolbox.more_autosummary", - "sphinx_toolbox.documentation_summary", - "sphinx_toolbox.tweaks.param_dash", - "sphinx_toolbox.tweaks.latex_toc", - "sphinx.ext.intersphinx", - "sphinx.ext.mathjax", - "sphinxcontrib.httpdomain", - "sphinxcontrib.extras_require", - "sphinx.ext.todo", - "sphinxemoji.sphinxemoji", - "notfound.extension", - "sphinx_copybutton", - "sphinxcontrib.default_values", - "sphinxcontrib.toctree_plus", - "sphinx_debuginfo", - "seed_intersphinx_mapping", - "sphinx_click", - ] - -sphinxemoji_style = "twemoji" -todo_include_todos = bool(os.environ.get("SHOW_TODOS", 0)) -gitstamp_fmt = "%d %b %Y" - -templates_path = ["_templates"] -html_static_path = ["_static"] -source_suffix = ".rst" -master_doc = "index" -suppress_warnings = ["image.nonlocal_uri"] -pygments_style = "default" +release = version = config.version + +sphinx_builder = os.environ.get("SPHINX_BUILDER", "html").lower() +todo_include_todos = int(os.environ.get("SHOW_TODOS", 0)) and sphinx_builder != "latex" intersphinx_mapping = { "python": ("https://docs.python.org/3/", None), "sphinx": ("https://www.sphinx-doc.org/en/stable/", None), } -html_theme = "furo" html_theme_options = { "light_css_variables": { "toc-title-font-size": "12pt", @@ -81,8 +47,6 @@ "admonition-font-size": "12pt", }, } -html_theme_path = ["../.."] -html_show_sourcelink = True # True will show link to source html_context = {} htmlhelp_basename = slug @@ -91,51 +55,24 @@ man_pages = [("index", slug, project, [author], 1)] texinfo_documents = [("index", slug, project, author, slug, project, "Miscellaneous")] -toctree_plus_types = { - "class", - "function", - "method", - "data", - "enum", - "flag", - "confval", - "directive", - "role", - "confval", - "protocol", - "typeddict", - "namedtuple", - "exception", - } +toctree_plus_types = set(config["toctree_plus_types"]) -add_module_names = False -hide_none_rtype = True -all_typevars = True -overloads_location = "bottom" -documentation_summary = "Convert Jupyter Notebooks to Python Scripts." - -autodoc_exclude_members = [ # Exclude "standard" methods. - "__dict__", - "__class__", - "__dir__", - "__weakref__", - "__module__", - "__annotations__", - "__orig_bases__", - "__parameters__", - "__subclasshook__", - "__init_subclass__", - "__attrs_attrs__", - "__init__", - "__new__", - "__getnewargs__", - "__abstractmethods__", - "__hash__", - ] autodoc_default_options = { "members": None, # Include all members (methods). "special-members": None, "autosummary": None, "show-inheritance": None, - "exclude-members": ','.join(autodoc_exclude_members), + "exclude-members": ','.join(config["autodoc_exclude_members"]), + } + +latex_elements = { + "printindex": "\\begin{flushleft}\n\\printindex\n\\end{flushleft}", + "tableofcontents": "\\pdfbookmark[0]{\\contentsname}{toc}\\sphinxtableofcontents", } + + +def setup(app): + # 3rd party + from sphinx_toolbox.latex import better_header_layout + + app.connect("config-inited", lambda app, config: better_header_layout(config)) diff --git a/doc-source/index.rst b/doc-source/index.rst index 8a0e5b7..3d899c9 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -5,6 +5,7 @@ notebook2script .. start short_desc .. documentation-summary:: + :meta: .. end short_desc @@ -25,7 +26,7 @@ notebook2script * - Activity - |commits-latest| |commits-since| |maintained| |pypi-downloads| * - QA - - |codefactor| |actions_flake8| |actions_mypy| |pre_commit_ci| + - |codefactor| |actions_flake8| |actions_mypy| * - Other - |license| |language| |requires| @@ -57,7 +58,8 @@ notebook2script :workflow: mypy :alt: mypy status - .. |requires| requires-io-shield:: + .. |requires| image:: https://dependency-dash.herokuapp.com/github/PyMassSpec/notebook2script/badge.svg + :target: https://dependency-dash.herokuapp.com/github/PyMassSpec/notebook2script/ :alt: Requirements Status .. |coveralls| coveralls-shield:: @@ -102,7 +104,7 @@ notebook2script :last-commit: :alt: GitHub last commit - .. |maintained| maintained-shield:: 2021 + .. |maintained| maintained-shield:: 2022 :alt: Maintenance .. |pypi-downloads| pypi-shield:: @@ -110,9 +112,6 @@ notebook2script :downloads: month :alt: PyPI - Downloads - .. |pre_commit_ci| pre-commit-ci-shield:: - :alt: pre-commit.ci status - .. end shields Installation @@ -140,12 +139,18 @@ Installation contributing Source +.. sidebar-links:: + :caption: Links + :github: + :pypi: notebook2script + + .. start links .. only:: html View the :ref:`Function Index ` or browse the `Source Code <_modules/index.html>`__. - `Browse the GitHub Repository `__ + :github:repo:`Browse the GitHub Repository ` .. end links diff --git a/doc-source/license.rst b/doc-source/license.rst new file mode 100644 index 0000000..48618ce --- /dev/null +++ b/doc-source/license.rst @@ -0,0 +1,10 @@ +========= +License +========= + +``notebook2script`` is licensed under the :choosealicense:`GPL-2.0-only` + +.. license-info:: GPL-2.0-only + +.. license:: + :py: notebook2script diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index 36274aa..72b7cb9 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -1,16 +1,18 @@ git+https://github.com/domdfcoding/sphinx-click.git -autodocsumm>=0.2.0 -default-values>=0.4.2 +default-values>=0.5.0 extras-require>=0.2.0 furo>=2020.11.19b18 +html-section>=0.1.0 seed-intersphinx-mapping>=0.3.1 sphinx>=3.0.3 sphinx-copybutton>=0.2.12 sphinx-debuginfo>=0.1.0 +sphinx-licenseinfo>=0.1.1 sphinx-notfound-page>=0.5 sphinx-prompt>=1.1.0 +sphinx-pyproject>=0.1.0 sphinx-tabs>=1.1.13 -sphinx-toolbox>=2.2.0 +sphinx-toolbox>=2.13.0 sphinxcontrib-httpdomain>=1.7.0 sphinxemoji>=0.1.6 -toctree-plus>=0.1.0 +toctree-plus>=0.5.0 diff --git a/formate.toml b/formate.toml index 485cb5a..210cf14 100644 --- a/formate.toml +++ b/formate.toml @@ -40,6 +40,7 @@ known_third_party = [ "coverage_pyver_pragma", "domdf_python_tools", "github", + "importlib_metadata", "ipython", "isort", "nbconvert", diff --git a/justfile b/justfile new file mode 100644 index 0000000..e8ed871 --- /dev/null +++ b/justfile @@ -0,0 +1,22 @@ +default: lint + +pdf-docs: latex-docs + make -C doc-source/build/latex/ + +latex-docs: + SPHINX_BUILDER=latex tox -e docs + +unused-imports: + tox -e lint -- --select F401 + +incomplete-defs: + tox -e lint -- --select MAN + +vdiff: + git diff $(repo-helper show version -q)..HEAD + +bare-ignore: + greppy '# type:? *ignore(?!\[|\w)' -s + +lint: unused-imports incomplete-defs bare-ignore + tox -n qa diff --git a/make_conda_recipe.py b/make_conda_recipe.py index 2857f84..4ea6b53 100755 --- a/make_conda_recipe.py +++ b/make_conda_recipe.py @@ -2,13 +2,15 @@ # This file is managed by `git_helper`. Don't edit it directly +# stdlib import platform -import rst2txt import sys -from docutils.core import publish_file from io import StringIO +# 3rd party +import rst2txt from __pkginfo__ import * +from docutils.core import publish_file recipe_dir = repo_root / "conda" @@ -23,15 +25,16 @@ for requires in extras_require.values(): all_requirements += requires -all_requirements = {x.replace(" ", '') for x in set(all_requirements)} -requirements_block = "\n".join(f" - {req}" for req in all_requirements if req) +all_requirements = {x.replace(' ', '') for x in set(all_requirements)} +requirements_block = '\n'.join(f" - {req}" for req in all_requirements if req) # txt_readme = publish_file(source=StringIO(long_description), writer=rst2txt.Writer()) # description_block = "\n".join([line.replace('"', '\\"') for line in txt_readme.split("\n")]) description_block = conda_description.replace('"', '\\"') -with open(recipe_dir / "meta.yaml", "w") as fp: - fp.write(f"""{{% set name = "{pypi_name}" %}} +with open(recipe_dir / "meta.yaml", 'w') as fp: + fp.write( + f"""{{% set name = "{pypi_name}" %}} {{% set version = "{__version__}" %}} package: @@ -81,7 +84,8 @@ - {author} - github.com/{github_username} -""") +""" + ) print(f"Wrote recipe to {recipe_dir / 'meta.yaml'}") # diff --git a/pyproject.toml b/pyproject.toml index 2e3f2e2..92ecc61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,12 +7,12 @@ name = "notebook2script" version = "0.2.1" description = "Convert Jupyter Notebooks to Python Scripts." readme = "README.rst" -keywords = [ "jupyter-notebook", "utility", "converter",] +keywords = [ "converter", "jupyter-notebook", "utility",] dynamic = [ "requires-python", "classifiers", "dependencies",] [[project.authors]] -email = "dominic@davis-foster.co.uk" name = "Dominic Davis-Foster" +email = "dominic@davis-foster.co.uk" [project.license] @@ -43,3 +43,115 @@ python-implementations = [ "CPython",] platforms = [ "Windows", "macOS", "Linux",] license-key = "GPL-2.0-only" additional-files = [ "include notebook2script/isort.cfg", "include notebook2script/style.yapf",] + +[tool.sphinx-pyproject] +github_username = "PyMassSpec" +github_repository = "notebook2script" +author = "Dominic Davis-Foster" +project = "notebook2script" +copyright = "2020-2021 Dominic Davis-Foster" +language = "en" +package_root = "notebook2script" +extensions = [ + "sphinx_toolbox", + "sphinx_toolbox.more_autodoc", + "sphinx_toolbox.more_autosummary", + "sphinx_toolbox.documentation_summary", + "sphinx_toolbox.tweaks.param_dash", + "sphinxcontrib.toctree_plus", + "sphinx_toolbox.tweaks.latex_layout", + "sphinx_toolbox.tweaks.latex_toc", + "sphinx.ext.intersphinx", + "sphinx.ext.mathjax", + "sphinxcontrib.extras_require", + "sphinx.ext.todo", + "sphinxemoji.sphinxemoji", + "notfound.extension", + "sphinx_copybutton", + "sphinxcontrib.default_values", + "sphinx_debuginfo", + "sphinx_licenseinfo", + "seed_intersphinx_mapping", + "html_section", + "sphinx_click", +] +sphinxemoji_style = "twemoji" +gitstamp_fmt = "%d %b %Y" +templates_path = [ "_templates",] +html_static_path = [ "_static",] +source_suffix = ".rst" +master_doc = "index" +suppress_warnings = [ "image.nonlocal_uri",] +pygments_style = "default" +html_theme = "furo" +html_theme_path = [ "../..",] +html_show_sourcelink = true +toctree_plus_types = [ + "class", + "confval", + "data", + "directive", + "enum", + "exception", + "flag", + "function", + "namedtuple", + "protocol", + "role", + "typeddict", +] +add_module_names = false +hide_none_rtype = true +all_typevars = true +overloads_location = "bottom" +html_codeblock_linenos_style = "table" +autodoc_exclude_members = [ + "__dict__", + "__class__", + "__dir__", + "__weakref__", + "__module__", + "__annotations__", + "__orig_bases__", + "__parameters__", + "__subclasshook__", + "__init_subclass__", + "__attrs_attrs__", + "__init__", + "__new__", + "__getnewargs__", + "__abstractmethods__", + "__hash__", +] + +[tool.mypy] +python_version = "3.6" +namespace_packages = true +check_untyped_defs = true +warn_unused_ignores = true +no_implicit_optional = true +show_error_codes = true + +[tool.snippet-fmt] +directives = [ "code-block",] + +[tool.dependency-dash."requirements.txt"] +order = 10 + +[tool.dependency-dash."tests/requirements.txt"] +order = 20 +include = false + +[tool.dependency-dash."doc-source/requirements.txt"] +order = 30 +include = false + +[tool.snippet-fmt.languages.python] +reformat = true + +[tool.snippet-fmt.languages.TOML] +reformat = true + +[tool.snippet-fmt.languages.ini] + +[tool.snippet-fmt.languages.json] diff --git a/setup.cfg b/setup.cfg index fc8bda3..6dce9ee 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,6 +11,5 @@ python_version = 3.6 namespace_packages = True check_untyped_defs = True warn_unused_ignores = True - -[options.entry_points] -console_scripts = notebook2script = notebook2script.__main__:main +no_implicit_optional = True +show_error_codes = True diff --git a/tests/requirements.txt b/tests/requirements.txt index 721c8ca..9f6f4ab 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,9 +2,10 @@ coincidence>=0.2.0 coverage>=5.1 coverage-pyver-pragma>=0.2.1 domdf-python-tools[testing]>=2.0.1 +importlib-metadata>=3.6.0 iniconfig!=1.1.0,>=1.0.1 pytest>=6.0.0 pytest-cov>=2.8.1 -pytest-randomly>=3.3.1 +pytest-randomly>=3.7.0 pytest-rerunfailures>=9.0 pytest-timeout>=1.4.2 diff --git a/tox.ini b/tox.ini index eae8b5f..41c1575 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,7 @@ # * testenv:docs # * testenv:build # * testenv:lint +# * testenv:perflint # * testenv:mypy # * testenv:pyup # * testenv:coverage @@ -20,9 +21,9 @@ envlist = py36, py37, py38, py39, mypy, build skip_missing_interpreters = True isolated_build = True requires = - pip>=20.3.3 + pip>=21,!=22.2 tox-envlist>=0.2.1 - tox-pip-version>=0.0.7 + virtualenv!=20.16.0 [envlists] test = py36, py37, py38, py39 @@ -30,7 +31,9 @@ qa = mypy, lint cov = py36, coverage [testenv] -setenv = PYTHONDEVMODE = 1 +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 deps = -r{toxinidir}/tests/requirements.txt commands = python --version @@ -38,11 +41,11 @@ commands = [testenv:docs] setenv = SHOW_TODOS = 1 +passenv = SPHINX_BUILDER basepython = python3.8 -pip_version = pip>=21 changedir = {toxinidir}/doc-source deps = -r{toxinidir}/doc-source/requirements.txt -commands = sphinx-build -M html . ./build {posargs} +commands = sphinx-build -M {env:SPHINX_BUILDER:html} . ./build {posargs} [testenv:build] skip_install = True @@ -62,26 +65,38 @@ changedir = {toxinidir} ignore_errors = True skip_install = True deps = - flake8 >=3.8.2 - flake8-2020 >= 1.6.0 + flake8>=3.8.2,<5 + flake8-2020>=1.6.0 flake8-builtins>=1.5.3 flake8-docstrings>=1.5.0 flake8-dunder-all>=0.1.1 flake8-encodings>=0.1.0 flake8-github-actions>=0.1.0 - flake8-pyi>=20.10.0 + flake8-noqa>=1.1.0,<=1.2.2 + flake8-pyi>=20.10.0,<=22.8.0 flake8-pytest-style>=1.3.0 + flake8-quotes>=3.3.0 flake8-slots>=0.1.0 flake8-sphinx-links>=0.0.4 flake8-strftime>=0.1.1 flake8-typing-imports>=1.10.0 - git+https://github.com/domdfcoding/flake8-quotes.git git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git git+https://github.com/domdfcoding/flake8-rst-docstrings.git + git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods + git+https://github.com/python-formate/flake8-missing-annotations.git pydocstyle>=6.0.0 pygments>=2.7.1 + importlib_metadata<4.5.0; python_version<'3.8' commands = python3 -m flake8_rst_docstrings_sphinx notebook2script tests --allow-toolbox {posargs} +[testenv:perflint] +basepython = python3.6 +changedir = {toxinidir} +ignore_errors = True +skip_install = True +deps = perflint +commands = python3 -m perflint notebook2script {posargs} + [testenv:mypy] basepython = python3.6 ignore_errors = True @@ -104,6 +119,10 @@ basepython = python3.6 skip_install = True ignore_errors = True whitelist_externals = /bin/bash +passenv = + COV_PYTHON_VERSION + COV_PLATFORM + COV_PYTHON_IMPLEMENTATION changedir = {toxinidir} deps = coverage>=5 @@ -115,12 +134,15 @@ commands = [flake8] max-line-length = 120 -select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002 +select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 NQA001 NQA002 NQA003 NQA004 NQA005 NQA102 NQA103 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002 extend-exclude = doc-source,old,build,dist,__pkginfo__.py,setup.py,venv rst-directives = TODO envvar extras-require + license + license-info +rst-roles = choosealicense per-file-ignores = tests/*: D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002 */*.pyi: E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002 @@ -130,6 +152,10 @@ multiline-quotes = """ docstring-quotes = """ count = True min_python_version = 3.6.1 +unused-arguments-ignore-abstract-functions = True +unused-arguments-ignore-overload-functions = True +unused-arguments-ignore-magic-methods = True +unused-arguments-ignore-variadic-names = True [coverage:run] plugins = coverage_pyver_pragma