diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 1bcd9a4..5609cf9 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.7,pypy-3.6,pypy-3.7,pypy-3.8' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-beta.3,pypy-3.6,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - - {python-version: "3.11.0-alpha.7", testenvs: "py311-dev,build", experimental: True} + - {python-version: "3.11.0-beta.3", testenvs: "py311-dev,build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True} diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 0257bf3..4c05ece 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.7,pypy-3.6,pypy-3.7,pypy-3.8' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-beta.3,pypy-3.6,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -34,7 +34,7 @@ jobs: - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - - {python-version: "3.11.0-alpha.7", testenvs: "py311-dev,build", experimental: True} + - {python-version: "3.11.0-beta.3", testenvs: "py311-dev,build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True} diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index d9eb795..c8d35c5 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.7,pypy-3.7,pypy-3.8' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-beta.3,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - - {python-version: "3.11.0-alpha.7", testenvs: "py311-dev,build", experimental: True} + - {python-version: "3.11.0-beta.3", testenvs: "py311-dev,build", experimental: True} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e3bcd76..1f452f4 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.3 + rev: v0.6.1 hooks: - id: reformat-pyproject @@ -40,7 +40,7 @@ repos: - id: bind-requirements - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.1.8 + rev: v0.2.1 hooks: - id: ensure-dunder-all files: ^dom_toml/.*\.py$ @@ -67,7 +67,7 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.13 + rev: v1.2.0 hooks: - id: remove-crlf - id: forbid-crlf diff --git a/doc-source/conf.py b/doc-source/conf.py index 2cc7ed9..4b1df0d 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/justfile b/justfile index f3b215e..e8ed871 100644 --- a/justfile +++ b/justfile @@ -10,8 +10,7 @@ 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 + tox -e lint -- --select MAN vdiff: git diff $(repo-helper show version -q)..HEAD diff --git a/pyproject.toml b/pyproject.toml index f8f4f54..e294f5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,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", @@ -72,7 +73,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 32a2628..eb7253a 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 @@ -50,6 +51,7 @@ commands = [testenv:docs] setenv = SHOW_TODOS = 1 +passenv = SPHINX_BUILDER basepython = python3.8 changedir = {toxinidir}/doc-source deps = -r{toxinidir}/doc-source/requirements.txt @@ -91,11 +93,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 dom_toml tests --allow-toolbox {posargs} +[testenv:perflint] +basepython = python3.6 +changedir = {toxinidir} +ignore_errors = True +skip_install = True +deps = perflint +commands = python3 -m perflint dom_toml {posargs} + [testenv:mypy] basepython = python3.6 ignore_errors = True