diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 54bddb46b3..c6247caa1f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.1.0 + rev: v3.2.0 hooks: - id: check-ast - id: check-builtin-literals @@ -15,33 +15,24 @@ repos: exclude: 'tests/test-data' - id: trailing-whitespace exclude: 'tests/test-data' - - id: end-of-file-fixer - exclude: 'tests/test-data' - repo: https://github.com/asottile/pyupgrade rev: v2.7.2 hooks: - id: pyupgrade -- repo: https://github.com/asottile/seed-isort-config - rev: v2.2.0 - hooks: - - id: seed-isort-config - args: - - --application-directories - - .:sourmash -- repo: https://github.com/timothycrosley/isort - rev: 5.3.0 +- repo: https://github.com/pre-commit/mirrors-isort + rev: v5.4.2 hooks: - id: isort additional_dependencies: [toml] - repo: https://github.com/psf/black - rev: 19.10b0 + rev: 20.8b1 hooks: - id: black args: - --safe language_version: python3.8 - repo: https://github.com/asottile/blacken-docs - rev: v1.7.0 + rev: v1.8.0 hooks: - id: blacken-docs additional_dependencies: @@ -52,7 +43,7 @@ repos: hooks: - id: add-trailing-comma - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.5.1 + rev: v1.6.0 hooks: - id: rst-backticks #- repo: https://github.com/asottile/setup-cfg-fmt @@ -61,11 +52,11 @@ repos: # - id: setup-cfg-fmt # args: # - --min-py3-version -# - '3.5' -- repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.3 - hooks: - - id: flake8 - additional_dependencies: - - flake8-bugbear == 20.1.2 - language_version: python3.8 +# - '3.7' +#- repo: https://gitlab.com/pycqa/flake8 +# rev: 3.8.3 +# hooks: +# - id: flake8 +# additional_dependencies: +# - flake8-bugbear == 20.1.2 +# language_version: python3.8 diff --git a/tox.ini b/tox.ini index deaf1e0843..1dcb86030f 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ envlist = docs, package_description py37, + py39, # fix_lint, minversion = 3.12 isolated_build = true @@ -44,17 +45,19 @@ commands = pytest \ --junitxml {toxworkdir}/junit.{envname}.xml \ {posargs} +[testenv:pypy] +deps = + pip >= 19.3.1 + psutil <= 5.6.7 + [testenv:py38] extras = test storage -[tox:.package] -basepython = python3 - [testenv:docs] description = invoke sphinx-build to build the HTML docs -basepython = python3.7 +basepython = python3.8 extras = doc whitelist_externals = pandoc passenv = HOME @@ -65,7 +68,7 @@ commands = sphinx-build -d "{toxworkdir}/docs_doctree" doc "{toxworkdir}/docs_ou [testenv:package_description] description = check that the long description is valid -basepython = python3.7 +basepython = python3.8 deps = twine >= 1.12.1 # TODO installing readme-renderer[md] should not be necessary readme-renderer[md] >= 24.0 @@ -78,23 +81,22 @@ commands = pip wheel -w {envtmpdir}/build --no-deps . [testenv:fix_lint] description = format the code base to adhere to our styles, and complain about what we cannot do automatically -basepython = python3.7 +basepython = python3.8 passenv = {[testenv]passenv} - # without PROGRAMDATA cloning using git for Windows will fail with an - # `error setting certificate verify locations` error + # without PROGRAMDATA cloning using git for Windows will fail with an `error setting certificate verify locations` error PROGRAMDATA PRE_COMMIT_HOME extras = lint deps = pre-commit>=2 skip_install = True -commands = pre-commit run --all-files --show-diff-on-failure +commands = pre-commit run --all-files --show-diff-on-failure {posargs} python -c 'import pathlib; print("hint: run \{\} install to add checks as pre-commit hook".format(pathlib.Path(r"{envdir}") / "bin" / "pre-commit"))' [testenv:coverage] description = [run locally after tests]: combine coverage data and create report; generates a diff coverage against origin/latest (can be changed by setting DIFF_AGAINST env var) deps = {[testenv]deps} - coverage >= 5.0.1, < 6 + coverage >= 5.0.1 diff_cover skip_install = True passenv = {[testenv]passenv} @@ -105,7 +107,7 @@ commands = coverage combine coverage xml -o {toxworkdir}/coverage.xml coverage html -d {toxworkdir}/htmlcov diff-cover --compare-branch {env:DIFF_AGAINST:origin/latest} {toxworkdir}/coverage.xml -depends = py38, py37, pypy3 +depends = py39, py38, py37, pypy3 parallel_show_output = True [testenv:codecov] @@ -149,6 +151,7 @@ source = sourmash/ python = 3.7: py37, docs, package_description, coverage, codecov 3.8: py38, coverage, codecov + 3.9: py39, coverage, codecov [flake8] max-complexity = 22