|
|
|
@ -13,6 +13,8 @@ commands = stestr run {posargs}
|
|
|
|
|
stestr slowest
|
|
|
|
|
|
|
|
|
|
[testenv:pep8]
|
|
|
|
|
allowlist_externals =
|
|
|
|
|
doc8
|
|
|
|
|
commands =
|
|
|
|
|
doc8 doc/source README.rst
|
|
|
|
|
|
|
|
|
@ -26,7 +28,7 @@ commands = {posargs}
|
|
|
|
|
[testenv:docs]
|
|
|
|
|
deps =
|
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
|
-c https://raw.githubusercontent.com/opentelekomcloud-docs-swiss/docs-constraints/main/constraints.txt
|
|
|
|
|
-c https://raw.githubusercontent.com/opentelekomcloud-docs/docs-constraints/main/constraints.txt
|
|
|
|
|
allowlist_externals =
|
|
|
|
|
mkdir
|
|
|
|
|
cp
|
|
|
|
@ -42,7 +44,8 @@ commands =
|
|
|
|
|
{[testenv:json-{{ doc.type }}]commands}
|
|
|
|
|
{%- endfor %}
|
|
|
|
|
|
|
|
|
|
[testenv:docs-pdf]
|
|
|
|
|
{% if docs|length > 0 %}
|
|
|
|
|
[testenv:pdf-docs]
|
|
|
|
|
deps =
|
|
|
|
|
{[testenv:docs]deps}
|
|
|
|
|
{[testenv:bindeps]deps}
|
|
|
|
@ -55,16 +58,18 @@ allowlist_externals =
|
|
|
|
|
cp
|
|
|
|
|
commands =
|
|
|
|
|
mkdir -p doc/build/pdf
|
|
|
|
|
mkdir -p doc/build/html
|
|
|
|
|
{[testenv:bindeps]commands}
|
|
|
|
|
mkdir -p {toxinidir}/_templates
|
|
|
|
|
wget -O {toxinidir}/_templates/longtable.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/longtable.tex.jinja
|
|
|
|
|
wget -O {toxinidir}/_templates/tabular.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/tabular.tex.jinja
|
|
|
|
|
wget -O {toxinidir}/_templates/tabulary.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/tabulary.tex.jinja
|
|
|
|
|
{%- for doc in docs %}
|
|
|
|
|
{%- if doc.pdf_name %}
|
|
|
|
|
{%- if doc.pdf_enabled %}
|
|
|
|
|
{[testenv:{{ doc.type }}-pdf-docs]commands}
|
|
|
|
|
{%- endif %}
|
|
|
|
|
{%- endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% for doc in docs -%}
|
|
|
|
|
{% set loc = doc.rst_location | replace('/source', '') %}
|
|
|
|
@ -105,7 +110,6 @@ commands =
|
|
|
|
|
cp -av doc/build/json/{{ doc.type }} {{ doc.type }}/build/json
|
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
|
|
{% if doc.pdf_name -%}
|
|
|
|
|
# PDF version
|
|
|
|
|
[testenv:{{ doc.type }}-pdf-docs]
|
|
|
|
|
deps = {[testenv:docs]deps}
|
|
|
|
@ -119,12 +123,12 @@ commands =
|
|
|
|
|
rm -rf {{ loc }}/build/pdf
|
|
|
|
|
cp -r {toxinidir}/_templates {{ loc }}/source/_templates/
|
|
|
|
|
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/*.gif; do convert $f[0] $\{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
|
|
|
|
|
make -C {{ loc }}/build/pdf LATEXMKOPTS="-interaction=nonstopmode"
|
|
|
|
|
mkdir -p doc/build/pdf
|
|
|
|
|
cp {{ loc }}/build/pdf/{{ doc.pdf_name }}.pdf doc/build/pdf/
|
|
|
|
|
{% endif %}
|
|
|
|
|
cp {{ loc }}/build/pdf/{{ service_type }}-{{ doc.type }}.pdf doc/build/pdf/
|
|
|
|
|
cp {{ loc }}/build/pdf/{{ service_type }}-{{ doc.type }}.pdf doc/build/html/
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
[testenv:bindeps]
|
|
|
|
|