Drop unnecessary wheel build dependency
[mudpy.git] / tox.ini
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.
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 # TODO(fungi) Switch this to "error" once the following are solved
15 #
16 # py311... Cython.Compiler.Main raises FutureWarning "Cython directive
17 #   'language_level' not set, using 2 for now (Py2). This will change in a
18 #   later release!" but this can't be matched by message because it has a comma
19 # py311... pip._vendor.pyparsing.core and pkg_resources._vendor.pyparsing raise
20 #   DeprecationWarning "module 'sre_constants' is deprecated" until a new
21 #   release containing https://github.com/pyparsing/pyparsing/commit/3c03942 is
22 #   vendored into pip and pkg_resources
23 # py310... distutils.command.install raises DeprecationWarning "The
24 #   distutils.sysconfig module is deprecated, use sysconfig instead" but this
25 #   can't be matched by message because it contains a comma
26 # flake8... flake8.plugins.manager raises DeprecationWarning "SelectableGroups
27 #   dict interface is deprecated. Use select."
28 # multiple callers raise DeprecationWarning "The distutils package is
29 #   deprecated and slated for removal in Python 3.12. Use setuptools or check
30 #   PEP 632 for potential alternatives"
31 # multiple callers raise DeprecationWarning "Creating a LegacyVersion has been
32 #   deprecated and will be removed in the next major release"
33 # SetupTools raises
34 #   setuptools._deprecation_warning.SetuptoolsDeprecationWarning "setup.py
35 #   install is deprecated. Use build and pip and other standards-based tools."
36 #   but only the message can be matched because the exception is private
37 # SetupTools raises
38 #   setuptools._deprecation_warning.SetuptoolsDeprecationWarning
39 #   "setup_requires is deprecated. Supply build dependencies using PEP 517
40 #   pyproject.toml build-requires." but only the message can be matched because
41 #   the exception is private
42 # SetupTools raises
43 #   setuptools._deprecation_warning.SetuptoolsDeprecationWarning "easy_install
44 #   command is deprecated. Use build and pip and other standards-based tools."
45 #   but only the message can be matched because the exception is private
46 # pip._vendor.certifi.core and pip._vendor.pep517.in_process raise
47 #   DeprecationWarning "path is deprecated. Use files() instead. Refer to
48 #   https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy
49 #   for migration advice." but this can't be matched by message because it
50 #   contains a colon
51 setenv =
52     PYTHONWARNINGS = error, ignore::FutureWarning:Cython.Compiler.Main, ignore::DeprecationWarning:distutils.command.install, 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, ignore:SelectableGroups dict interface is deprecated. Use select.:DeprecationWarning:flake8.plugins.manager, 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::DeprecationWarning:pip._vendor.certifi.core, ignore::DeprecationWarning:pip._vendor.pep517.in_process, ignore:module 'sre_constants' is deprecated:DeprecationWarning:pip._vendor.pyparsing.core, ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing
53     VIRTUALENV_CREATOR = venv
54 commands = mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
55 deps = {toxinidir}
56
57 [testenv:bandit]
58 description = check for potential security risks in source code
59 deps = bandit
60 commands = bandit -r mudpy -x mudpy/tests {posargs}
61
62 [testenv:codespell]
63 description = find common spelling mistakes in code and documentation
64 deps = codespell
65 commands = codespell {posargs}
66
67 [testenv:demo]
68 description = start an interactive demo with the sample config
69 commands = mudpy {posargs}
70
71 [testenv:dist]
72 description = build release artifacts and check for conformance
73 allowlist_externals = rm
74 deps =
75     build
76     twine
77 commands =
78     rm -fr {toxinidir}/dist
79     python -m build
80     twine check --strict {toxinidir}/dist/*
81
82 [testenv:docs]
83 # Build an sdist into a temporary location so we'll have AUTHORS and ChangeLog
84 # files to include.
85 description = generate hypertext documentation
86 allowlist_externals = rm
87 deps =
88     {toxinidir}
89     build
90     sphinx
91 commands =
92     rm -fr {toxinidir}/doc/build
93     python -m build --outdir={toxinidir}/doc/build/dist --sdist
94     sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
95
96 [testenv:flake8]
97 description = style checks and static analysis of source code
98 deps =
99     flake8
100     flake8-bugbear
101 commands = flake8 {posargs}
102
103 [testenv:selftest_config]
104 description = run the selftest with the included sample config
105 commands = mudpy_selftest etc/mudpy.yaml
106
107 [testenv:yamllint]
108 # Run the selftest before checking YAML files so we'll be sure to also catch at
109 # least some which are generated by the application, making sure it creates
110 # them with the same style we enforce for those carried in the repository.
111 description = test data files for correct syntax and formatting
112 deps =
113     {toxinidir}
114     yamllint
115 commands =
116     mudpy_selftest mudpy/tests/fixtures/test_daemon.yaml
117     yamllint --strict {posargs} .
118
119 [flake8]
120 show-source = True
121 exclude = .git, .tox, *lib/python*, *egg, build