forked from hamcrest/PyHamcrest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
109 lines (96 loc) · 2.42 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
[tox]
envlist = py35,py36,py37,py38,pypy2.7,pypy3.6,docs-py3
# Jython is not testable, but there's no reason it should not work.
[testenv]
commands = {envbindir}/py.test []
{envpython} tests/object_import.py
deps = pytest~=5.0
pytest-cov~=2.0
[testenv:jython]
deps = pytest
commands = {envbindir}/jython tests/alltests.py []
{envpython} tests/object_import.py
[testenv:py36-numpy]
basepython = python3.6
deps = {[testenv]deps}
numpy
setenv =
PYTHONHASHSEED = 4
[testenv:docs-py3]
basepython = python3.6
deps = sphinx
sphinx_rtd_theme
changedir = {toxinidir}/doc
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
[testenv:format]
basepython = python3
skip_install = true
deps =
black~=19.10b0
isort~=4.0
commands =
isort {toxinidir}/setup.py
isort -rc {toxinidir}/src/
isort -rc {toxinidir}/tests/
black -l100 -tpy35 src/ tests/ setup.py
[testenv:check-format]
basepython = python3
skip_install = true
deps = {[testenv:format]deps}
commands =
isort --check-only {toxinidir}/setup.py
isort --check-only -rc {toxinidir}/src/
isort --check-only -rc {toxinidir}/tests/
black --check -l100 -tpy35 src/ tests/ setup.py
[tool:isort]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=100
[testenv:flake8]
basepython = python3
skip_install = true
deps =
flake8~=3.0
flake8-bugbear~=18.0
flake8-comprehensions~=1.0
flake8-mutable~=1.0
mccabe~=0.6
flake8-blind-except~=0.1
flake8-builtins~=1.0
flake8-pep3101~=1.0
flake8-print~=3.0
flake8-string-format~=0.2
flake8-logging-format~=0.5
commands =
flake8 src/ tests/ setup.py
[flake8]
max-complexity = 5
max-line-length = 100
show-source = True
enable-extensions = M,B,C,T,P
ignore = C812,W503,P103,E1,E2,E3,E5
statistics = True
[testenv:mypy]
basepython = python3.8
skip_install = true
deps =
mypy~=0.6
commands =
mypy src/ tests/ --ignore-missing-imports {posargs}
[testenv:test-hinting]
basepython = python3
skip_install = true
deps =
pytest-mypy-plugins~=1.0
commands =
pytest --mypy-ini-file=tox.ini tests/type-hinting/ {posargs}
[testenv:pyre]
basepython = python3.7
skip_install = true
deps =
pyre-check
commands =
pyre --source-directory src/ check {posargs}
pyre --source-directory tests/ --search-path src/ check {posargs}