Stop setting a default install command for tox
[mudpy.git] / tox.ini
1 # Copyright (c) 2016-2021 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 description = run the functional selftest with optimized configuration
13 basepython = python3
14 usedevelop = True
15 # TODO(fungi) Switch this to "error" once
16 # https://github.com/pypa/setuptools/issues/2086 and
17 # https://github.com/pypa/setuptools/issues/2466 are fixed in a new release of
18 # Setuptools and the vendored copy in Python 3.8 and later updated with it;
19 # also that won't work for Python 3.6 due to the older Setuptools there still
20 # calling imp instead of importlib so probably not while we still support 3.6
21 setenv =
22     PYTHONWARNINGS=default::DeprecationWarning
23     VIRTUALENV_CREATOR=venv
24 commands = mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
25
26 [testenv:bandit]
27 description = check for potential security risks in source code
28 deps = bandit
29 commands = bandit -r mudpy -x mudpy/tests {posargs}
30 usedevelop = False
31
32 [testenv:codespell]
33 description = find common spelling mistakes in code and documentation
34 deps = codespell
35 commands = codespell {posargs}
36 usedevelop = False
37
38 [testenv:demo]
39 description = start an interactive demo with the sample config
40 commands = mudpy {posargs}
41
42 [testenv:dist]
43 description = build release artifacts and check for conformance
44 allowlist_externals = rm
45 deps =
46     pbr
47     twine
48     wheel
49 commands =
50     rm -fr dist
51     python setup.py bdist_wheel sdist
52     twine check --strict dist/*
53 usedevelop = False
54
55 [testenv:docs]
56 description = generate hypertext documentation
57 allowlist_externals = rm
58 deps =
59     -r{toxinidir}/requirements.txt
60     -r{toxinidir}/doc/requirements.txt
61 commands =
62     rm -fr doc/build
63     python setup.py sdist
64     sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
65 usedevelop = False
66
67 [testenv:flake8]
68 description = style checks and static analysis of source code
69 deps =
70     flake8
71     flake8-bugbear
72 commands = flake8 {posargs}
73 usedevelop = False
74
75 [testenv:selftest_config]
76 description = run the selftest with the included sample config
77 commands = mudpy_selftest etc/mudpy.yaml
78
79 [testenv:yamllint]
80 description = test data files for correct syntax and formatting
81 deps = yamllint
82 commands =
83     mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
84     yamllint --strict {posargs} .
85
86 [flake8]
87 show-source = True
88 exclude=.git,.tox,*lib/python*,*egg,build