Make selftest dialogue mutable
[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://review.opendev.org/752793 and https://review.opendev.org/752794
17 # merge and appear in a new PBR release
18 setenv =
19     PYTHONWARNINGS=default::DeprecationWarning
20 commands = mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
21
22 [testenv:bandit]
23 setenv =
24     PYTHONWARNINGS=error
25 deps = bandit
26 commands = bandit -r mudpy -x mudpy/tests {posargs}
27 usedevelop = False
28
29 [testenv:codespell]
30 # TODO(fungi) switch to a proper PyPI dep once .codespellrc is supported in a
31 # release version, and ratchet down deprecation warnings for it at that point
32 #setenv =
33 #    PYTHONWARNINGS=error
34 #deps = codespell
35 deps = git+https://github.com/codespell-project/codespell
36 commands = codespell {posargs}
37 usedevelop = False
38
39 [testenv:demo]
40 commands = mudpy {posargs}
41
42 [testenv:dist]
43 setenv =
44     PYTHONWARNINGS=error
45 allowlist_externals = rm
46 deps =
47     pbr
48     twine
49     wheel
50 commands =
51     rm -fr dist
52     python setup.py bdist_wheel sdist
53     twine check dist/*
54 usedevelop = False
55
56 [testenv:docs]
57 setenv =
58     PYTHONWARNINGS=error
59 allowlist_externals = rm
60 deps =
61     -r{toxinidir}/requirements.txt
62     -r{toxinidir}/doc/requirements.txt
63 commands =
64     rm -fr doc/build
65     python setup.py sdist
66     sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
67 usedevelop = False
68
69 [testenv:flake8]
70 setenv =
71     PYTHONWARNINGS=error
72 deps =
73     flake8
74     flake8-bugbear
75 commands = flake8 {posargs}
76 usedevelop = False
77
78 [testenv:selftest_config]
79 commands = mudpy_selftest etc/mudpy.yaml
80
81 [testenv:yamllint]
82 setenv =
83     PYTHONWARNINGS=error
84 deps = yamllint
85 commands = yamllint --strict {posargs} .
86 usedevelop = False
87
88 [flake8]
89 show-source = True
90 exclude=.git,.tox,*lib/python*,*egg,build