forked from aio-libs/aiosmtpd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
148 lines (143 loc) · 3.93 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
[tox]
minversion = 3.9.0
envlist = qa, static, docs, py{36,37,38,39,py3}-{nocov,cov,diffcov}
skip_missing_interpreters = True
[testenv]
# One virtualenv per Python version
envdir =
py36: {toxworkdir}/3.6
py37: {toxworkdir}/3.7
py38: {toxworkdir}/3.8
py39: {toxworkdir}/3.9
py310: {toxworkdir}/3.10
pypy3: {toxworkdir}/pypy3
py: {toxworkdir}/py
commands =
python housekeep.py prep
# Bandit is not needed on diffcov, and seems to be incompatible with 310
# So, run only if "not (310 or diffcov)" ==> "(not 310) and (not diffcov)"
!py310-!diffcov: bandit -c bandit.yml -r aiosmtpd
nocov: pytest --verbose -p no:cov --tb=short {posargs}
cov: pytest --cov --cov-report=xml --cov-report=html --cov-report=term --tb=short {posargs}
diffcov: diff-cover _dump/coverage-{env:INTERP}.xml --html-report htmlcov/diffcov-{env:INTERP}.html
diffcov: diff-cover _dump/coverage-{env:INTERP}.xml --fail-under=100
profile: pytest --profile {posargs}
python housekeep.py --afterbar --afterbar gather
#sitepackages = True
usedevelop = True
deps =
# do NOT make these conditional, that way we can reuse same envdir for nocov+cov+diffcov
bandit
colorama
coverage[toml]
coverage-conditional-plugin
packaging
pytest >= 6.0 # Require >= 6.0 for pyproject.toml support (PEP 517)
pytest-cov
pytest-mock
pytest-print
pytest-profiling
pytest-sugar
diff_cover
setenv =
cov: COVERAGE_FILE={toxinidir}/_dump/.coverage
nocov: PYTHONASYNCIODEBUG=1
py36: INTERP=py36
py37: INTERP=py37
py38: INTERP=py38
py39: INTERP=py39
py310: INTERP=py310
pypy3: INTERP=pypy3
py: INTERP=py
passenv =
PYTHON*
TRAVIS
CI
GITHUB*
[flake8_plugins]
# This is a pseudo-section that feeds into [testenv:qa] and GA
# Snippets of letters above these plugins are tests that need to be "select"-ed in flake8 config (in
# setup.cfg) to activate the respective plugins. If no snippet is given, that means the plugin is
# always active.
deps =
flake8-bugbear
flake8-builtins
flake8-coding
# C4
flake8-comprehensions
# JS
flake8-multiline-containers
# PIE
flake8-pie
# MOD
flake8-printf-formatting
# PT
flake8-pytest-style
# SIM
flake8-simplify
# Cognitive Complexity looks like a good idea, but to fix the complaints... it will be an epic effort.
# So we disable it for now and reenable when we're ready, probably just before 2.0
# # CCR
# flake8-cognitive-complexity
# ECE
flake8-expression-complexity
# C801
flake8-copyright
# DUO
dlint
# TAE
flake8-annotations-complexity
# TAE
flake8-annotations-coverage
# ANN
flake8-annotations
# YTT
flake8-2020
# N400
flake8-broken-line
[testenv:qa]
basepython = python3
envdir = {toxworkdir}/qa
commands =
python housekeep.py prep
# The next line lists enabled plugins
python -m flake8 --version
python -m flake8 aiosmtpd setup.py housekeep.py release.py
check-manifest -v
pytest -v --tb=short aiosmtpd/qa
deps =
colorama
flake8
{[flake8_plugins]deps}
pytest
check-manifest
[testenv:docs]
basepython = python3
envdir = {toxworkdir}/docs
commands =
python housekeep.py prep
sphinx-build --color -b doctest -d build/.doctree aiosmtpd/docs build/doctest
sphinx-build --color -b html -d build/.doctree aiosmtpd/docs build/html
sphinx-build --color -b man -d build/.doctree aiosmtpd/docs build/man
deps:
colorama
-raiosmtpd/docs/RTD-requirements.txt
[testenv:static]
basepython = python3
# (?!...) is a negative-lookahead, means that it must NOT match
platform = ^(?!win32)(?!cygwin)
envdir = {toxworkdir}/static
commands =
python housekeep.py prep
pytype --keep-going .
deps:
pytype
# Deps of conf.py
sphinx_rtd_theme
# Deps of test files
pytest
pytest-mock
packaging
# Deps of examples
argon2-cffi
dnspython