Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Nov 1, 2020
1 parent e37ea53 commit 5cf2215
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 34 deletions.
37 changes: 14 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
25 changes: 14 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ envlist =
docs,
package_description
py37,
py39,
# fix_lint,
minversion = 3.12
isolated_build = true
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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}
Expand All @@ -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]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5cf2215

Please sign in to comment.