diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 1fe9ed1..5da3bb1 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -20,6 +20,7 @@ jobs: fail-fast: false matrix: py: + - "3.13" - "3.12" - "3.11" - "3.10" @@ -39,18 +40,11 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.py }} - - name: Pick environment to run - run: | - import codecs; import os; import sys - env = "TOXENV=py{}{}\n".format(*sys.version_info[0:2]) - print("Picked:\n{}for{}".format(env, sys.version)) - with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler: - file_handler.write(env) - shell: python + allow-prereleases: true - name: setup test suite - run: tox -vv --notest + run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.py }} - name: run test suite - run: tox --skip-pkg-install + run: tox run --skip-pkg-install -e ${{ matrix.py }} check: name: tox env ${{ matrix.tox_env }} @@ -72,7 +66,7 @@ jobs: python-version: "3.12" - name: install tox run: uv pip install tox tox-uv --system - - name: run check for ${{ matrix.tox_env }} - run: python -m tox -e ${{ matrix.tox_env }} - env: - UPGRADE_ADVISORY: "yes" + - name: Setup test suite + run: tox -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }} + - name: Run test suite + run: tox --skip-pkg-install -e ${{ matrix.tox_env }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e101497..d42a3ab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,14 +8,14 @@ repos: rev: 0.29.2 hooks: - id: check-github-workflows - args: [ "--verbose" ] + args: ["--verbose"] - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: - id: codespell - args: ["--write-changes"] + additional_dependencies: ["tomli>=2.0.1"] - repo: https://github.com/tox-dev/tox-ini-fmt - rev: "1.3.1" + rev: "1.3.2" hooks: - id: tox-ini-fmt args: ["-p", "fix"] @@ -24,11 +24,18 @@ repos: hooks: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.6.3" + rev: "v0.6.4" hooks: - id: ruff-format - id: ruff args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"] + - repo: https://github.com/rbubley/mirrors-prettier + rev: "v3.3.3" + hooks: + - id: prettier + additional_dependencies: + - prettier@3.3.3 + - "@prettier/plugin-xml@3.4.1" - repo: meta hooks: - id: check-hooks-apply diff --git a/.readthedocs.yml b/.readthedocs.yml index 98529f0..68e7e75 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,6 +4,6 @@ build: tools: python: "3.12" commands: - - pip install tox-uv - - tox r -e docs -vv --notest - - tox r -e docs --skip-pkg-install -- "${READTHEDOCS_OUTPUT}"/html + - pip install tox-uv + - tox r -e docs -vv --notest + - tox r -e docs --skip-pkg-install -- "${READTHEDOCS_OUTPUT}"/html diff --git a/pyproject.toml b/pyproject.toml index c5d5ed2..9c618bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,10 +37,10 @@ dependencies = [ "tomli>=2.0.1; python_version<'3.11'", ] optional-dependencies.docs = [ - "furo>=2024.7.18", - "sphinx>=7.4.4", - "sphinx-argparse-cli>=1.16", - "sphinx-autodoc-typehints>=2.2.3", + "furo>=2024.8.6", + "sphinx>=8.0.2", + "sphinx-argparse-cli>=1.17", + "sphinx-autodoc-typehints>=2.4", "sphinx-copybutton>=0.5.2", ] optional-dependencies.test = [ @@ -83,19 +83,20 @@ lint.ignore = [ "CPY", # No copyright statements "D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible "D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible + "DOC", # not supported "DOC501", # not working with Sphinx "ISC001", # Conflict with formatter "S104", # Possible binding to all interfaces ] lint.per-file-ignores."tests/**/*.py" = [ - "D", # don"t care about documentation in tests - "FBT", # don"t care about booleans as positional arguments in tests + "D", # don't care about documentation in tests + "FBT", # don't care about booleans as positional arguments in tests "INP001", # no implicit namespace "PLC2701", # private import "PLR0913", # any number of arguments in tests "PLR0917", # any number of arguments in tests "PLR2004", # Magic value used in comparison, consider replacing with a constant variable - "S101", # asserts allowed in tests... + "S101", # asserts allowed in tests "S603", # `subprocess` call: check for execution of untrusted input ] lint.isort = { known-first-party = [ diff --git a/tox.ini b/tox.ini index b6293d3..959a0a4 100644 --- a/tox.ini +++ b/tox.ini @@ -3,14 +3,15 @@ requires = tox>=4.2 env_list = fix - py312 - py311 - py310 - py39 - py38 type readme docs + 3.13 + 3.12 + 3.11 + 3.10 + 3.9 + 3.8 skip_missing_interpreters = true [testenv] @@ -43,9 +44,7 @@ commands = [testenv:type] description = run type check on code base deps = - mypy==1.11.1 -set_env = - {tty:MYPY_FORCE_COLOR = 1} + mypy==1.11.2 commands = mypy src mypy tests @@ -54,10 +53,10 @@ commands = description = check that the long description is valid skip_install = true deps = - build[virtualenv]>=1.2.1 + build[uv]>=1.2.2 twine>=5.1.1 commands = - python -m build --sdist --wheel -o {envtmpdir} . + pyproject-build --installer uv --sdist --wheel -o {envtmpdir} . twine check {envtmpdir}/* [testenv:docs] @@ -77,6 +76,8 @@ extras = docs test commands = - python -m pip list --format=columns + uv pip tree python -c 'import sys; print(sys.executable)' -uv_seed = true + +[tool.pyproject-fmt] +max_supported_python = "3.13"