Use released codespell
[mudpy.git] / tox.ini
1 # Copyright (c) 2016-2020 mudpy authors. Permission to use, copy,
2 # modify, and distribute this software is granted under terms
3 # provided in the LICENSE file distributed with this software.
4
5 [tox]
6 minversion = 3.18
7 envlist = bandit, codespell, dist, docs, flake8, yamllint, selftest_config, py3
8 skipsdist = True
9 ignore_basepython_conflict = True
10
11 [testenv]
12 basepython = python3
13 usedevelop = True
14 install_command = pip install {opts} {packages}
15 # TODO(fungi) Switch this to "error" and remove env-specific copies once
16 # https://github.com/pypa/setuptools/issues/2086 is fixed in a new release of
17 # Setuptools and the vendored copy in Python 3.8 and later updated with it;
18 # also that won't work for Python 3.6 due to the older Setuptools there still
19 # calling imp instead of importlib so probably not while we still support 3.6
20 setenv =
21     PYTHONWARNINGS=default::DeprecationWarning
22 commands = mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
23
24 [testenv:bandit]
25 setenv =
26     PYTHONWARNINGS=error
27 deps = bandit
28 commands = bandit -r mudpy -x mudpy/tests {posargs}
29 usedevelop = False
30
31 [testenv:codespell]
32 setenv =
33     PYTHONWARNINGS=error
34 deps = codespell
35 commands = codespell {posargs}
36 usedevelop = False
37
38 [testenv:demo]
39 commands = mudpy {posargs}
40
41 [testenv:dist]
42 allowlist_externals = rm
43 deps =
44     pbr
45     twine
46     wheel
47 commands =
48     rm -fr dist
49     python setup.py bdist_wheel sdist
50     twine check dist/*
51 usedevelop = False
52
53 [testenv:docs]
54 allowlist_externals = rm
55 deps =
56     -r{toxinidir}/requirements.txt
57     -r{toxinidir}/doc/requirements.txt
58 commands =
59     rm -fr doc/build
60     python setup.py sdist
61     sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
62 usedevelop = False
63
64 [testenv:flake8]
65 setenv =
66     PYTHONWARNINGS=error
67 deps =
68     flake8
69     flake8-bugbear
70 commands = flake8 {posargs}
71 usedevelop = False
72
73 [testenv:selftest_config]
74 commands = mudpy_selftest etc/mudpy.yaml
75
76 [testenv:yamllint]
77 setenv =
78     PYTHONWARNINGS=error
79 deps = yamllint
80 commands = yamllint --strict {posargs} .
81 usedevelop = False
82
83 [flake8]
84 show-source = True
85 exclude=.git,.tox,*lib/python*,*egg,build