Fix docs publishing

Change I3e274969dd66d57a5cd0bbb7c39e433bf3b03370 broke docs, fix it
with using the new way of building docs.

Switch to using sphinxcontrib.apidoc for api building.

Remove autodoc config.

Change-Id: I669ae99144267316901c31d8dd3bb4a58fc07001
This commit is contained in:
Andreas Jaeger 2020-04-08 08:26:10 +02:00
parent d7081545da
commit 67766fd4fa
4 changed files with 13 additions and 23 deletions

View File

@ -1,5 +1,6 @@
# 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.
sphinx!=1.6.6,!=1.6.7,>=1.6.3 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.3,!=3.0.0 # BSD
openstackdocstheme>=1.32.1 # Apache-2.0
sphinxcontrib-apidoc>=0.2.0 # BSD

View File

@ -26,15 +26,11 @@ sys.path.insert(0, BASE_DIR)
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.apidoc',
'openstackdocstheme'
#'sphinx.ext.intersphinx'
]
try:
import openstackdocstheme
extensions.append('openstackdocstheme')
except ImportError:
openstackdocstheme = None
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
@ -55,11 +51,6 @@ repository_name = 'openstack/python-tricircleclient'
bug_project = 'python-tricircleclient'
bug_tag = ''
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
@ -78,8 +69,6 @@ pygments_style = 'sphinx'
# html_theme = '_theme'
# html_static_path = ['static']
html_theme = 'default' if openstackdocstheme is None else 'openstackdocs'
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
@ -96,3 +85,10 @@ latex_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}
# -- sphinxcontrib.apidoc configuration --------------------------------------
apidoc_module_dir = '../../tricircleclient'
apidoc_output_dir = 'api'
apidoc_excluded_paths = [
'tests',
]

View File

@ -52,10 +52,3 @@ test =
tempest>=17.1.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
[pbr]
autodoc_tree_index_modules = True
autodoc_tree_excludes =
setup.py
tricircleclient/tests/
api_doc_dir = api

View File

@ -57,7 +57,7 @@ commands =
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
commands = python setup.py build_sphinx
commands = sphinx-build -W -b html doc/source doc/build/html
[flake8]
show-source = True