Update docs and pep8 tox environments

Make the docs tox environment use doc/requirements.

For pep8, just install the linters and skip installing the package.
Doing this but leaving in the constraints file keeps us in line with
upper-constraints on linters but lets our pep8 envs be tiny.

Finally, remove the doc8 line-length setting. It's not a big enough
difference to warrant changing it.

Change-Id: I3df81474fb52e2587d22c7789b6b553139eb37f2
This commit is contained in:
Monty Taylor 2018-01-24 05:40:26 -06:00
parent b7bc0fb147
commit d26bc12f71
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
4 changed files with 27 additions and 27 deletions

@ -11,8 +11,8 @@ Environment Variables
provide backwards compatibility to service-specific variables such as provide backwards compatibility to service-specific variables such as
`NOVA_USERNAME`. `NOVA_USERNAME`.
If you have OpenStack environment variables set, `os-client-config` will produce If you have OpenStack environment variables set, `os-client-config` will
a cloud config object named `envvars` containing your values from the produce a cloud config object named `envvars` containing your values from the
environment. If you don't like the name `envvars`, that's ok, you can override environment. If you don't like the name `envvars`, that's ok, you can override
it by setting `OS_CLOUD_NAME`. it by setting `OS_CLOUD_NAME`.
@ -119,11 +119,11 @@ location rules previously mentioned for the config files.
`regions` can be a list of regions. When you call `get_all_clouds`, `regions` can be a list of regions. When you call `get_all_clouds`,
you'll get a cloud config object for each cloud/region combo. you'll get a cloud config object for each cloud/region combo.
As seen with `dns_service_type`, any setting that makes sense to be per-service, As seen with `dns_service_type`, any setting that makes sense to be
like `service_type` or `endpoint` or `api_version` can be set by prefixing per-service, like `service_type` or `endpoint` or `api_version` can be set
the setting with the default service type. That might strike you funny when by prefixing the setting with the default service type. That might strike you
setting `service_type` and it does me too - but that's just the world we live funny when setting `service_type` and it does me too - but that's just the
in. world we live in.
Auth Settings Auth Settings
------------- -------------

@ -56,8 +56,8 @@ List Security Groups
-------------------- --------------------
A **security group** acts as a virtual firewall for servers. It is a container A **security group** acts as a virtual firewall for servers. It is a container
for security group rules which specify the type of network traffic and direction for security group rules which specify the type of network traffic and
that is allowed to pass through a port. direction that is allowed to pass through a port.
.. literalinclude:: ../examples/network/list.py .. literalinclude:: ../examples/network/list.py
:pyobject: list_security_groups :pyobject: list_security_groups

@ -1,10 +1,7 @@
# The order of packages is significant, because pip processes them in the order # The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
extras>=1.0.0 # MIT extras>=1.0.0 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD
jsonschema<3.0.0,>=2.6.0 # MIT jsonschema<3.0.0,>=2.6.0 # MIT

33
tox.ini

@ -12,9 +12,9 @@ setenv =
LANGUAGE=en_US:en LANGUAGE=en_US:en
LC_ALL=C LC_ALL=C
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
commands = stestr run {posargs} commands = stestr run {posargs}
stestr slowest stestr slowest
@ -30,14 +30,18 @@ commands = stestr --test-path ./openstack/tests/functional run --serial {posargs
stestr slowest stestr slowest
[testenv:pep8] [testenv:pep8]
usedevelop = False
skip_install = True
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt doc8
-r{toxinidir}/test-requirements.txt hacking
-r{toxinidir}/doc/requirements.txt pygments
readme
commands = commands =
doc8 doc/source doc8 doc/source
flake8 python setup.py check -r -s
flake8
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}
@ -65,14 +69,15 @@ passenv = HOME USER
commands = {toxinidir}/extras/run-ansible-tests.sh -e {envdir} {posargs} commands = {toxinidir}/extras/run-ansible-tests.sh -e {envdir} {posargs}
[testenv:docs] [testenv:docs]
basepython = python3
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html commands = sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
[testenv:releasenotes] [testenv:releasenotes]
usedevelop = False
skip_install = True
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8] [flake8]
@ -91,5 +96,3 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[doc8] [doc8]
extensions = .rst, .yaml extensions = .rst, .yaml
# Maximal line length should be 80.
max-line-length = 80