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 the following are solved
17 # py310... Cython.Compiler.Main raises FutureWarning "Cython directive
18 # 'language_level' not set, using 2 for now (Py2). This will change in a later
19 # release!" but this can't be matched by message because it contains a comma
20 # py310... distutils.command.install raises DeprecationWarning "The
21 # distutils.sysconfig module is deprecated, use sysconfig instead" but this
22 # can't be matched by message because it contains a comma
23 # py310... importlib._bootstrap raises ImportWarning
24 # "_SixMetaPathImporter.find_spec() not found; falling back to find_module()"
25 # but this can't be matched by message for unknown reasons
26 # py310... pip._vendor.urllib3.connection and pip._vendor.urllib3.util.ssl_
27 # both raise DeprecationWarning "ssl module: PROTOCOL_TLS is deprecated" but
28 # this can't be matched by message because it contains a colon
29 # py310... wheel.bdist_wheel raises DeprecationWarning "The \"license_file\"
30 # option is deprecated. Use \"license_files\" instead."
31 # multiple callers raise DeprecationWarning "The distutils package is
32 # deprecated and slated for removal in Python 3.12. Use setuptools or check
33 # PEP 632 for potential alternatives"
34 # multiple callers raise DeprecationWarning "Creating a LegacyVersion has been
35 # deprecated and will be removed in the next major release"
37 PYTHONWARNINGS = error, ignore::FutureWarning:Cython.Compiler.Main, ignore::DeprecationWarning:setuptools.config, ignore::DeprecationWarning:distutils.command.install, ignore::ImportWarning:importlib._bootstrap, ignore::DeprecationWarning:pip._vendor.urllib3.connection, ignore::DeprecationWarning:pip._vendor.urllib3.util.ssl_, ignore:The "license_file" option is deprecated. Use "license_files" instead.:DeprecationWarning:wheel.bdist_wheel, ignore:The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives:DeprecationWarning, ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning
38 VIRTUALENV_CREATOR = venv
39 commands = mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
42 description = check for potential security risks in source code
44 commands = bandit -r mudpy -x mudpy/tests {posargs}
48 description = find common spelling mistakes in code and documentation
50 commands = codespell {posargs}
54 description = start an interactive demo with the sample config
55 commands = mudpy {posargs}
58 description = build release artifacts and check for conformance
59 allowlist_externals = rm
64 rm -fr {toxinidir}/dist
66 twine check --strict {toxinidir}/dist/*
70 # Build an sdist into a temporary location so we'll have AUTHORS and ChangeLog
71 # files to include. Keep usedevelop on so that the project dependencies will be
72 # installed in the venv.
73 description = generate hypertext documentation
74 allowlist_externals = rm
79 rm -fr {toxinidir}/doc/build
80 python -m build --outdir={toxinidir}/doc/build/dist --sdist
81 sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
84 description = style checks and static analysis of source code
88 commands = flake8 {posargs}
91 [testenv:selftest_config]
92 description = run the selftest with the included sample config
93 commands = mudpy_selftest etc/mudpy.yaml
96 # Run the selftest before checking YAML files so we'll be sure to also catch at
97 # least some which are generated by the application, making sure it creates
98 # them with the same style we enforce for those carried in the repository.
99 description = test data files for correct syntax and formatting
102 mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
103 yamllint --strict {posargs} .
107 exclude = .git, .tox, *lib/python*, *egg, build