forked from infra/otc-metadata
update scripts for latest templates
This commit is contained in:
parent
338c58e5fa
commit
a4dd457062
@ -74,9 +74,10 @@ documents:
|
|||||||
- hc_location: bpicg/bms
|
- hc_location: bpicg/bms
|
||||||
html_location: docs/bms/image-creation-guide
|
html_location: docs/bms/image-creation-guide
|
||||||
pdf_name: bms-image-creation-guide
|
pdf_name: bms-image-creation-guide
|
||||||
rst_location: doc/image-creation-guide
|
rst_location: doc/image-creation-guide/source
|
||||||
service_type: bms
|
service_type: bms
|
||||||
title: Private Image Creation Guide
|
title: Private Image Creation Guide
|
||||||
|
type: image-creation-guide
|
||||||
- hc_location: usermanual/bms
|
- hc_location: usermanual/bms
|
||||||
html_location: docs/bms/umn
|
html_location: docs/bms/umn
|
||||||
link: /umn/bare-metal-server/
|
link: /umn/bare-metal-server/
|
||||||
@ -112,7 +113,7 @@ documents:
|
|||||||
- hc_location: usermanual2/cce
|
- hc_location: usermanual2/cce
|
||||||
html_location: docs/cce/umn
|
html_location: docs/cce/umn
|
||||||
link: /umn/cloud-container-engine/
|
link: /umn/cloud-container-engine/
|
||||||
pdf_name: cce-umn
|
# pdf_name: cce-umn
|
||||||
rst_location: umn/source
|
rst_location: umn/source
|
||||||
service_type: cce
|
service_type: cce
|
||||||
title: User Guide
|
title: User Guide
|
||||||
@ -355,6 +356,7 @@ documents:
|
|||||||
rst_location: doc/tool/source
|
rst_location: doc/tool/source
|
||||||
service_type: dws
|
service_type: dws
|
||||||
title: Tool Guide
|
title: Tool Guide
|
||||||
|
type: tool-guide
|
||||||
- hc_location: usermanual/dws
|
- hc_location: usermanual/dws
|
||||||
html_location: docs/dws/umn
|
html_location: docs/dws/umn
|
||||||
link: /umn/data-warehouse-service/
|
link: /umn/data-warehouse-service/
|
||||||
@ -392,6 +394,7 @@ documents:
|
|||||||
rst_location: umn/source
|
rst_location: umn/source
|
||||||
service_type: edb
|
service_type: edb
|
||||||
title: User Guide
|
title: User Guide
|
||||||
|
type: manual
|
||||||
- hc_location: api/eip
|
- hc_location: api/eip
|
||||||
html_location: docs/eip/api-ref
|
html_location: docs/eip/api-ref
|
||||||
link: /api-ref/elastic-ip/
|
link: /api-ref/elastic-ip/
|
||||||
@ -509,9 +512,10 @@ documents:
|
|||||||
type: dev
|
type: dev
|
||||||
- html_location: docs/ims/public-images
|
- html_location: docs/ims/public-images
|
||||||
pdf_name: ims-public-images
|
pdf_name: ims-public-images
|
||||||
rst_location: docs/ims/public-images
|
rst_location: doc/public-images/source
|
||||||
service_type: ims
|
service_type: ims
|
||||||
title: Public Image Introduction
|
title: Public Image Introduction
|
||||||
|
type: public-images
|
||||||
- hc_location: usermanual/ims
|
- hc_location: usermanual/ims
|
||||||
html_location: docs/ims/umn
|
html_location: docs/ims/umn
|
||||||
link: /umn/image-management-service/
|
link: /umn/image-management-service/
|
||||||
@ -579,9 +583,10 @@ documents:
|
|||||||
- hc_location: cmpntguide/mrs
|
- hc_location: cmpntguide/mrs
|
||||||
html_location: docs/mrs/component-operation-guide
|
html_location: docs/mrs/component-operation-guide
|
||||||
pdf_name: mrs-component-operation-guide
|
pdf_name: mrs-component-operation-guide
|
||||||
rst_location: docs/mrs/component-operation-guide
|
rst_location: doc/component-operation-guide/source
|
||||||
service_type: mrs
|
service_type: mrs
|
||||||
title: Component Operation Guide
|
title: Component Operation Guide
|
||||||
|
type: operation-guide
|
||||||
- hc_location: usermanual/mrs
|
- hc_location: usermanual/mrs
|
||||||
html_location: docs/mrs/umn
|
html_location: docs/mrs/umn
|
||||||
link: /umn/mapreduce-service/
|
link: /umn/mapreduce-service/
|
||||||
@ -628,13 +633,7 @@ documents:
|
|||||||
rst_location: doc/s3api/source
|
rst_location: doc/s3api/source
|
||||||
service_type: obs
|
service_type: obs
|
||||||
title: S3 API Reference
|
title: S3 API Reference
|
||||||
- doc_type: s3cmd
|
type: s3api
|
||||||
hc_location: ugs3cmd/obs
|
|
||||||
html_location: docs/obs/s3cmd
|
|
||||||
pdf_name: obs-s3cmd
|
|
||||||
rst_location: doc/s3cmd/source
|
|
||||||
service_type: obs
|
|
||||||
title: Third-Party Client (s3cmd)
|
|
||||||
- hc_location: usermanual/obs
|
- hc_location: usermanual/obs
|
||||||
html_location: docs/obs/umn
|
html_location: docs/obs/umn
|
||||||
link: /umn/object-storage-service/
|
link: /umn/object-storage-service/
|
||||||
@ -757,12 +756,6 @@ documents:
|
|||||||
service_type: sfs
|
service_type: sfs
|
||||||
title: API Reference
|
title: API Reference
|
||||||
type: api-ref
|
type: api-ref
|
||||||
- hc_location: api_cli/sfs
|
|
||||||
html_location: docs/sfs/cli
|
|
||||||
pdf_name: sfs-cli
|
|
||||||
rst_location: doc/cli/source
|
|
||||||
service_type: sfs
|
|
||||||
title: Manila Client Reference
|
|
||||||
- hc_location: usermanual/sfs
|
- hc_location: usermanual/sfs
|
||||||
html_location: docs/sfs/umn
|
html_location: docs/sfs/umn
|
||||||
link: /umn/scalable-file-service/
|
link: /umn/scalable-file-service/
|
||||||
|
@ -195,8 +195,9 @@ class Services(object):
|
|||||||
rst_location=doc["rst_location"],
|
rst_location=doc["rst_location"],
|
||||||
title=doc["title"],
|
title=doc["title"],
|
||||||
type=doc.get("type", "dummy"),
|
type=doc.get("type", "dummy"),
|
||||||
pdf_name=doc["pdf_name"],
|
|
||||||
)
|
)
|
||||||
|
if "pdf_name" in doc:
|
||||||
|
doc_res["pdf_name"] = doc["pdf_name"]
|
||||||
if "hc_location" in doc:
|
if "hc_location" in doc:
|
||||||
doc_res["hc_location"] = doc["hc_location"]
|
doc_res["hc_location"] = doc["hc_location"]
|
||||||
srv_res["docs"].append(doc_res)
|
srv_res["docs"].append(doc_res)
|
||||||
|
@ -27,12 +27,12 @@ otcdocs_auto_version = False
|
|||||||
project = '{{ project }}'
|
project = '{{ project }}'
|
||||||
otcdocs_repo_name = '{{ repo_name }}'
|
otcdocs_repo_name = '{{ repo_name }}'
|
||||||
# Those variables are required for edit/bug links
|
# Those variables are required for edit/bug links
|
||||||
{% if git_fqdn -%}
|
{%- if git_fqdn %}
|
||||||
otcdocs_git_fqdn = '{{ git_fqdn }}'
|
otcdocs_git_fqdn = '{{ git_fqdn }}'
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
{% if git_type -%}
|
{%- if git_type %}
|
||||||
otcdocs_git_type = '{{ git_type }}'
|
otcdocs_git_type = '{{ git_type }}'
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# 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
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
@ -82,6 +82,15 @@ html_theme = 'otcdocs'
|
|||||||
# further. For a list of options available for each theme, see the
|
# further. For a list of options available for each theme, see the
|
||||||
# documentation.
|
# documentation.
|
||||||
html_theme_options = {
|
html_theme_options = {
|
||||||
|
{%- if html_options is defined -%}
|
||||||
|
{%- for (k, v) in html_options.items() %}
|
||||||
|
{%- if v is boolean %}
|
||||||
|
"{{ k }}": {{ v }},
|
||||||
|
{%- else %}
|
||||||
|
"{{ k }}": "{{ v }}",
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
# The name for this set of Sphinx documents. If None, it defaults to
|
# The name for this set of Sphinx documents. If None, it defaults to
|
||||||
@ -97,10 +106,11 @@ html_static_path = ['_static']
|
|||||||
|
|
||||||
# -- Options for PDF output --------------------------------------------------
|
# -- Options for PDF output --------------------------------------------------
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
{% if pdf_name is defined -%}
|
{%- if pdf_name is defined %}
|
||||||
('index',
|
('index',
|
||||||
'{{ pdf_name }}.tex',
|
'{{ pdf_name }}.tex',
|
||||||
u'{{ title }}',
|
u'{{ title }}',
|
||||||
u'OpenTelekomCloud', 'manual'),
|
u'OpenTelekomCloud', 'manual'),
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
4
otc_metadata/templates/doc_requirements.txt.j2
Normal file
4
otc_metadata/templates/doc_requirements.txt.j2
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
sphinx>=2.0.0,!=2.1.0 # BSD
|
||||||
|
otcdocstheme # Apache-2.0
|
||||||
|
# releasenotes
|
||||||
|
reno>=3.1.0 # Apache-2.0
|
77
otc_metadata/templates/tox.ini.j2
Normal file
77
otc_metadata/templates/tox.ini.j2
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
[tox]
|
||||||
|
minversion = 3.1
|
||||||
|
envlist = py39,pep8
|
||||||
|
skipsdist = True
|
||||||
|
ignore_basepython_conflict = True
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
usedevelop = True
|
||||||
|
install_command = pip install {opts} {packages}
|
||||||
|
deps =
|
||||||
|
-r{toxinidir}/requirements.txt
|
||||||
|
commands = stestr run {posargs}
|
||||||
|
stestr slowest
|
||||||
|
|
||||||
|
[testenv:pep8]
|
||||||
|
commands =
|
||||||
|
doc8 doc/source README.rst
|
||||||
|
|
||||||
|
[testenv:venv]
|
||||||
|
deps =
|
||||||
|
-r{toxinidir}/requirements.txt
|
||||||
|
commands = {posargs}
|
||||||
|
|
||||||
|
[testenv:docs]
|
||||||
|
commands =
|
||||||
|
{%- for doc in docs %}
|
||||||
|
{[testenv:{{ doc.type }}]commands}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
[testenv:docs-pdf]
|
||||||
|
whitelist_externals =
|
||||||
|
mkdir
|
||||||
|
commands =
|
||||||
|
mkdir -p doc/build/pdf
|
||||||
|
{%- for doc in docs %}
|
||||||
|
{%- if doc.pdf_name %}
|
||||||
|
{[testenv:{{ doc.type }}-pdf-docs]commands}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
{% for doc in docs -%}
|
||||||
|
{% set loc = doc.rst_location | replace('/source', '') %}
|
||||||
|
[testenv:{{ doc.type }}]
|
||||||
|
whitelist_externals =
|
||||||
|
cp
|
||||||
|
mkdir
|
||||||
|
commands =
|
||||||
|
sphinx-build -W --keep-going -b html {{ loc }}/source doc/build/html/{{ doc.type }}
|
||||||
|
{%- if doc.type == 'api-ref' %}
|
||||||
|
mkdir -p api-ref/build/html
|
||||||
|
cp -av doc/build/html/api-ref api-ref/build/html
|
||||||
|
{%- elif doc.type == 'umn' %}
|
||||||
|
mkdir -p umn/build/html
|
||||||
|
cp -av doc/build/html/umn umn/build/html
|
||||||
|
{%- elif doc.type == 'dev-guide' %}
|
||||||
|
mkdir -p dev_guide/build/html
|
||||||
|
cp -av doc/build/html/dev-guide dev_guide/build/html
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{% if doc.pdf_name -%}
|
||||||
|
[testenv:{{ doc.type }}-pdf-docs]
|
||||||
|
whitelist_externals =
|
||||||
|
rm
|
||||||
|
mkdir
|
||||||
|
make
|
||||||
|
bash
|
||||||
|
cp
|
||||||
|
commands =
|
||||||
|
rm -rf {{ loc }}/build/pdf
|
||||||
|
sphinx-build -W --keep-going -b latex {{ loc }}/source {{ loc }}/build/pdf/
|
||||||
|
bash -c "for f in {{ loc }}/build/pdf/*.gif; do convert $f $\{f/%gif/png\}; done || true"
|
||||||
|
bash -c "for f in {{ loc }}/build/pdf/*.tex; do sed -iorig 's/\.gif//g' $f; done"
|
||||||
|
make -C {{ loc }}/build/pdf
|
||||||
|
mkdir -p doc/build/pdf
|
||||||
|
cp {{ loc }}/build/pdf/{{ doc.pdf_name }}.pdf doc/build/pdf/
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user