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.
7 envlist = bandit, codespell, dist, docs, flake8, yamllint, selftest_config, py3
9 ignore_basepython_conflict = True
12 description = run the functional selftest with optimized configuration
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
23 PYTHONWARNINGS=default::DeprecationWarning
24 VIRTUALENV_CREATOR=venv
25 commands = mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
28 description = check for potential security risks in source code
30 commands = bandit -r mudpy -x mudpy/tests {posargs}
34 description = find common spelling mistakes in code and documentation
36 commands = codespell {posargs}
40 description = start an interactive demo with the sample config
41 commands = mudpy {posargs}
44 description = build release artifacts and check for conformance
45 allowlist_externals = rm
52 python setup.py bdist_wheel sdist
57 description = generate hypertext documentation
58 allowlist_externals = rm
60 -r{toxinidir}/requirements.txt
61 -r{toxinidir}/doc/requirements.txt
65 sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
69 description = style checks and static analysis of source code
73 commands = flake8 {posargs}
76 [testenv:selftest_config]
77 description = run the selftest with the included sample config
78 commands = mudpy_selftest etc/mudpy.yaml
81 description = test data files for correct syntax and formatting
83 commands = yamllint --strict {posargs} .
88 exclude=.git,.tox,*lib/python*,*egg,build