adjutant/tox.ini
Adrian Turjak ad81fdf706 Update to Django 2.2, drop py2 support
OpenStack is dropping the py2.7 support in Ussuri cycle.

Adjutant is also upgrading to Django 2.2 at the same time
which is the new Django LTS, and only supports python 3.

Complete discussion & schedule can be found in
-
http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I2a429ebd6bc20385e814da03b222a1f61214a683
2020-02-14 10:42:27 +13:00

63 lines
1.7 KiB
INI

[tox]
envlist = py3,pep8,cover_report
skipsdist = True
[testenv]
usedevelop = True
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = adjutant-api test {posargs}
setenv = VIRTUAL_ENV={envdir}
[testenv:pep8]
basepython = python3
commands =
flake8
doc8
[testenv:cover]
basepython = python3
commands =
coverage run --source='adjutant' .tox/cover/bin/adjutant-api test {posargs}
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:cover_report]
basepython = python3
commands =
coverage run --source='.' .tox/cover_report/bin/adjutant-api test {posargs}
coverage report --include adjutant/* -m
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
[testenv:api-ref]
basepython = python3
deps = {[testenv:docs]deps}
commands =
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[testenv:releasenotes]
basepython = python3
deps = {[testenv:docs]deps}
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
max-line-length = 88
select = C,E,F,W,B,B950
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401,W503,E501
show-source = true
builtins = _
exclude=.venv,venv,.env,env,.git,.tox,dist,doc,*lib/python*,*egg,releasenotes,adjutant/api/migrations/*,adjutant/actions/migrations,adjutant/tasks/migrations
[doc8]
ignore-path=.tox,*.egg-info,doc/build,releasenotes/build,api-ref/build,.eggs/*/EGG-INFO/*.txt,./*.txt,adjutant
extension=.txt,.rst,.inc