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 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
[tox]
envlist = security,flake8,typing,pylint,black,docs,py37,py38,py39,py310,pypy3.9
[testenv]
usedevelop = True
deps =
-r{toxinidir}/tests/requirements.txt
commands = py.test --cov=parsel --cov-report=xml {posargs:docs parsel tests}
[testenv:security]
deps =
bandit
commands =
bandit -r -c .bandit.yml {posargs:parsel}
[testenv:flake8]
deps =
{[testenv]deps}
flake8==5.0.4
commands =
flake8 {posargs: parsel tests setup.py}
[testenv:typing]
deps =
{[testenv]deps}
types-lxml==2022.4.10
types-psutil==5.9.5.4
types-setuptools==65.5.0.1
mypy==0.982
commands =
mypy {posargs:parsel tests} --warn-unused-ignores
[testenv:pylint]
deps =
{[testenv]deps}
pylint==2.15.4
commands =
pylint docs parsel tests setup.py
[testenv:black]
deps =
black==22.10.0
commands =
black --line-length=79 --check {posargs:parsel tests setup.py}
[docs]
changedir = docs
deps = -rdocs/requirements.txt
[testenv:docs]
changedir = {[docs]changedir}
deps = {[docs]deps}
# No -W in LaTeX, because ReadTheDocs does not use it either, and there are
# image conversion warnings that cannot be addressed in ReadTheDocs
commands =
sphinx-build -W -b html . {envtmpdir}/html
sphinx-build -b latex . {envtmpdir}/latex
sphinx-build -W -b epub . {envtmpdir}/epub
|