diff --git a/.github/stale.yml b/.github/stale.yml index e5625b7..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: [] @@ -31,10 +31,10 @@ exemptAssignees: false 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/flake8.yml b/.github/workflows/flake8.yml index 84e9436..4b47d24 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -16,7 +16,7 @@ permissions: jobs: Run: name: "Flake8" - runs-on: "ubuntu-18.04" + runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 5a7324b..db8ab06 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -47,7 +47,7 @@ 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" if: steps.changes.outputs.code == 'true' diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index b765b45..a22eeea 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,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,3.11.0-alpha.6,pypy-3.6,pypy-3.7,pypy-3.8' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-rc.1,pypy-3.6,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: False} - {python-version: "3.9", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: False} - {python-version: "3.10", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: False} - - {python-version: "3.11.0-alpha.6", testenvs: "py311-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: True} + - {python-version: "3.11.0-rc.1", testenvs: "py311-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36-sphinx{4.0,4.1,4.2,4.3,4.4,latest},build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37-sphinx{4.0,4.1,4.2,4.3,4.4,latest},build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38-sphinx{4.0,4.1,4.2,4.3,4.4,latest},build", experimental: True} @@ -65,7 +65,7 @@ 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 Tests for Python ${{ matrix.config.python-version }}" if: steps.setup-python.outcome == 'success' diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index a9dcced..e2da304 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,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,3.11.0-alpha.6,pypy-3.6,pypy-3.7,pypy-3.8' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-rc.1,pypy-3.6,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -34,7 +34,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: False} - {python-version: "3.9", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: False} - {python-version: "3.10", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: False} - - {python-version: "3.11.0-alpha.6", testenvs: "py311-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: True} + - {python-version: "3.11.0-rc.1", testenvs: "py311-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36-sphinx{4.0,4.1,4.2,4.3,4.4,latest},build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37-sphinx{4.0,4.1,4.2,4.3,4.4,latest},build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38-sphinx{4.0,4.1,4.2,4.3,4.4,latest},build", experimental: True} @@ -66,7 +66,7 @@ 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 python -m pip install --upgrade coverage_pyver_pragma - name: "Run Tests for Python ${{ matrix.config.python-version }}" diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 4ff1f32..e59ac12 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,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,3.11.0-alpha.6,pypy-3.7,pypy-3.8' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-rc.1,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: False} - {python-version: "3.9", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: False} - {python-version: "3.10", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: False} - - {python-version: "3.11.0-alpha.6", testenvs: "py311-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: True} + - {python-version: "3.11.0-rc.1", testenvs: "py311-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,latest},build", experimental: True} - {python-version: "pypy-3.7", testenvs: "pypy37-sphinx{4.0,4.1,4.2,4.3,4.4,latest},build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38-sphinx{4.0,4.1,4.2,4.3,4.4,latest},build", experimental: True} @@ -64,7 +64,7 @@ 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 Tests for Python ${{ matrix.config.python-version }}" if: steps.setup-python.outcome == 'success' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index af7fd12..4291253 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ exclude: ^$ repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.4.2 + rev: v0.7.0 hooks: - id: reformat-pyproject @@ -30,7 +30,7 @@ repos: - id: end-of-file-fixer - repo: https://github.com/domdfcoding/pre-commit-hooks - rev: v0.3.0 + rev: v0.4.0 hooks: - id: requirements-txt-sorter args: @@ -40,13 +40,13 @@ repos: - id: bind-requirements - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.1.8 + rev: v0.2.2 hooks: - id: ensure-dunder-all files: ^enum_tools/.*\.py$ - repo: https://github.com/domdfcoding/flake2lint - rev: v0.4.1 + rev: v0.4.2 hooks: - id: flake2lint @@ -67,7 +67,7 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.11 + rev: v1.3.1 hooks: - id: remove-crlf - id: forbid-crlf @@ -78,13 +78,13 @@ repos: - id: snippet-fmt - repo: https://github.com/python-formate/formate - rev: v0.4.9 + rev: v0.4.10 hooks: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ - repo: https://github.com/domdfcoding/dep_checker - rev: v0.6.2 + rev: v0.7.0 hooks: - id: dep_checker args: diff --git a/README.rst b/README.rst index 48bdc68..426b3dd 100644 --- a/README.rst +++ b/README.rst @@ -58,8 +58,8 @@ Enum Tools :target: https://github.com/domdfcoding/enum_tools/actions?query=workflow%3A%22mypy%22 :alt: mypy status -.. |requires| image:: https://dependency-dash.herokuapp.com/github/domdfcoding/enum_tools/badge.svg - :target: https://dependency-dash.herokuapp.com/github/domdfcoding/enum_tools/ +.. |requires| image:: https://dependency-dash.repo-helper.uk/github/domdfcoding/enum_tools/badge.svg + :target: https://dependency-dash.repo-helper.uk/github/domdfcoding/enum_tools/ :alt: Requirements Status .. |coveralls| image:: https://img.shields.io/coveralls/github/domdfcoding/enum_tools/master?logo=coveralls diff --git a/doc-source/conf.py b/doc-source/conf.py index 449f177..19821cd 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -27,7 +27,8 @@ slug = re.sub(r'\W+', '-', project.lower()) release = version = config.version -todo_include_todos = bool(os.environ.get("SHOW_TODOS", 0)) +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), diff --git a/doc-source/index.rst b/doc-source/index.rst index 2ccb9a4..9914952 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -69,8 +69,8 @@ Enum Tools :workflow: mypy :alt: mypy status - .. |requires| image:: https://dependency-dash.herokuapp.com/github/domdfcoding/enum_tools/badge.svg - :target: https://dependency-dash.herokuapp.com/github/domdfcoding/enum_tools/ + .. |requires| image:: https://dependency-dash.repo-helper.uk/github/domdfcoding/enum_tools/badge.svg + :target: https://dependency-dash.repo-helper.uk/github/domdfcoding/enum_tools/ :alt: Requirements Status .. |coveralls| coveralls-shield:: 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/pyproject.toml b/pyproject.toml index e061874..34d7702 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,7 @@ extensions = [ "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", @@ -75,7 +76,6 @@ extensions = [ "notfound.extension", "sphinx_copybutton", "sphinxcontrib.default_values", - "sphinxcontrib.toctree_plus", "sphinx_debuginfo", "sphinx_licenseinfo", "seed_intersphinx_mapping", diff --git a/tox.ini b/tox.ini index 071d89f..9154f8b 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 @@ -31,8 +32,9 @@ envlist = skip_missing_interpreters = True isolated_build = True requires = - pip>=21 + pip>=21,!=22.2 tox-envlist>=0.2.1 + virtualenv!=20.16.0 [envlists] test = @@ -52,6 +54,7 @@ cov = py36-sphinx3.2, coverage setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 + SETUPTOOLS_USE_DISTUTILS=stdlib deps = -r{toxinidir}/tests/requirements.txt sphinx3.2: sphinx~=3.2.0 @@ -71,6 +74,7 @@ commands = [testenv:docs] setenv = SHOW_TODOS = 1 +passenv = SPHINX_BUILDER basepython = python3.8 changedir = {toxinidir}/doc-source extras = all @@ -95,15 +99,15 @@ changedir = {toxinidir} ignore_errors = True skip_install = True deps = - flake8>=3.8.2 + 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-noqa>=1.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 @@ -113,11 +117,20 @@ deps = 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 enum_tools tests --allow-toolbox {posargs} +[testenv:perflint] +basepython = python3.6 +changedir = {toxinidir} +ignore_errors = True +skip_install = True +deps = perflint +commands = python3 -m perflint enum_tools {posargs} + [testenv:mypy] basepython = python3.6 ignore_errors = True @@ -147,6 +160,7 @@ passenv = COV_PYTHON_VERSION COV_PLATFORM COV_PYTHON_IMPLEMENTATION + * changedir = {toxinidir} deps = coverage>=5