-
Notifications
You must be signed in to change notification settings - Fork 96
/
tox.ini
149 lines (144 loc) · 4.32 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
149
[tox]
minversion = 3.9.0
envlist = qa, static, docs, py{38,39,310,311,312,py3}-{nocov,cov,diffcov}
skip_missing_interpreters = True
[testenv]
envdir = {toxworkdir}/{envname}
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 =
bandit
colorama
packaging
pytest >= 6.0 # Require >= 6.0 for pyproject.toml support (PEP 517)
pytest-mock
pytest-print
pytest-profiling
pytest-sugar
py # needed for pytest-sugar as it doesn't declare dependency on it.
!nocov: coverage>=7.0.1
!nocov: coverage[toml]
!nocov: coverage-conditional-plugin
!nocov: pytest-cov
diffcov: diff_cover
setenv =
cov: COVERAGE_FILE={toxinidir}/_dump/.coverage
nocov: PYTHONASYNCIODEBUG=1
py38: INTERP=py38
py39: INTERP=py39
py310: INTERP=py310
py311: INTERP=py311
py312: INTERP=py312
pypy3: INTERP=pypy3
pypy38: INTERP=pypy38
pypy39: INTERP=pypy39
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.
# IMPORTANT: It's a good idea to restrict the version numbers of the plugins. Without version limits, GHCI's pip
# sometimes simply gives up trying to figure the right deps, causing the test to fail.
deps =
flake8-bugbear>=22.12.6
flake8-builtins>=2.0.1
flake8-coding>=1.3.2
# C4
flake8-comprehensions>=3.10.1
# JS
flake8-multiline-containers>=0.0.19
# PIE
flake8-pie>=0.16.0
# MOD
flake8-printf-formatting>=1.1.2
# PT
flake8-pytest-style>=1.6.0
# SIM
flake8-simplify>=0.19.3
# 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>=0.0.11
# C801
flake8-copyright>=0.2.3
# DUO
dlint>=0.13.0
# TAE
flake8-annotations-complexity>=0.0.7
# TAE
flake8-annotations-coverage>=0.0.6
# ANN
flake8-annotations>=2.9.1
# YTT
flake8-2020>=1.7.0
# N400
flake8-broken-line>=0.6.0
[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
# Disabled for now because pytype blows up in Windows
#pytype --keep-going --jobs auto .
deps =
colorama
flake8>=5.0.4
{[flake8_plugins]deps}
pytest
check-manifest
# Disabled for now because pytype blows up in Windows
#pytype
[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