Update docs building, cleanup
Update docs building, cleanup a bit: * Switch to sphinx-build * Update requirements for Sphinx and openstackdocstheme for python 3, create doc/requirements.txt * Remove unneeded doc and translation sections from setup.cfg * Remove install_command, it's unneeded, the default is fine. * Move constraints into deps, use TOX_CONSTRAINTS instead of obsolete UPPER_CONSTRAINTS * Update to hacking 3.0, fix problems found Change-Id: I76fe5602928bede439133993b0d85669228f25ed
This commit is contained in:
parent
599a7c392d
commit
6bb7b82275
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
sphinx>=2.0.0,!=2.1.0 # BSD
|
||||||
|
openstackdocstheme>=2.0.0 # Apache-2.0
|
||||||
|
|
||||||
|
# releasenotes
|
||||||
|
reno>=2.5.0 # Apache-2.0
|
|
@ -65,8 +65,8 @@ def gen_docker_volume_size(min_int=3, max_int=5):
|
||||||
|
|
||||||
def gen_fake_ssh_pubkey():
|
def gen_fake_ssh_pubkey():
|
||||||
chars = "".join(
|
chars = "".join(
|
||||||
random.choice(string.ascii_uppercase +
|
random.choice(string.ascii_uppercase
|
||||||
string.ascii_letters + string.digits + '/+=')
|
+ string.ascii_letters + string.digits + '/+=')
|
||||||
for _ in range(372))
|
for _ in range(372))
|
||||||
return "ssh-rsa " + chars
|
return "ssh-rsa " + chars
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,8 @@ class Manager(clients.Manager):
|
||||||
self.client = client.MagnumClient(auth)
|
self.client = client.MagnumClient(auth)
|
||||||
|
|
||||||
def bypassed_base_url(self, filters, auth_data=None):
|
def bypassed_base_url(self, filters, auth_data=None):
|
||||||
if (config.Config.magnum_url and
|
if (config.Config.magnum_url
|
||||||
filters['service'] == 'container-infra'):
|
and filters['service'] == 'container-infra'):
|
||||||
return config.Config.magnum_url
|
return config.Config.magnum_url
|
||||||
return self.auth_provider.orig_base_url(filters, auth_data=auth_data)
|
return self.auth_provider.orig_base_url(filters, auth_data=auth_data)
|
||||||
|
|
||||||
|
|
|
@ -89,8 +89,8 @@ def wait_for_condition(condition, interval=1, timeout=40):
|
||||||
if result:
|
if result:
|
||||||
return result
|
return result
|
||||||
time.sleep(interval)
|
time.sleep(interval)
|
||||||
raise Exception(("Timed out after %s seconds. Started " +
|
raise Exception(("Timed out after %s seconds. Started on %s "
|
||||||
"on %s and ended on %s") % (timeout, start_time, end_time))
|
+ "and ended on %s") % (timeout, start_time, end_time))
|
||||||
|
|
||||||
|
|
||||||
def memoized(func):
|
def memoized(func):
|
||||||
|
|
23
setup.cfg
23
setup.cfg
|
@ -24,26 +24,3 @@ packages =
|
||||||
[entry_points]
|
[entry_points]
|
||||||
tempest.test_plugins =
|
tempest.test_plugins =
|
||||||
magnum_tests = magnum_tempest_plugin.plugin:MagnumTempestPlugin
|
magnum_tests = magnum_tempest_plugin.plugin:MagnumTempestPlugin
|
||||||
|
|
||||||
[build_sphinx]
|
|
||||||
all-files = 1
|
|
||||||
warning-is-error = 1
|
|
||||||
source-dir = doc/source
|
|
||||||
build-dir = doc/build
|
|
||||||
|
|
||||||
[upload_sphinx]
|
|
||||||
upload-dir = doc/build/html
|
|
||||||
|
|
||||||
[compile_catalog]
|
|
||||||
directory = magnum_tempest_plugin/locale
|
|
||||||
domain = magnum_tempest_plugin
|
|
||||||
|
|
||||||
[update_catalog]
|
|
||||||
domain = magnum_tempest_plugin
|
|
||||||
output_dir = magnum_tempest_plugin/locale
|
|
||||||
input_file = magnum_tempest_plugin/locale/magnum_tempest_plugin.pot
|
|
||||||
|
|
||||||
[extract_messages]
|
|
||||||
keywords = _ gettext ngettext l_ lazy_gettext
|
|
||||||
mapping_file = babel.cfg
|
|
||||||
output_file = magnum_tempest_plugin/locale/magnum_tempest_plugin.pot
|
|
||||||
|
|
|
@ -2,10 +2,6 @@
|
||||||
# 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>=1.1.0,<1.2.0 # Apache-2.0
|
hacking>=3.0.0,<3.1.0 # Apache-2.0
|
||||||
|
|
||||||
sphinx>=1.8.0,!=2.1.0 # BSD
|
|
||||||
openstackdocstheme>=1.20.0 # Apache-2.0
|
|
||||||
# releasenotes
|
|
||||||
reno>=2.5.0 # Apache-2.0
|
|
||||||
stestr>=2.0.0 # Apache-2.0
|
stestr>=2.0.0 # Apache-2.0
|
||||||
|
|
16
tox.ini
16
tox.ini
|
@ -7,13 +7,15 @@ ignore_basepython_conflict = True
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
|
install_command = pip install {opts} {packages}
|
||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
find
|
find
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
PYTHONWARNINGS=default::DeprecationWarning
|
PYTHONWARNINGS=default::DeprecationWarning
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps =
|
||||||
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands = stestr run --slowest {posargs}
|
commands = stestr run --slowest {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
|
@ -33,9 +35,13 @@ commands =
|
||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands = python setup.py build_sphinx
|
deps =
|
||||||
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
|
-r{toxinidir}/doc/requirements.txt
|
||||||
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
|
deps = {[testenv:docs]deps}
|
||||||
commands =
|
commands =
|
||||||
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
|
@ -44,8 +50,8 @@ commands = oslo_debug_helper {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E123, E125 skipped as they are invalid PEP-8.
|
# E123, E125 skipped as they are invalid PEP-8.
|
||||||
|
# W503 line break before binary operator
|
||||||
show-source = True
|
show-source = True
|
||||||
ignore = E123,E125
|
ignore = E123,E125,W503
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||||
|
|
Loading…
Reference in New Issue