-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
34 lines (32 loc) · 1.37 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
[tox]
minversion = 3.10.0
envlist = py{39,310,311,312}-{ruff,unit,mypy,prospector,sphinx}
skip_missing_interpreters = True
[testenv]
usedevelop = True
download = True
allowlist_externals = sed
description =
unit: Run unit tests
bandit: Security-oriented static analyzer
mypy: Static analyzer for type annotations
prospector: Static analysis multi-tool
ruff: Python linter with a lot of other functionalities
sphinx: Build documentation and manpages
py39: (Python 3.9)
py310: (Python 3.10)
py311: (Python 3.11)
py312: (Python 3.12)
commands =
unit: py.test --strict-markers --cov-report=term-missing --cov=gjson tests/unit {posargs}
mypy: mypy --show-error-codes gjson/
prospector: prospector --profile '{toxinidir}/prospector.yaml' --tool pyroma --tool vulture {posargs} {toxinidir}
ruff: ruff check {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/gjson.1'
deps =
# Use install_requires and the additional extras_require[tests/prospector] from setup.py
prospector: .[prospector]
!prospector: .[tests]