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