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 # 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
22 PYTHONWARNINGS=default::DeprecationWarning
23 VIRTUALENV_CREATOR=venv
24 commands = mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
27 description = check for potential security risks in source code
29 commands = bandit -r mudpy -x mudpy/tests {posargs}
33 description = find common spelling mistakes in code and documentation
35 commands = codespell {posargs}
39 description = start an interactive demo with the sample config
40 commands = mudpy {posargs}
43 description = build release artifacts and check for conformance
44 allowlist_externals = rm
51 python setup.py bdist_wheel sdist
52 twine check --strict dist/*
56 description = generate hypertext documentation
57 allowlist_externals = rm
59 -r{toxinidir}/requirements.txt
60 -r{toxinidir}/doc/requirements.txt
64 sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
68 description = style checks and static analysis of source code
72 commands = flake8 {posargs}
75 [testenv:selftest_config]
76 description = run the selftest with the included sample config
77 commands = mudpy_selftest etc/mudpy.yaml
80 description = test data files for correct syntax and formatting
83 mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
84 yamllint --strict {posargs} .
88 exclude=.git,.tox,*lib/python*,*egg,build