From c4b53d7a6566911fdf62e79d1fbc21ebde30ac4a Mon Sep 17 00:00:00 2001 From: vladimirhasko Date: Fri, 26 Jan 2024 11:23:36 +0000 Subject: [PATCH] Update tox.ini && conf.py file Performed-by: gitea/infra/otc-metadata/tools/generate_doc_confpy.py --- doc/blueprints/source/conf.py | 117 ++++++++++++++++++++++++++++++++++ doc/caf/source/conf.py | 117 ++++++++++++++++++++++++++++++++++ tox.ini | 32 +++++----- 3 files changed, 250 insertions(+), 16 deletions(-) create mode 100644 doc/blueprints/source/conf.py create mode 100644 doc/caf/source/conf.py diff --git a/doc/blueprints/source/conf.py b/doc/blueprints/source/conf.py new file mode 100644 index 0000000..fa287a8 --- /dev/null +++ b/doc/blueprints/source/conf.py @@ -0,0 +1,117 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# !!! +# This file is generated out of template in doc-exports repository. +# Beware overwriting it locally. + +import os +import sys + +extensions = [ + 'otcdocstheme', +] + +otcdocs_auto_name = False +otcdocs_auto_version = False + +project = 'Architecture Center' +otcdocs_repo_name = 'docs/architecture-center' +# Those variables are required for edit/bug links +otcdocs_git_fqdn = 'gitea.eco.tsi-dev.otc-service.com' +otcdocs_git_type = 'gitea' + +# Those variables are needed for indexing into OpenSearch +otcdocs_doc_environment = 'internal' +otcdocs_doc_link = '/architecture-center/blueprints/' +otcdocs_doc_title = 'Blueprints' +otcdocs_doc_type = 'blueprints' +otcdocs_service_category = 'other' +otcdocs_service_title = 'Architecture Center' +otcdocs_service_type = 'ac' +otcdocs_search_environment = 'hc_de' +otcdocs_search_url = "https://opensearch.eco.tsi-dev.otc-service.com/" + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath('../../')) +sys.path.insert(0, os.path.abspath('../')) +sys.path.insert(0, os.path.abspath('./')) + +# -- General configuration ---------------------------------------------------- +# https://docutils.sourceforge.io/docs/user/smartquotes.html - it does not +# what it is expected +smartquotes = False + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +# +source_encoding = 'utf-8' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +copyright = u'2022-present, Open Telekom Cloud' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +language = 'en' + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +show_authors = False + +# -- Options for HTML output -------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +# html_theme_path = ["."] +html_theme = 'otcdocs' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +html_theme_options = { + "disable_search": True, + "site_name": "Internal Documentation Portal", + "logo_url": "https://docs-int.otc-service.com", +} + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". + +html_title = "Architecture Center - Blueprints" + + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# 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', + 'architecture-center-blueprints.tex', + u'Architecture Center - Blueprints', + u'OpenTelekomCloud', 'manual'), +] diff --git a/doc/caf/source/conf.py b/doc/caf/source/conf.py new file mode 100644 index 0000000..c66dcc2 --- /dev/null +++ b/doc/caf/source/conf.py @@ -0,0 +1,117 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# !!! +# This file is generated out of template in doc-exports repository. +# Beware overwriting it locally. + +import os +import sys + +extensions = [ + 'otcdocstheme', +] + +otcdocs_auto_name = False +otcdocs_auto_version = False + +project = 'Architecture Center' +otcdocs_repo_name = 'docs/architecture-center' +# Those variables are required for edit/bug links +otcdocs_git_fqdn = 'gitea.eco.tsi-dev.otc-service.com' +otcdocs_git_type = 'gitea' + +# Those variables are needed for indexing into OpenSearch +otcdocs_doc_environment = 'internal' +otcdocs_doc_link = '/architecture-center/cloud-adoption-framework/' +otcdocs_doc_title = 'Cloud Adoption Framework' +otcdocs_doc_type = 'caf' +otcdocs_service_category = 'other' +otcdocs_service_title = 'Architecture Center' +otcdocs_service_type = 'ac' +otcdocs_search_environment = 'hc_de' +otcdocs_search_url = "https://opensearch.eco.tsi-dev.otc-service.com/" + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath('../../')) +sys.path.insert(0, os.path.abspath('../')) +sys.path.insert(0, os.path.abspath('./')) + +# -- General configuration ---------------------------------------------------- +# https://docutils.sourceforge.io/docs/user/smartquotes.html - it does not +# what it is expected +smartquotes = False + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +# +source_encoding = 'utf-8' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +copyright = u'2022-present, Open Telekom Cloud' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +language = 'en' + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +show_authors = False + +# -- Options for HTML output -------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +# html_theme_path = ["."] +html_theme = 'otcdocs' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +html_theme_options = { + "disable_search": True, + "site_name": "Internal Documentation Portal", + "logo_url": "https://docs-int.otc-service.com", +} + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". + +html_title = "Architecture Center - Cloud Adoption Framework" + + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# 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', + 'architecture-center-cloud-adoption-framework.tex', + u'Architecture Center - Cloud Adoption Framework', + u'OpenTelekomCloud', 'manual'), +] diff --git a/tox.ini b/tox.ini index 388e1cf..e2a8bdd 100644 --- a/tox.ini +++ b/tox.ini @@ -67,7 +67,7 @@ allowlist_externals = cp mkdir commands = - sphinx-build -W --keep-going -b html caf/source doc/build/html_temp/caf + sphinx-build -W --keep-going -b html doc/caf/source doc/build/html_temp/caf sphinx-minify --input-directory doc/build/html_temp/caf --output-directory doc/build/html/caf mkdir -p caf/build/html cp -av doc/build/html/caf caf/build/html @@ -80,7 +80,7 @@ allowlist_externals = mkdir sh commands = - sphinx-build -W --keep-going -b json caf/source doc/build/json/caf + sphinx-build -W --keep-going -b json doc/caf/source doc/build/json/caf # 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" @@ -97,13 +97,13 @@ allowlist_externals = bash cp commands = - rm -rf caf/build/pdf - sphinx-build -W --keep-going -b latex caf/source caf/build/pdf/ - bash -c "for f in caf/build/pdf/*.gif; do convert $f $\{f/%gif/png\}; done || true" - bash -c "for f in caf/build/pdf/*.tex; do sed -iorig 's/\.gif//g' $f; done" - make -C caf/build/pdf + rm -rf doc/caf/build/pdf + sphinx-build -W --keep-going -b latex doc/caf/source doc/caf/build/pdf/ + bash -c "for f in doc/caf/build/pdf/*.gif; do convert $f $\{f/%gif/png\}; done || true" + bash -c "for f in doc/caf/build/pdf/*.tex; do sed -iorig 's/\.gif//g' $f; done" + make -C doc/caf/build/pdf mkdir -p doc/build/pdf - cp caf/build/pdf/architecture-center-cloud-adoption-framework.pdf doc/build/pdf/ + cp doc/caf/build/pdf/architecture-center-cloud-adoption-framework.pdf doc/build/pdf/ # HTML version @@ -113,7 +113,7 @@ allowlist_externals = cp mkdir commands = - sphinx-build -W --keep-going -b html blueprints/source doc/build/html_temp/blueprints + sphinx-build -W --keep-going -b html doc/blueprints/source doc/build/html_temp/blueprints sphinx-minify --input-directory doc/build/html_temp/blueprints --output-directory doc/build/html/blueprints mkdir -p blueprints/build/html cp -av doc/build/html/blueprints blueprints/build/html @@ -126,7 +126,7 @@ allowlist_externals = mkdir sh commands = - sphinx-build -W --keep-going -b json blueprints/source doc/build/json/blueprints + sphinx-build -W --keep-going -b json doc/blueprints/source doc/build/json/blueprints # 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" @@ -143,13 +143,13 @@ allowlist_externals = bash cp commands = - rm -rf blueprints/build/pdf - sphinx-build -W --keep-going -b latex blueprints/source blueprints/build/pdf/ - bash -c "for f in blueprints/build/pdf/*.gif; do convert $f $\{f/%gif/png\}; done || true" - bash -c "for f in blueprints/build/pdf/*.tex; do sed -iorig 's/\.gif//g' $f; done" - make -C blueprints/build/pdf + rm -rf doc/blueprints/build/pdf + sphinx-build -W --keep-going -b latex doc/blueprints/source doc/blueprints/build/pdf/ + bash -c "for f in doc/blueprints/build/pdf/*.gif; do convert $f $\{f/%gif/png\}; done || true" + bash -c "for f in doc/blueprints/build/pdf/*.tex; do sed -iorig 's/\.gif//g' $f; done" + make -C doc/blueprints/build/pdf mkdir -p doc/build/pdf - cp blueprints/build/pdf/architecture-center-blueprints.pdf doc/build/pdf/ + cp doc/blueprints/build/pdf/architecture-center-blueprints.pdf doc/build/pdf/