From 0fb1d453de8e88d97895715ea5eb516e374b1f60 Mon Sep 17 00:00:00 2001 From: zhangbailin Date: Thu, 8 Sep 2022 17:26:21 +0800 Subject: [PATCH] Add tox -e api-ref CLI Closes-Bug: #1989110 Change-Id: I2063f51a38daf74c1e493b334e78045b3dd99d7b --- api-ref/source/conf.py | 3 ++- tox.ini | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index 541cbc5..b60245e 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -58,6 +58,7 @@ html_theme_options = { # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ - ('index', 'Venus.tex', u'OpenStack Log API Documentation', + ('index', 'Venus.tex', + u'OpenStack Log Management Service API Documentation', u'OpenStack Foundation', 'manual'), ] diff --git a/tox.ini b/tox.ini index 65ae2e6..d7472ab 100644 --- a/tox.ini +++ b/tox.ini @@ -66,6 +66,18 @@ commands = rm -rf doc/build/html sphinx-build -W -b html doc/source doc/build/html +[testenv:api-ref] +description = + Generate the API ref. Called from CI scripts to test and publish to docs.openstack.org. +# This environment is called from CI scripts to test and publish +# the API Ref to docs.openstack.org. +envdir = {toxworkdir}/docs +deps = {[testenv:docs]deps} +commands = + rm -rf api-ref/build + sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html +allowlist_externals = rm + [flake8] # Following checks are ignored on purpose. #