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
|
[tox]
minversion = 3.10.0
envlist = py{310,311,312,313,314}-{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
py310: (Python 3.10)
py311: (Python 3.11)
py312: (Python 3.12)
py313: (Python 3.13)
py314: (Python 3.14)
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 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]
|