openstack-doc-tools/tox.ini
pengyuesheng dc37b3569b Drop python 2.7 support and testing
Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Co-Authored-By: Andreas Jaeger <aj@suse.com>
Change-Id: I32d5dc317b821dee4a625506f227a8f5bfaaecfc
2020-01-27 17:03:20 +01:00

74 lines
2.4 KiB
INI

[tox]
minversion = 3.1.0
envlist = py37,pep8
skipsdist = True
# Automatic envs (pyXX) will only use the python version appropriate to that
# env and ignore basepython inherited from [testenv] if we set
# ignore_basepython_conflict.
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install {opts} {packages}
# Install also sitemap scraping tool, not installed by default
# therefore not in requirements file
deps = scrapy>=1.0.0
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = stestr run --slowest {posargs}
[testenv:pep8]
commands =
flake8
# Run doc8 to check .rst and .txt files.
# HACKING.rst is the only file that is not referenced from
# doc/source, so add it explicitly.
doc8 -e txt -e rst doc/source/ HACKING.rst
# Run bashate during pep8 runs to ensure violations are caught by
# the check and gate queues.
bashate bin/doc-tools-check-languages bin/doc-tools-build-rst
[testenv:releasenotes]
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
[testenv:sitemap]
# commands = functional test command goes here
[testenv:venv]
commands = {posargs}
[testenv:docs]
commands =
sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files, and develop mode disabled
# explicitly to avoid unnecessarily installing the checked-out repo too (this
# further relies on "tox.skipsdist = True" above).
deps = bindep
commands = bindep test
usedevelop = False
[flake8]
show-source = True
builtins = _
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,doc/source/conf.py
# 28 is currently the most complex thing we have
max-complexity=29
ignore = H101
[testenv:lower-constraints]
# Install also sitemap scraping tool, not installed by default
# therefore not in requirements file
deps =
scrapy>=1.0.0
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt