ce3ba6d4d8
Enable HTML tabs in output pages. This is initially for use differentiating virtual from bare-metal instructions in a consolidated Install doc. Since virtual content is currently StarlingX-only, content must be conditionalized as in: .. present tabbed content choice to StarlingX builds .. only:: virtual .. tabs:: .. tab:: Virtual Apples are green, or sometimes red. .. tab:: Bare Metal .. bare-metal-pear-begin Pears are green. .. bare-metal-pear-end .. Present bare-metal only to non-StarlingX builds as non-tabbed content .. only:: partner .. include:: this-file.rst :start-after: bare-metal-pear-begin :end-before: bare-metal-pear-end Signed-off-by: Ron Stone <ronald.stone@windriver.com> Change-Id: Ib65cf59f510e685a82c3d1ab046cb656d0f2fba1
110 lines
3.9 KiB
INI
110 lines
3.9 KiB
INI
[tox]
|
|
envlist = docs,linters
|
|
minversion = 2.9
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_TEST_TIMEOUT=60
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:prebuild-docs]
|
|
commands =
|
|
git clean -dfx doc/source/fault-mgmt/
|
|
bash ./dirtyCheck.sh
|
|
bash ./get-remote-files.sh -c templates/events.sh -o file -f
|
|
python parser.py -l templates/alarms_template.rst -e tmp/events.yaml -s 100,200,300,400,500,700,800,900 -ts = -type Alarm -outputPath doc/source/fault-mgmt/kubernetes/ -sort Yes -product starlingx -replace "|,OR"
|
|
python parser.py -l templates/logs_template.rst -e tmp/events.yaml -s 100,200,300,400,500,700,800,900 -ts = -type Log -outputPath doc/source/fault-mgmt/kubernetes/ -sort Yes -product starlingx -replace "|,OR"
|
|
python parser.py -l templates/alarms_template.rst -e tmp/events.yaml -s 100,200,300,400,500,700,800,900 -ts = -type Alarm -outputPath doc/source/fault-mgmt/openstack/ -sort Yes -product openstack -replace "|,OR"
|
|
python parser.py -l templates/logs_template.rst -e tmp/events.yaml -s 100,200,300,400,500,700,800,900 -ts = -type Log -outputPath doc/source/fault-mgmt/openstack/ -sort Yes -product openstack -replace "|,OR"
|
|
bash ./normalize-includes.sh
|
|
|
|
[testenv:postbuild-docs]
|
|
commands =
|
|
git clean -dfx doc/source/fault-mgmt/
|
|
git restore doc/source/dist_cloud/kubernetes/*
|
|
bash hw-updates.sh
|
|
bash htmlChecks.sh doc/build/html
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
# -c{env:TOX_CONSTRAINTS_FILE:doc/upper-constraints.txt}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
{[testenv:prebuild-docs]commands}
|
|
sphinx-build -a -E -W --keep-going -d doc/build/doctrees -t starlingx -t openstack -t virtual -b html doc/source doc/build/html {posargs}
|
|
{[testenv:postbuild-docs]commands}
|
|
# Note: The dev env for the docs team uses a version of tox that does not yet support allowlist_externals
|
|
whitelist_externals = bash
|
|
htmlChecks.sh
|
|
get-remote-files.sh
|
|
git
|
|
# hw-updates.sh
|
|
|
|
[testenv:singledoc]
|
|
deps =
|
|
# -c{env:TOX_CONSTRAINTS_FILE:doc/upper-constraints.txt}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
{[testenv:prebuild-docs]commands}
|
|
sphinx-build -a -E -W --keep-going -d doc/build/doctrees -t starlingx -t openstack -b singlehtml doc/source doc/build/singlepage {posargs}
|
|
{[testenv:postbuild-docs]commands}
|
|
whitelist_externals = bash
|
|
htmlChecks.sh
|
|
get-remote-files.sh
|
|
git
|
|
|
|
[testenv:api-ref]
|
|
deps = {[testenv:docs]deps}
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
whitelist_externals = rm
|
|
|
|
[testenv:linters]
|
|
whitelist_externals = bash
|
|
commands =
|
|
bash -c "find {toxinidir} \
|
|
\( -name .tox -prune \) \
|
|
-o -type f -name '*.yaml' \
|
|
-print0 | xargs -0 yamllint -d '\{extends: relaxed, rules: \{line-length: \{max: 260\}\}\}'"
|
|
# -print0 | xargs -0 yamllint"
|
|
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
|
|
[testenv:newfile]
|
|
passenv=PWD
|
|
commands =
|
|
bash -c "echo Running in {env:PWD}"
|
|
bash new-topic.sh {env:PWD} {toxinidir}
|
|
whitelist_externals = new-topic.sh
|
|
bash
|
|
|
|
[testenv:picks]
|
|
commands =
|
|
./pickCompare.sh
|
|
whitelist_externals = pickCompare.sh
|
|
bash
|
|
|
|
|
|
[testenv:linkcheck]
|
|
deps =
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -a -E -W --keep-going -d doc/build/doctrees -t starlingx -t openstack -b linkcheck doc/source doc/build/linkcheck {posargs}
|
|
|
|
|
|
[testenv:spellcheck]
|
|
deps =
|
|
-r{toxinidir}/doc/requirements.txt
|
|
sphinxcontrib-spelling==7.3.2
|
|
commands =
|
|
sphinx-build -a -E --keep-going -d doc/build/doctrees -t starlingx -t openstack -t use_spellext -b spelling doc/source doc/build/spelling {posargs}
|
|
|