-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
41 lines (39 loc) · 1.71 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
[tox]
minversion = 2.5.0
envlist = py{39,311,312}-{flake8,unit,bandit,mypy,prospector,sphinx}
skip_missing_interpreters = True
[testenv]
usedevelop = True
allowlist_externals = sed
description =
flake8: Style consistency checker
unit: Run unit tests
bandit: Security-oriented static analyzer
mypy: Static analyzer for type annotations
prospector: Static analysis multi-tool
sphinx: Build documentation and manpages
py39: (Python 3.9)
py311: (Python 3.11)
py312: (Python 3.12)
envdir =
prospector: {toxworkdir}/{envname}
py39-!prospector: {toxworkdir}/py39-tests
py311-!prospector: {toxworkdir}/py311-tests
py312-!prospector: {toxworkdir}/py312-tests
commands =
flake8: flake8 setup.py homer
unit: py.test --strict-markers --cov-report=term-missing --cov=homer homer/tests/unit {posargs}
# Avoid bandit assert_used (B101) and etree blacklist (B410) in tests,
# and avoid Jinja2 autoescape (B701) for HTML injection.
bandit: bandit -l -i -r --skip B701 --exclude homer/tests homer/
bandit: bandit -l -i -r --skip B101,B410,B701 homer/tests
mypy: mypy homer/
prospector: prospector --no-external-config --profile '{toxinidir}/prospector.yaml' {posargs} {toxinidir}
sphinx: sphinx-build -W -b html '{toxinidir}/doc/source/' '{toxinidir}/doc/build/html'
sphinx: sphinx-build -W -b man '{toxinidir}/doc/source/' '{toxinidir}/doc/build/man'
# Fix missing space after bold blocks in man page: https://github.com/ribozz/sphinx-argparse/issues/80
sphinx: sed -i='' -e 's/^\.B/.B /' '{toxinidir}/doc/build/man/homer.1'
deps =
# Use install_requires and the additional extras_require[tests] from setup.py
prospector: .[prospector]
!prospector: .[tests]