diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 246700e..87788dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.3.0 hooks: - id: black args: [--safe] @@ -30,13 +30,13 @@ repos: rev: 1.13.0 hooks: - id: blacken-docs - additional_dependencies: [black==23.1] + additional_dependencies: [black==23.3] - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 hooks: - id: rst-backticks - repo: https://github.com/tox-dev/tox-ini-fmt - rev: "0.6.1" + rev: "1.3.0" hooks: - id: tox-ini-fmt args: ["-p", "fix"] @@ -45,7 +45,7 @@ repos: hooks: - id: flake8 additional_dependencies: - - flake8-bugbear==23.3.12 + - flake8-bugbear==23.3.23 - flake8-comprehensions==3.11.1 - flake8-pytest-style==1.7.2 - flake8-spellcheck==0.28 diff --git a/pyproject.toml b/pyproject.toml index 558a221..4e94490 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ build-backend = "hatchling.build" requires = [ "hatch-vcs>=0.3", - "hatchling>=1.13", + "hatchling>=1.14", ] [project] @@ -40,13 +40,13 @@ dependencies = [ 'tomli>=2.0.1; python_version < "3.11"', ] optional-dependencies.docs = [ - "furo>=2022.12.7", + "furo>=2023.3.27", "sphinx>=6.1.3", "sphinx-autodoc-typehints!=1.23.4,>=1.22", ] optional-dependencies.testing = [ "covdefaults>=2.3", - 'importlib-metadata>=6.1; python_version < "3.8"', + 'importlib-metadata>=6.2; python_version < "3.8"', "pytest>=7.2.2", "pytest-cov>=4", "pytest-mock>=3.10", diff --git a/tox.ini b/tox.ini index decc76b..a104d80 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,7 @@ [tox] -envlist = +requires = + tox>=4.2 +env_list = fix py311 py310 @@ -9,19 +11,19 @@ envlist = type docs pkg_meta -isolated_build = true skip_missing_interpreters = true -minversion = 3.22 [testenv] description = run the tests with pytest under {envname} -passenv = +package = wheel +wheel_build_env = .pkg +extras = + testing +pass_env = PYTEST_* SSL_CERT_FILE -setenv = +set_env = COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}{/}.coverage.{envname}} -extras = - testing commands = pytest {tty:--color=yes} {posargs: --no-cov-on-fail --cov-context=test \ --cov={envsitepackagesdir}{/}pyproject_api --cov={toxinidir}{/}tests --cov-config={toxinidir}{/}pyproject.toml \ @@ -29,26 +31,24 @@ commands = --cov-report=xml:{toxworkdir}{/}coverage.{envname}.xml --junitxml={toxworkdir}{/}junit.{envname}.xml \ tests} labels = test -package = wheel -wheel_build_env = .pkg [testenv:fix] description = run formatter and linters -passenv = - {[testenv]passenv} - PROGRAMDATA skip_install = true deps = - pre-commit>=3.2 + pre-commit>=3.2.2 +pass_env = + {[testenv]passenv} + PROGRAMDATA commands = pre-commit run --all-files --show-diff-on-failure {tty:--color=always} {posargs} [testenv:type] description = run type check on code base -setenv = - {tty:MYPY_FORCE_COLOR = 1} deps = - mypy==1.1.1 + mypy==1.2 +set_env = + {tty:MYPY_FORCE_COLOR = 1} commands = mypy src/pyproject_api --strict mypy tests --strict @@ -75,7 +75,7 @@ commands = [testenv:dev] description = dev environment with all deps at {envdir} -usedevelop = true +package = editable extras = docs testing