/
tox.ini
106 lines (95 loc) · 2.56 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
# - check-manifest
# confirm items checked into vcs are in your sdist
# - python setup.py check
# confirm required package meta-data in setup.py
# - readme_renderer (when using a ReStructuredText README)
# confirms your long_description will render correctly on PyPI.
#
# and also to help confirm pull requests to this project.
[tox]
envlist = flake8,pylint,mypy,pydocstyle,doc8,py3{7,8}
skip_missing_interpreters = true
[travis]
python =
3.7: flake8,pylint,mypy,pydocstyle,doc8,py37
3.8-dev: py38
[testenv]
description = {envpython}
usedevelop = true
[testenv:py37]
deps =
check-manifest
pytest
pytest-cov
pytest-xdist
# If your project uses README.rst, uncomment the following:
# readme_renderer
whitelist_externals =
pytest
check-manifest
commands =
python setup.py check -m -s
check-manifest
pytest --cov-fail-under=90 -n auto
[testenv:flake8]
skip_install = true
deps =
flake8
flake8-bugbear
whitelist_externals = flake8
commands = flake8 setup.py src tests
[testenv:pydocstyle]
skip_install = true
deps = pydocstyle
whitelist_externals = pydocstyle
commands = pydocstyle src --explain --add-ignore=D107,D102
[testenv:doc8]
skip_install = true
deps =
sphinx
doc8
whitelist_externals =
doc8
make
changedir = docs
commands =
make linkcheck
# D001 - lines should not be longer than 79 characters
# D002- no trailing whitespace
# D004 - no carriage returns (use unix newlines)
doc8 --ignore D001,D002,D004 .
[testenv:pylint]
usedevelop = true
deps =
pylint
pytest
whitelist_externals = pylint
commands =
# disable pylint's "line too long" / C0301
# W1203 = logging-fstring-interpolation; fstrings are fine for the logging from decorators
# W0511: TODO: ... (fixme)
# W0703: Catching too general exception BaseException (broad-except)
# R0903: Too few public methods (1/2)
# W0511: TODO, after I learn the `subprocess` library: (fixme)
pylint --disable=C0301,W0511,W0703,R0903,W0511 --good-names=e,F,C --score=n he
# C0111 = docstrings
# C0122 = constants should be on the left when writing tests,
# because of the `assert expected == actual` format
# C0103: Function name "test_CountCalls" doesn't conform to snake_case naming style (invalid-name)
pylint --disable=C0301,C0111,C0122,R0903,C0103,W0511 --score=n tests
[testenv:mypy]
skip_install = true
changedir = src
deps = mypy
whitelist_externals = mypy
commands = mypy --strict -p he
[testenv:py38]
deps =
pytest
pytest-cov
pytest-xdist
codecov
passenv = CI TRAVIS TRAVIS_*
commands =
pytest -n auto
codecov