forked from docs/internal-documentation
Update tox.ini && conf.py file
Performed-by: gitea/infra/otc-metadata/tools/generate_doc_confpy.py
This commit is contained in:
parent
a810c319de
commit
dbe3a71bfd
@ -1,4 +1,11 @@
|
|||||||
sphinx>=2.0.0,!=2.1.0 # BSD
|
sphinx>=2.0.0,!=2.1.0 # BSD
|
||||||
|
|
||||||
otcdocstheme # Apache-2.0
|
otcdocstheme # Apache-2.0
|
||||||
|
|
||||||
# releasenotes
|
# releasenotes
|
||||||
reno>=3.1.0 # Apache-2.0
|
reno>=3.1.0 # Apache-2.0
|
||||||
|
|
||||||
|
otc-sphinx-directives>=0.1.0
|
||||||
|
sphinx-minify>=0.0.1 # Apache-2.0
|
||||||
|
git+https://gitea.eco.tsi-dev.otc-service.com/infra/otc-metadata.git#egg=otc_metadata
|
||||||
|
setuptools
|
62
tox.ini
62
tox.ini
@ -1,6 +1,6 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 3.1
|
minversion = 3.1
|
||||||
envlist = py310,pep8
|
envlist = py39,pep8
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
ignore_basepython_conflict = True
|
ignore_basepython_conflict = True
|
||||||
|
|
||||||
@ -8,24 +8,68 @@ ignore_basepython_conflict = True
|
|||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install {opts} {packages}
|
install_command = pip install {opts} {packages}
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
commands = stestr run {posargs}
|
commands = stestr run {posargs}
|
||||||
stestr slowest
|
stestr slowest
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
allowlist_externals =
|
|
||||||
doc8
|
|
||||||
commands =
|
commands =
|
||||||
doc8 doc/source README.rst
|
doc8 doc/source README.rst
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
|
# This env is invoked in the periodic pipeline and is therefore responsible to
|
||||||
|
# build all relevant docs at once.
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-r{toxinidir}/doc/requirements.txt
|
||||||
|
-c https://raw.githubusercontent.com/opentelekomcloud-docs/docs-constraints/main/constraints.txt
|
||||||
|
allowlist_externals =
|
||||||
|
mkdir
|
||||||
|
cp
|
||||||
|
sh
|
||||||
|
rm
|
||||||
|
sphinx-build
|
||||||
commands =
|
commands =
|
||||||
sphinx-build -W --keep-going -b html doc/source/ doc/build/html
|
rm -rf doc/build/html doc/build/html_temp doc/build/doctrees
|
||||||
|
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html_temp
|
||||||
|
sphinx-minify --input-directory doc/build/html_temp/ --output-directory doc/build/html
|
||||||
|
|
||||||
|
[testenv:docs-pdf]
|
||||||
|
deps =
|
||||||
|
{[testenv:docs]deps}
|
||||||
|
{[testenv:bindeps]deps}
|
||||||
|
allowlist_externals =
|
||||||
|
rm
|
||||||
|
mkdir
|
||||||
|
wget
|
||||||
|
make
|
||||||
|
bash
|
||||||
|
cp
|
||||||
|
commands =
|
||||||
|
mkdir -p doc/build/pdf
|
||||||
|
{[testenv:bindeps]commands}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[testenv:bindeps]
|
||||||
|
deps =
|
||||||
|
bindep
|
||||||
|
allowlist_externals =
|
||||||
|
wget
|
||||||
|
rm
|
||||||
|
bash
|
||||||
|
commands =
|
||||||
|
rm -rf {toxinidir}/bindep.txt
|
||||||
|
rm -rf {toxinidir}/packages.txt
|
||||||
|
wget -O {toxinidir}/bindep.txt https://raw.githubusercontent.com/opentelekomcloud/otcdocstheme/main/bindep.txt
|
||||||
|
bash -c "bindep test -b -f {toxinidir}/bindep.txt > {toxinidir}/packages.txt || true"
|
||||||
|
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v apt &>/dev/null; then apt update && xargs apt install --no-install-recommends -y < {toxinidir}/packages.txt; fi; fi'
|
||||||
|
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v dnf &>/dev/null; then dnf install -y $(cat {toxinidir}/packages.txt); fi; fi'
|
||||||
|
|
||||||
|
[doc8]
|
||||||
|
ignore = D001
|
||||||
|
extensions = .rst, .yaml
|
Loading…
x
Reference in New Issue
Block a user