-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtox.ini
More file actions
45 lines (42 loc) · 1.95 KB
/
Copy pathtox.ini
File metadata and controls
45 lines (42 loc) · 1.95 KB
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
41
42
43
44
[tox]
minversion = 3.10.0
envlist = py{311,312,313,314}-{flake8,unit,bandit,mypy,prospector,sphinx}
skip_missing_interpreters = True
[tox:jenkins]
# If CI is missing a python version we require, it should fail!
# More info on the rationale: https://phabricator.wikimedia.org/T372485
skip_missing_interpreters = false
# Only run lint check and unit tests on different python versions
# CI docker-registry.wikimedia.org/releng/tox-v3 defaults to 3.7, we want 3.11+
envlist = py{311,313}-{flake8,unit,bandit,mypy,prospector,sphinx}
[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
py311: (Python 3.11)
py312: (Python 3.12)
py313: (Python 3.13)
py314: (Python 3.14)
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]