1 # Copyright (c) 2016-2022 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
14 # TODO(fungi) Switch this to "error" once the following are solved
16 # py311... passlib.utils raises DeprecationWarning "'crypt' is deprecated and
17 # slated for removal in Python 3.13"
18 # py311... mudpy.tests.selftest raises DeprecationWarning "'telnetlib' is
19 # deprecated and slated for removal in Python 3.13"
20 # multiple callers raise DeprecationWarning "Creating a LegacyVersion has been
21 # deprecated and will be removed in the next major release"
23 # setuptools._deprecation_warning.SetuptoolsDeprecationWarning "setup.py
24 # install is deprecated. Use build and pip and other standards-based tools."
25 # but only the message can be matched because the exception is private
27 # setuptools._deprecation_warning.SetuptoolsDeprecationWarning
28 # "setup_requires is deprecated. Supply build dependencies using PEP 517
29 # pyproject.toml build-requires." but only the message can be matched because
30 # the exception is private
32 # setuptools._deprecation_warning.SetuptoolsDeprecationWarning "easy_install
33 # command is deprecated. Use build and pip and other standards-based tools."
34 # but only the message can be matched because the exception is private
35 # setuptools.config.pyprojecttoml raises
36 # setuptools.config.pyprojecttoml._ExperimentalProjectMetadata "Support for
37 # `[tool.setuptools]` in `pyproject.toml` is still *beta*." but the parent
38 # Warning class has to be used instead
40 PYTHONWARNDFAULTENCODING = 1
41 PYTHONWARNINGS = error, ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning, ignore:setup.py install is deprecated. Use build and pip and other standards-based tools., ignore:easy_install command is deprecated. Use build and pip and other standards-based tools., ignore:'crypt' is deprecated and slated for removal in Python 3.13:DeprecationWarning:passlib.utils, ignore:'telnetlib' is deprecated and slated for removal in Python 3.13:DeprecationWarning:mudpy.tests.selftest, ignore:Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*.:Warning:setuptools.config.pyprojecttoml
43 VIRTUALENV_CREATOR = venv
44 commands = mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
49 description = check for potential security risks in source code
52 commands = bandit -r mudpy -x mudpy/tests {posargs}
55 description = find common spelling mistakes in code and documentation
58 commands = codespell {posargs}
61 description = start an interactive demo with the sample config
62 commands = mudpy {posargs}
65 description = build release artifacts and check for conformance
71 {envpython} -c "import shutil; shutil.rmtree('{toxinidir}/dist', ignore_errors=True)"
73 twine check --strict {toxinidir}/dist/*
76 # Build an sdist into a temporary location so we'll have AUTHORS and ChangeLog
78 description = generate hypertext documentation
84 {envpython} -c "import shutil; shutil.rmtree('{toxinidir}/doc/build', ignore_errors=True)"
85 {envpython} -m build --outdir={toxinidir}/doc/build/dist --sdist
86 sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
89 description = style checks and static analysis of source code
92 commands = flake8 {posargs}
94 [testenv:selftest_config]
95 description = run the selftest with the included sample config
96 commands = mudpy_selftest etc/mudpy.yaml
99 # Run the selftest before checking YAML files so we'll be sure to also catch at
100 # least some which are generated by the application, making sure it creates
101 # them with the same style we enforce for those carried in the repository.
102 description = test data files for correct syntax and formatting
107 mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
108 yamllint --strict {posargs} .
112 exclude = .git, .tox, *lib/python*, *egg, build