From afea0f1487df476b2755eb2304a38e126958e7db Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 10 May 2022 11:33:45 +0000 Subject: [PATCH] Updated files with 'repo_helper'. --- .bumpversion.cfg | 6 +- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/actions_build_conda.sh | 23 ----- .github/actions_deploy_conda.sh | 24 ------ .github/milestones.py | 28 +++++++ .github/stale.yml | 12 +-- .github/workflows/cleanup.yml | 14 ---- .github/workflows/conda_ci.yml | 44 +++++++--- .github/workflows/docs_test_action.yml | 27 +++++- .github/workflows/flake8.yml | 24 +++++- .github/workflows/mypy.yml | 21 ++++- .github/workflows/octocheese.yml | 4 +- .github/workflows/python_ci.yml | 33 +++++++- .github/workflows/python_ci_linux.yml | 97 +++++++++++++++++---- .github/workflows/python_ci_macos.yml | 34 ++++++-- .pre-commit-config.yaml | 24 ++++-- .pylintrc | 2 +- README.rst | 6 +- __pkginfo__.py | 20 ----- doc-source/Source.rst | 25 +++--- doc-source/_static/style.css | 5 ++ doc-source/conf.py | 102 +++++------------------ doc-source/index.rst | 14 +++- doc-source/license.rst | 10 +++ doc-source/requirements.txt | 9 +- justfile | 23 +++++ pyproject.toml | 111 +++++++++++++++++++++++++ setup.cfg | 2 + tox.ini | 28 +++++-- 29 files changed, 517 insertions(+), 257 deletions(-) delete mode 100755 .github/actions_build_conda.sh delete mode 100755 .github/actions_deploy_conda.sh create mode 100755 .github/milestones.py delete mode 100644 .github/workflows/cleanup.yml delete mode 100644 __pkginfo__.py create mode 100644 doc-source/license.rst create mode 100644 justfile diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 3e24dfb..bf995fe 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -5,8 +5,6 @@ tag = True [bumpversion:file:repo_helper.yml] -[bumpversion:file:__pkginfo__.py] - [bumpversion:file:README.rst] [bumpversion:file:doc-source/index.rst] @@ -16,3 +14,7 @@ search: __version__: str = "{current_version}" replace: __version__: str = "{new_version}" [bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" + +[bumpversion:file:.github/workflows/conda_ci.yml] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 5026890..fc630d4 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. * Southwark: ## Installation source - + ## Other Additional Information: diff --git a/.github/actions_build_conda.sh b/.github/actions_build_conda.sh deleted file mode 100755 index 4983f89..0000000 --- a/.github/actions_build_conda.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# This file is managed by 'repo_helper'. Don't edit it directly. - -set -e -x - -python -m mkrecipe || exit 1 - -# Switch to miniconda -source "/home/runner/miniconda/etc/profile.d/conda.sh" -hash -r -conda activate base -conda config --set always_yes yes --set changeps1 no -conda update -q conda -conda install conda-build -conda install anaconda-client -conda info -a - -conda config --add channels conda-forge || exit 1 -conda config --add channels domdfcoding || exit 1 - -conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist --skip-existing - -exit 0 diff --git a/.github/actions_deploy_conda.sh b/.github/actions_deploy_conda.sh deleted file mode 100755 index ed87941..0000000 --- a/.github/actions_deploy_conda.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# This file is managed by 'repo_helper'. Don't edit it directly. - -set -e -x - -# Switch to miniconda -source "/home/runner/miniconda/etc/profile.d/conda.sh" -hash -r -conda activate base -conda config --set always_yes yes --set changeps1 no -conda update -q conda -conda install anaconda-client -conda info -a - -for f in conda/dist/noarch/southwark-*.tar.bz2; do - [ -e "$f" ] || continue - echo "$f" - conda install "$f" || exit 1 - echo "Deploying to Anaconda.org..." - anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1 - echo "Successfully deployed to Anaconda.org." -done - -exit 0 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/conda_ci.yml b/.github/workflows/conda_ci.yml index c9fd02a..1444116 100644 --- a/.github/workflows/conda_ci.yml +++ b/.github/workflows/conda_ci.yml @@ -6,10 +6,16 @@ on: push: branches: ["master"] +permissions: + contents: read + jobs: tests: name: "Conda" - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 + defaults: + run: + shell: bash -l {0} steps: - name: Checkout 🛎️ @@ -20,24 +26,40 @@ jobs: with: python-version: "3.8" + - name: Setup Conda + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: env + conda-build-version: 3.21.0 + - name: Install dependencies 🔧 run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade repo_helper + python -m pip install --upgrade "whey-conda" "whey" # $CONDA is an environment variable pointing to the root of the miniconda directory - $CONDA/bin/conda update -q conda - $CONDA/bin/conda install conda-build=3.21.0 - + $CONDA/bin/conda update -n base conda $CONDA/bin/conda config --add channels conda-forge $CONDA/bin/conda config --add channels domdfcoding - - name: "Build and install package" + - name: "Build and index channel" run: | - # This mess is only necessary because conda won't fix it themselves - # https://github.com/conda/conda/issues/1884 - - python -m repo_helper build --conda --out-dir conda-bld/noarch + python -m whey --builder whey_conda --out-dir conda-bld/noarch $CONDA/bin/conda index ./conda-bld || exit 1 - $CONDA/bin/conda install -c file://$(pwd)/conda-bld southwark -y || exit 1 + + - name: "Search for package" + run: | + $CONDA/bin/conda search -c file://$(pwd)/conda-bld southwark + $CONDA/bin/conda search -c file://$(pwd)/conda-bld --override-channels southwark + + - name: "Install package" + run: | + $CONDA/bin/conda install -c file://$(pwd)/conda-bld southwark=0.8.1=py_1 -y || exit 1 + + - name: "Run Tests" + run: | + rm -rf southwark + $CONDA/bin/conda install pytest coincidence || exit 1 + pip install -r tests/requirements.txt + pytest tests/ 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..5a7324b 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" @@ -32,4 +50,5 @@ jobs: python -m pip install --upgrade tox virtualenv - 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 b574947..cb2cef3 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 24a2994..090f95a 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: @@ -11,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.7,pypy-3.6,pypy-3.7' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,pypy-3.6,pypy-3.7' strategy: fail-fast: False @@ -21,7 +32,7 @@ jobs: - {python-version: "3.7", testenvs: "py37,build", experimental: False} - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - - {python-version: "3.10.0-alpha.7", testenvs: "py310-dev,build", experimental: True} + - {python-version: "3.10", testenvs: "py310-dev,build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} @@ -29,12 +40,25 @@ 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 @@ -42,11 +66,12 @@ jobs: python -m pip install --upgrade tox virtualenv - 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 b2c541e..cae6cf8 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: @@ -11,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.7,pypy-3.6,pypy-3.7' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,pypy-3.6,pypy-3.7' strategy: fail-fast: False @@ -21,7 +33,7 @@ jobs: - {python-version: "3.7", testenvs: "py37,build", experimental: False} - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - - {python-version: "3.10.0-alpha.7", testenvs: "py310-dev,build", experimental: True} + - {python-version: "3.10", testenvs: "py310-dev,build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} @@ -29,12 +41,25 @@ 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 @@ -43,11 +68,12 @@ jobs: 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 @@ -76,21 +102,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: | @@ -107,21 +138,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/') @@ -131,11 +162,19 @@ jobs: 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 }} + Conda: needs: deploy - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-18.04" if: startsWith(github.ref, 'refs/tags/') || (startsWith(github.event.head_commit.message, 'Bump version') != true) steps: - name: Checkout 🛎️ @@ -146,22 +185,46 @@ jobs: with: python-version: 3.8 + - name: Setup Conda + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: env + conda-build-version: 3.21.0 + - name: Install dependencies 🔧 run: | + python -VV + python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade mkrecipe + python -m pip install --upgrade "mkrecipe" "whey" + # $CONDA is an environment variable pointing to the root of the miniconda directory + $CONDA/bin/conda config --set always_yes yes --set changeps1 no + $CONDA/bin/conda update -n base conda + $CONDA/bin/conda info -a + $CONDA/bin/conda config --add channels conda-forge + $CONDA/bin/conda config --add channels domdfcoding - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh - bash miniconda.sh -b -p $HOME/miniconda + $CONDA/bin/conda config --remove channels defaults - - name: Build Conda 📦 + - name: Build Conda Package 📦 run: | - chmod +x .github/actions_build_conda.sh - bash .github/actions_build_conda.sh + python -m mkrecipe --type wheel || exit 1 + $CONDA/bin/conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist - - name: Deploy Conda 🚀 + - name: Deploy Conda Package 🚀 + if: startsWith(github.ref, 'refs/tags/') run: | - chmod +x .github/actions_deploy_conda.sh - bash .github/actions_deploy_conda.sh + $CONDA/bin/conda config --set always_yes yes --set changeps1 no + $CONDA/bin/conda install anaconda-client + $CONDA/bin/conda info -a + + for f in conda/dist/noarch/southwark-*.tar.bz2; do + [ -e "$f" ] || continue + echo "$f" + conda install "$f" || exit 1 + echo "Deploying to Anaconda.org..." + $CONDA/bin/anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1 + echo "Successfully deployed to Anaconda.org." + done env: ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index d80399f..2d540e0 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: @@ -11,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.7,pypy-3.6,pypy-3.7' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,pypy-3.7' strategy: fail-fast: False @@ -21,20 +32,32 @@ jobs: - {python-version: "3.7", testenvs: "py37,build", experimental: False} - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - - {python-version: "3.10.0-alpha.7", testenvs: "py310-dev,build", experimental: True} - - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False} + - {python-version: "3.10", testenvs: "py310-dev,build", experimental: True} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} steps: - 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 @@ -42,11 +65,12 @@ jobs: python -m pip install --upgrade tox virtualenv - 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 4338c08..1984f0e 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.5.0 + hooks: + - id: reformat-pyproject + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.4.0 hooks: @@ -25,7 +30,7 @@ repos: - id: end-of-file-fixer - repo: https://github.com/domdfcoding/pre-commit-hooks - rev: v0.2.1 + rev: v0.3.0 hooks: - id: requirements-txt-sorter args: @@ -35,18 +40,18 @@ repos: - id: bind-requirements - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.1.7 + rev: v0.2.0 hooks: - id: ensure-dunder-all files: ^southwark/.*\.py$ - repo: https://github.com/domdfcoding/flake2lint - rev: v0.4.0 + rev: v0.4.1 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,13 +67,18 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.9 + rev: v1.1.13 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__|setup)\.(_)?py$ 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 334c435..050188d 100644 --- a/README.rst +++ b/README.rst @@ -61,8 +61,8 @@ Spun out from `repo_helper `_. Needs :target: https://github.com/domdfcoding/southwark/actions?query=workflow%3A%22mypy%22 :alt: mypy status -.. |requires| image:: https://requires.io/github/domdfcoding/southwark/requirements.svg?branch=master - :target: https://requires.io/github/domdfcoding/southwark/requirements/?branch=master +.. |requires| image:: https://dependency-dash.herokuapp.com/github/domdfcoding/southwark/badge.svg + :target: https://dependency-dash.herokuapp.com/github/domdfcoding/southwark/ :alt: Requirements Status .. |coveralls| image:: https://img.shields.io/coveralls/github/domdfcoding/southwark/master?logo=coveralls @@ -112,7 +112,7 @@ Spun out from `repo_helper `_. Needs :target: https://github.com/domdfcoding/southwark/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/Southwark diff --git a/__pkginfo__.py b/__pkginfo__.py deleted file mode 100644 index 7c1ddd9..0000000 --- a/__pkginfo__.py +++ /dev/null @@ -1,20 +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 -# - -__all__ = [ - "__version__", - "extras_require", - ] - -__version__ = "0.8.1" -extras_require = {} diff --git a/doc-source/Source.rst b/doc-source/Source.rst index cc01eee..170602a 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/domdfcoding/south If you have ``git`` installed, you can clone the repository with the following command: -.. code-block:: bash +.. prompt:: bash + + git clone https://github.com/domdfcoding/southwark + +.. parsed-literal:: - $ git clone https://github.com/domdfcoding/southwark" - > Cloning into 'southwark'... - > 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 'southwark'... + 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 e69de29..0515b08 100644 --- a/doc-source/_static/style.css +++ b/doc-source/_static/style.css @@ -0,0 +1,5 @@ +/* This file is managed by 'repo_helper'. Don't edit it directly. */ + +.longtable.autosummary { + width: 100%; +} diff --git a/doc-source/conf.py b/doc-source/conf.py index 281ac55..04de337 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -12,86 +12,12 @@ sys.path.append('.') -config = SphinxConfig() - -github_username = "domdfcoding" -github_repository = "southwark" -author = "Dominic Davis-Foster" -project = "Southwark" -copyright = "2020 Dominic Davis-Foster" -language = "en" -package_root = "southwark" -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", - ] -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 = "domdf_sphinx_theme" -html_theme_path = ["../.."] -html_show_sourcelink = True -toctree_plus_types = [ - "class", - "confval", - "data", - "directive", - "enum", - "exception", - "flag", - "function", - "method", - "namedtuple", - "protocol", - "role", - "typeddict", - ] -add_module_names = False -hide_none_rtype = True -all_typevars = True -overloads_location = "bottom" -documentation_summary = "Extensions to the Dulwich Git library." -autodoc_exclude_members = [ - "__dict__", - "__class__", - "__dir__", - "__weakref__", - "__module__", - "__annotations__", - "__orig_bases__", - "__parameters__", - "__subclasshook__", - "__init_subclass__", - "__attrs_attrs__", - "__init__", - "__new__", - "__getnewargs__", - "__abstractmethods__", - "__hash__", - ] - -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:: Southwark .. |pkgname2| replace:: ``Southwark`` @@ -123,12 +49,24 @@ man_pages = [("index", slug, project, [author], 1)] texinfo_documents = [("index", slug, project, author, slug, project, "Miscellaneous")] -toctree_plus_types = set(toctree_plus_types) +toctree_plus_types = set(config["toctree_plus_types"]) 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 b418f6f..a3aa7f4 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -5,6 +5,7 @@ Southwark .. start short_desc .. documentation-summary:: + :meta: .. end short_desc @@ -63,7 +64,8 @@ Spun out from `repo_helper `_. Needs :workflow: mypy :alt: mypy status - .. |requires| requires-io-shield:: + .. |requires| image:: https://dependency-dash.herokuapp.com/github/domdfcoding/southwark/badge.svg + :target: https://dependency-dash.herokuapp.com/github/domdfcoding/southwark/ :alt: Requirements Status .. |coveralls| coveralls-shield:: @@ -116,7 +118,7 @@ Spun out from `repo_helper `_. Needs :last-commit: :alt: GitHub last commit - .. |maintained| maintained-shield:: 2021 + .. |maintained| maintained-shield:: 2022 :alt: Maintenance .. |pypi-downloads| pypi-shield:: @@ -159,12 +161,18 @@ Installation contributing Source +.. sidebar-links:: + :caption: Links + :github: + :pypi: Southwark + + .. 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..8a27775 --- /dev/null +++ b/doc-source/license.rst @@ -0,0 +1,10 @@ +========= +License +========= + +``Southwark`` is licensed under the :choosealicense:`MIT` + +.. license-info:: MIT + +.. license:: + :py: Southwark diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index 5b8662f..4ef5004 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -1,16 +1,17 @@ -autodocsumm>=0.2.0 -default-values>=0.4.2 +default-values>=0.5.0 domdf-sphinx-theme>=0.3.0 extras-require>=0.2.0 +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/justfile b/justfile new file mode 100644 index 0000000..f3b215e --- /dev/null +++ b/justfile @@ -0,0 +1,23 @@ +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: + #!/usr/bin/env bash + tox -e mypy -- --disallow-incomplete-defs --disallow-untyped-defs | grep "Function is missing a .* annotation" || exit 0 + +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/pyproject.toml b/pyproject.toml index c0cd74a..3a52580 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,3 +42,114 @@ package = "southwark" [tool.mkrecipe] conda-channels = [ "conda-forge", "domdfcoding",] extras = "all" + +[tool.sphinx-pyproject] +github_username = "domdfcoding" +github_repository = "southwark" +author = "Dominic Davis-Foster" +project = "Southwark" +copyright = "2020 Dominic Davis-Foster" +language = "en" +package_root = "southwark" +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", +] +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 = "domdf_sphinx_theme" +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 cd5c33a..6dce9ee 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,3 +11,5 @@ python_version = 3.6 namespace_packages = True check_untyped_defs = True warn_unused_ignores = True +no_implicit_optional = True +show_error_codes = True diff --git a/tox.ini b/tox.ini index 9179a0d..779cd1b 100644 --- a/tox.ini +++ b/tox.ini @@ -20,9 +20,8 @@ envlist = py36, py37, py38, py39, py310-dev, pypy36, pypy37, mypy, build skip_missing_interpreters = True isolated_build = True requires = - pip>=20.3.3 + pip>=21 tox-envlist>=0.2.1 - tox-pip-version>=0.0.7 [envlists] test = py36, py37, py38, py39, py310-dev, pypy36, pypy37 @@ -30,7 +29,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 @@ -39,10 +40,9 @@ commands = [testenv:docs] setenv = SHOW_TODOS = 1 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,24 +62,27 @@ changedir = {toxinidir} ignore_errors = True skip_install = True deps = - flake8 >=3.8.2 - flake8-2020 >= 1.6.0 + flake8>=3.8.2 + 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-noqa>=1.1.0 flake8-pyi>=20.10.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 pydocstyle>=6.0.0 pygments>=2.7.1 + importlib_metadata<4.5.0; python_version<'3.8' commands = python3 -m flake8_rst_docstrings_sphinx southwark tests --allow-toolbox {posargs} [testenv:mypy] @@ -120,12 +123,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 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 @@ -135,6 +141,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