From 087906807221b9b3be9eb0f3307e6bc1e16ceac4 Mon Sep 17 00:00:00 2001 From: "Goncharov, Artem" Date: Fri, 6 Jan 2023 18:42:12 +0000 Subject: [PATCH] Update Docs configuration Reviewed-by: gtema Co-authored-by: Goncharov, Artem Co-committed-by: Goncharov, Artem --- api-ref/source/conf.py | 3 +++ tox.ini | 18 +++++++++++------- umn/source/conf.py | 3 +++ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index 6a02af3..71dbb05 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -94,5 +94,8 @@ html_title = "Document Database Service - API Reference" # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +# Do not include sources into the rendered results +html_copy_source = False + # -- Options for PDF output -------------------------------------------------- latex_documents = [] diff --git a/tox.ini b/tox.ini index 0c184c3..c4399f2 100644 --- a/tox.ini +++ b/tox.ini @@ -21,12 +21,14 @@ deps = -r{toxinidir}/requirements.txt commands = {posargs} +# This env is invoked in the periodic pipeline and is therefore responsible to +# build all relevant docs at once. [testenv:docs] deps = -r{toxinidir}/doc/requirements.txt allowlist_externals = mkdir cp - find + sh commands = {[testenv:api-ref]commands} {[testenv:json-api-ref]commands} @@ -63,11 +65,12 @@ deps = -r{toxinidir}/doc/requirements.txt allowlist_externals = cp mkdir - find + sh 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 {:} ; + # Drop data useless for the search - wrap it also with sh/xargs due to bugs + # in tox + sh -c "find doc/build/json -type d -and '(' -name '_images' -or -name '_static' -or -name '_sources' ')' -print0 | xargs -0 rm -rf" mkdir -p api-ref/build/json cp -av doc/build/json/api-ref api-ref/build/json @@ -90,11 +93,12 @@ deps = -r{toxinidir}/doc/requirements.txt allowlist_externals = cp mkdir - find + sh 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 {:} ; + # Drop data useless for the search - wrap it also with sh/xargs due to bugs + # in tox + sh -c "find doc/build/json -type d -and '(' -name '_images' -or -name '_static' -or -name '_sources' ')' -print0 | xargs -0 rm -rf" 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 25737a3..ba7300f 100644 --- a/umn/source/conf.py +++ b/umn/source/conf.py @@ -94,6 +94,9 @@ html_title = "Document Database Service - User Guide" # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +# Do not include sources into the rendered results +html_copy_source = False + # -- Options for PDF output -------------------------------------------------- latex_documents = [ ('index',