From ec0bd5d533db3d4acb80395aaa982ee7bb393252 Mon Sep 17 00:00:00 2001 From: "Hasko, Vladimir" Date: Tue, 24 Oct 2023 22:19:39 +0000 Subject: [PATCH] adding best-practice to sbv Reviewed-by: vladimirhasko Co-authored-by: Hasko, Vladimir Co-committed-by: Hasko, Vladimir --- doc/source/index.rst | 4 +++- tox.ini | 44 ++++++++++++++++++++++++++++++++++++++++++++ umn/source/conf.py | 7 +------ 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/doc/source/index.rst b/doc/source/index.rst index 7ecaf4b..7f9e6c2 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -8,5 +8,7 @@ CCE provides highly scalable, high-performance, enterprise-class Kubernetes clus .. service_card:: :service_type: cce + :environment: internal :umn: Describes the basic concepts, functions, key terms, best practices, FAQs and steps for quickly creating clusters and containerized applications. - :api-ref: Describes the APIs provided by CCE including the functions, parameters, and examples of each API. \ No newline at end of file + :api-ref: Describes the APIs provided by CCE including the functions, parameters, and examples of each API. + :best-practice: To use Cloud Container Engine more securely, reliably, flexibly, and efficiently, you are advised to follow the following best practices. diff --git a/tox.ini b/tox.ini index 06e5284..7f35d71 100644 --- a/tox.ini +++ b/tox.ini @@ -40,6 +40,8 @@ commands = {[testenv:json-umn]commands} {[testenv:api-ref]commands} {[testenv:json-api-ref]commands} + {[testenv:best-practice]commands} + {[testenv:json-best-practice]commands} [testenv:docs-pdf] deps = {[testenv:docs]deps} @@ -52,6 +54,7 @@ allowlist_externals = commands = mkdir -p doc/build/pdf {[testenv:api-ref-pdf-docs]commands} + {[testenv:best-practice-pdf-docs]commands} # HTML version @@ -127,6 +130,47 @@ commands = cp api-ref/build/pdf/cce-api-ref.pdf doc/build/pdf/ +# HTML version +[testenv:best-practice] +deps = {[testenv:docs]deps} +allowlist_externals = + cp + mkdir +commands = + sphinx-build -W --keep-going -b html doc/best-practice/source doc/build/html/best-practice + +# Json version (for search) +[testenv:json-best-practice] +deps = {[testenv:docs]deps} +allowlist_externals = + cp + mkdir + sh +commands = + sphinx-build -W --keep-going -b json doc/best-practice/source doc/build/json/best-practice + # 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" + +# PDF version +[testenv:best-practice-pdf-docs] +deps = {[testenv:docs]deps} +allowlist_externals = + rm + mkdir + make + bash + cp +commands = + rm -rf doc/best-practice/build/pdf + sphinx-build -W --keep-going -b latex doc/best-practice/source doc/best-practice/build/pdf/ + bash -c "for f in doc/best-practice/build/pdf/*.gif; do convert $f $\{f/%gif/png\}; done || true" + bash -c "for f in doc/best-practice/build/pdf/*.tex; do sed -iorig 's/\.gif//g' $f; done" + make -C doc/best-practice/build/pdf + mkdir -p doc/build/pdf + cp doc/best-practice/build/pdf/cce-best-practice.pdf doc/build/pdf/ + + [doc8] ignore = D001 diff --git a/umn/source/conf.py b/umn/source/conf.py index 548be66..4bcf330 100644 --- a/umn/source/conf.py +++ b/umn/source/conf.py @@ -109,9 +109,4 @@ html_static_path = ['_static'] html_copy_source = False # -- Options for PDF output -------------------------------------------------- -latex_documents = [ - ('index', - 'None.tex', - u'Cloud Container Engine - User Guide', - u'OpenTelekomCloud', 'manual'), -] +latex_documents = []