-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
84 lines (74 loc) · 2.02 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
###
### tox.ini with parts taken from the sagemath source
###
[tox]
envlist = doctest, coverage, pycodestyle, relint, codespell, flake8
skipsdist = true
requires =
tox>=4.12
[testenv]
setenv =
SAGE=sage
HOME={toxinidir}
commands = tox -c {toxinidir}/tox.ini -e {envname} -- {posargs}
allowlist_externals =
{env:SAGE}
tox
[testenv:doctest]
description =
run Sage the Sage doctester (same as "sage -t")
commands =
{env:SAGE} -t -p 0 {posargs:{toxinidir}/src/}
[testenv:coverage]
description =
give information about doctest coverage of files
(same as "sage --coverage[all]")
commands =
{env:SAGE} --coverage {posargs:{toxinidir}/src/}
[pycodestyle]
max-line-length = 99
statistics = True
count = True
# Not really PEP8 length but this is good enough here.
[testenv:pycodestyle]
description =
Check against PEP8 style conventions.
deps = pycodestyle
allowlist_externals = pycodestyle
commands = pycodestyle {posargs:{toxinidir}/src/}
[testenv:relint]
description =
check whether some forbidden patterns appear
(includes all patchbot pattern-exclusion plugins)
# https://github.com/codingjoe/relint
# The patterns are in .relint.yaml
deps = relint
allowlist_externals = find
commands = find {posargs:{toxinidir}/src/} -exec relint -c {toxinidir}/.relint.yaml \{\} +
[testenv:codespell]
description =
check for misspelled words in source code
# https://pypi.org/project/codespell/
deps = codespell
commands = codespell \
--skip="*.so,*.c,*.cpp,.git,.idea,.ipynb_checkpoints,.tox,dist,*.egg-info" \
--dictionary=- \
{posargs:{toxinidir}/src}
[flake8]
max-line-length = 100
filename = *.py, *.pyx
max_complexity = 10
per-file-ignores =
__init__.py:F401
all.py:F401
*.pyx:E999
[testenv:flake8]
description =
check for misspelled words in source code
deps = flake8
commands = flake8 {posargs:{toxinidir}/src/}
[testenv:rst]
description =
validate Python docstrings markup as reStructuredText
deps = flake8-rst-docstrings
commands = flake8 --select=RST {posargs:{toxinidir}/sage/}