From 584eb3f81c6c65c8fecdc7f70993081820118d09 Mon Sep 17 00:00:00 2001 From: "Goncharov, Artem" Date: Tue, 3 Jan 2023 12:41:41 +0000 Subject: [PATCH] Update Docs configuration Reviewed-by: gtema Co-authored-by: Goncharov, Artem Co-committed-by: Goncharov, Artem --- tox.ini | 46 ++++++++++++++++++++++++++++++++++++++++++---- umn/source/conf.py | 7 +------ 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/tox.ini b/tox.ini index bc0c0d1..43a769a 100644 --- a/tox.ini +++ b/tox.ini @@ -22,20 +22,26 @@ deps = commands = {posargs} [testenv:docs] +deps = -r{toxinidir}/doc/requirements.txt commands = {[testenv:api-ref]commands} + {[testenv:json-api-ref]commands} {[testenv:umn]commands} + {[testenv:json-umn]commands} [testenv:docs-pdf] -whitelist_externals = +deps = -r{toxinidir}/doc/requirements.txt +allowlist_externals = mkdir commands = mkdir -p doc/build/pdf {[testenv:api-ref-pdf-docs]commands} +# HTML version [testenv:api-ref] -whitelist_externals = +deps = -r{toxinidir}/doc/requirements.txt +allowlist_externals = cp mkdir commands = @@ -43,8 +49,24 @@ commands = mkdir -p api-ref/build/html cp -av doc/build/html/api-ref api-ref/build/html +# Json version (for search) +[testenv:json-api-ref] +deps = -r{toxinidir}/doc/requirements.txt +allowlist_externals = + cp + mkdir + find +commands = + sphinx-build -W --keep-going -b json api-ref/source doc/build/json/api-ref + # Drop data useless for the search + find doc/build/json -type d -and ( -name '_images' -or -name '_static' -or -name '_sources' ) -exec rm {:} ; + mkdir -p api-ref/build/json + cp -av doc/build/json/api-ref api-ref/build/json + +# PDF version [testenv:api-ref-pdf-docs] -whitelist_externals = +deps = -r{toxinidir}/doc/requirements.txt +allowlist_externals = rm mkdir make @@ -60,8 +82,10 @@ commands = cp api-ref/build/pdf/cce-api-ref.pdf doc/build/pdf/ +# HTML version [testenv:umn] -whitelist_externals = +deps = -r{toxinidir}/doc/requirements.txt +allowlist_externals = cp mkdir commands = @@ -69,4 +93,18 @@ commands = mkdir -p umn/build/html cp -av doc/build/html/umn umn/build/html +# Json version (for search) +[testenv:json-umn] +deps = -r{toxinidir}/doc/requirements.txt +allowlist_externals = + cp + mkdir + find +commands = + sphinx-build -W --keep-going -b json umn/source doc/build/json/umn + # Drop data useless for the search + find doc/build/json -type d -and ( -name '_images' -or -name '_static' -or -name '_sources' ) -exec rm {:} ; + mkdir -p umn/build/json + cp -av doc/build/json/umn umn/build/json + diff --git a/umn/source/conf.py b/umn/source/conf.py index 4557edf..6e38b98 100644 --- a/umn/source/conf.py +++ b/umn/source/conf.py @@ -95,9 +95,4 @@ html_title = "Cloud Container Service - User Guide" html_static_path = ['_static'] # -- Options for PDF output -------------------------------------------------- -latex_documents = [ - ('index', - 'None.tex', - u'Cloud Container Service - User Guide', - u'OpenTelekomCloud', 'manual'), -] +latex_documents = []