-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
120 lines (92 loc) · 3.35 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
[tox]
minversion = 3.14
envlist = py35-{test,runcmd}, py36-{test,runcmd}, py37-{test,runcmd}, py38-{test,runcmd}, py39-{test,runcmd}, run-{cmd,blackcheck,black,isort,isortcheck}, coverage
[testenv:.tox]
envdir = {toxworkdir}/.tox
[testenv]
basepython =
py39,run,coverage,clean,bootstrap: python3.9
py38: python3.8
py37: python3.7
py36: python3.6
py35: python3.5
envdir =
py39,run,coverage: {toxworkdir}/py39
py38: {toxworkdir}/py38
py37: {toxworkdir}/py37
py36: {toxworkdir}/py36
py35: {toxworkdir}/py35
deps =
usedevelop = true
extras=
dev
passenv = HOME CI TRAVIS TRAVIS_* GITHUB_* SPHINX_* COVERALLS* CODECOV* SPELLCHECK SSH_AUTH_SOCK http_proxy https_proxy no_proxy
description =
py{35,36,37,38,39}-test: Run tests in the corresponding environment
py{35,36,37,38,39}-runcmd: Run arbitrary command following "--" in the corresponding environment
commands_pre =
python -V
commands =
py{35,36,37,38,39}-runcmd: {posargs:python -c 'print("No command")'}
py{35,36,37,38,39}-test: py.test {posargs:-vvv --doctest-modules --doctest-glob="*.rst" --doctest-glob="*.md" --cov=getbibtex --durations=10 -x -s src tests README.md CONTRIBUTING.md}
[testenv:bootstrap]
description = Configure tox
envdir = {toxworkdir}/bootstrap
deps = tox
skip_install = True
commands_pre =
commands =
python scripts/bootstrap.py
[testenv:clean]
description = Clean up
envdir = {toxworkdir}/clean_
deps =
skip_install = True
commands_pre =
whitelist_externals = tox
commands =
python scripts/clean.py tests
python scripts/clean.py build
[testenv:clean-tests]
description = Clean up files resulting from testing/coverage
envdir = {toxworkdir}/clean
deps =
skip_install = True
commands_pre =
commands =
python scripts/clean.py tests
[testenv:clean-build]
description = Clean up build artifacts (including __pycache__ folders)
envdir = {toxworkdir}/clean
deps =
skip_install = True
commands_pre =
commands =
python scripts/clean.py build
[testenv:coverage]
description = Generate a coverage report
depends = py37-test
commands =
coverage html
python -c 'import pathlib; print("coverage report available in \{\}".format(pathlib.Path(".") / "htmlcov" / "index.html"))'
[testenv:run-cmd]
description = Run arbitrary command following "--" in the current stable environment, e.g. "tox -e run-cmd -- ipython"
commands = {posargs:python -c 'print("No command")'}
[testenv:run-black]
description = Run black formatter in the current stable environment
commands = python -m black --skip-string-normalization --line-length 79 {posargs:src tests}
[testenv:run-blackcheck]
description = Run black formatter check in the latext venv
commands = python -m black --skip-string-normalization --line-length 79 --check --diff {posargs:src tests}
[testenv:run-isort]
description = Run isort formatter in the current stable environment
commands = python -m isort --recursive {posargs:src tests}
[testenv:run-isortcheck]
description = Run isort formatter check in the current stable environment
commands = python -m isort --recursive --check-only --diff {posargs:src tests}
[testenv:run-flake8]
description = Run flake8 formatter check in the current stable environment
commands = python -m flake8 {posargs:src tests}
[testenv:run-pylint]
description = Run pylint formatter check in the current stable environment
commands = python -m pylint -j 0 {posargs:src}