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
6
doc/requirements.txt
Normal file
6
doc/requirements.txt
Normal file
@ -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():
|
||||
chars = "".join(
|
||||
random.choice(string.ascii_uppercase +
|
||||
string.ascii_letters + string.digits + '/+=')
|
||||
random.choice(string.ascii_uppercase
|
||||
+ string.ascii_letters + string.digits + '/+=')
|
||||
for _ in range(372))
|
||||
return "ssh-rsa " + chars
|
||||
|
||||
|
@ -48,8 +48,8 @@ class Manager(clients.Manager):
|
||||
self.client = client.MagnumClient(auth)
|
||||
|
||||
def bypassed_base_url(self, filters, auth_data=None):
|
||||
if (config.Config.magnum_url and
|
||||
filters['service'] == 'container-infra'):
|
||||
if (config.Config.magnum_url
|
||||
and filters['service'] == 'container-infra'):
|
||||
return config.Config.magnum_url
|
||||
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:
|
||||
return result
|
||||
time.sleep(interval)
|
||||
raise Exception(("Timed out after %s seconds. Started " +
|
||||
"on %s and ended on %s") % (timeout, start_time, end_time))
|
||||
raise Exception(("Timed out after %s seconds. Started on %s "
|
||||
+ "and ended on %s") % (timeout, start_time, end_time))
|
||||
|
||||
|
||||
def memoized(func):
|
||||
|
23
setup.cfg
23
setup.cfg
@ -24,26 +24,3 @@ packages =
|
||||
[entry_points]
|
||||
tempest.test_plugins =
|
||||
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
|
||||
# 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
|
||||
|
16
tox.ini
16
tox.ini
@ -7,13 +7,15 @@ ignore_basepython_conflict = True
|
||||
[testenv]
|
||||
basepython = python3
|
||||
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
|
||||
find
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
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}
|
||||
|
||||
[testenv:pep8]
|
||||
@ -33,9 +35,13 @@ commands =
|
||||
stestr run {posargs}
|
||||
|
||||
[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]
|
||||
deps = {[testenv:docs]deps}
|
||||
commands =
|
||||
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]
|
||||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
|
||||
# W503 line break before binary operator
|
||||
show-source = True
|
||||
ignore = E123,E125
|
||||
ignore = E123,E125,W503
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||
|
Loading…
x
Reference in New Issue
Block a user