-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathtox.ini
82 lines (69 loc) · 1.91 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
[tox]
# As it may be undesired to make formatting changes, by default only check
envlist = flake8, pylint, mypy, pytest, black, isort, docs
skipsdist = true
[common]
envdir = {toxworkdir}/.testenv
deps =
-rdev-requirements.txt
-rrequirements.txt
-rtest-requirements.txt
[testenv:pytest]
envdir = {[common]envdir}
deps = {[common]deps}
commands = {envpython} -m pytest --doctest-modules {posargs:--cov pycloudlib -- pycloudlib}
[testenv:mypy]
envdir = {[common]envdir}
deps =
{[common]deps}
commands = {envpython} -m mypy pycloudlib examples setup.py
[testenv:pylint]
envdir = {[common]envdir}
deps = {[common]deps}
commands = {envpython} -m pylint pycloudlib examples setup.py
[testenv:flake8]
envdir = {[common]envdir}
deps = {[common]deps}
commands = {envpython} -m flake8 pycloudlib examples setup.py
[testenv:black]
envdir = {[common]envdir}
deps = {[common]deps}
commands = {envpython} -m black . --check
[testenv:isort]
envdir = {[common]envdir}
deps = {[common]deps}
commands = {envpython} -m isort . --check-only
[testenv:format]
envdir = {[common]envdir}
deps = {[common]deps}
commands =
{envpython} -m black .
{envpython} -m isort .
[testenv:docs]
# Docs uses a separate environment because the changedir will
# cause tox to recreate the environment.
changedir = docs
deps =
-rrequirements.txt
-rtest-requirements.txt
-rdocs/requirements.txt
commands = sphinx-build -M html "." "_build"
[tip]
envdir = {toxworkdir}/.testenv-tip
deps =
pylint
flake8
flake8-docstrings
-rrequirements.txt
[testenv:tip-pylint]
envdir = {[tip]envdir}
deps = {[tip]deps}
commands = {envpython} -m pylint pycloudlib examples setup.py
[testenv:tip-flake8]
envdir = {[tip]envdir}
deps = {[tip]deps}
commands = {envpython} -m flake8 pycloudlib examples setup.py
[flake8]
# E203: whitespace before ':' ... This goes against pep8 and black formatting
# W503: line break before binary operator
ignore = E203, W503