From d26bc12f71f59594e886097d0999937757b36c62 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 24 Jan 2018 05:40:26 -0600 Subject: [PATCH] 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 --- doc/source/user/config/configuration.rst | 14 +++++----- doc/source/user/guides/network.rst | 4 +-- test-requirements.txt | 3 --- tox.ini | 33 +++++++++++++----------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/doc/source/user/config/configuration.rst b/doc/source/user/config/configuration.rst index 0282cf219..b766921c8 100644 --- a/doc/source/user/config/configuration.rst +++ b/doc/source/user/config/configuration.rst @@ -11,8 +11,8 @@ Environment Variables provide backwards compatibility to service-specific variables such as `NOVA_USERNAME`. -If you have OpenStack environment variables set, `os-client-config` will produce -a cloud config object named `envvars` containing your values from the +If you have OpenStack environment variables set, `os-client-config` will +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 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`, 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, -like `service_type` or `endpoint` or `api_version` can be set by prefixing -the setting with the default service type. That might strike you funny when -setting `service_type` and it does me too - but that's just the world we live -in. +As seen with `dns_service_type`, any setting that makes sense to be +per-service, like `service_type` or `endpoint` or `api_version` can be set +by prefixing the setting with the default service type. That might strike you +funny when setting `service_type` and it does me too - but that's just the +world we live in. Auth Settings ------------- diff --git a/doc/source/user/guides/network.rst b/doc/source/user/guides/network.rst index b403c4a6e..b8fe9338b 100644 --- a/doc/source/user/guides/network.rst +++ b/doc/source/user/guides/network.rst @@ -56,8 +56,8 @@ List Security Groups -------------------- 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 -that is allowed to pass through a port. +for security group rules which specify the type of network traffic and +direction that is allowed to pass through a port. .. literalinclude:: ../examples/network/list.py :pyobject: list_security_groups diff --git a/test-requirements.txt b/test-requirements.txt index 4584371f0..236250da9 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,10 +1,7 @@ # 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 # 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 -doc8>=0.6.0 # Apache-2.0 extras>=1.0.0 # MIT fixtures>=3.0.0 # Apache-2.0/BSD jsonschema<3.0.0,>=2.6.0 # MIT diff --git a/tox.ini b/tox.ini index 46b0ff93a..386918031 100644 --- a/tox.ini +++ b/tox.ini @@ -12,9 +12,9 @@ setenv = LANGUAGE=en_US:en LC_ALL=C deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} - -r{toxinidir}/test-requirements.txt - -r{toxinidir}/requirements.txt + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/requirements.txt commands = stestr run {posargs} stestr slowest @@ -30,14 +30,18 @@ commands = stestr --test-path ./openstack/tests/functional run --serial {posargs stestr slowest [testenv:pep8] +usedevelop = False +skip_install = True deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} - -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -r{toxinidir}/doc/requirements.txt + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + doc8 + hacking + pygments + readme commands = - doc8 doc/source - flake8 + doc8 doc/source + python setup.py check -r -s + flake8 [testenv:venv] commands = {posargs} @@ -65,14 +69,15 @@ passenv = HOME USER commands = {toxinidir}/extras/run-ansible-tests.sh -e {envdir} {posargs} [testenv:docs] -basepython = python3 deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} - -r{toxinidir}/requirements.txt - -r{toxinidir}/doc/requirements.txt + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/requirements.txt + -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html [testenv:releasenotes] +usedevelop = False +skip_install = True commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [flake8] @@ -91,5 +96,3 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build [doc8] extensions = .rst, .yaml -# Maximal line length should be 80. -max-line-length = 80