
Currently for both upstream-training and training-guide directory slides are stored in the subdirectories of landing web pages. It is not easy to capture the directory structure and this requires Sphinx conf file to have unnecessary excluded entries. This commits reorganizes each directory to the following structure. It follows the convention in the documentation project. doc/upstream-training: (previous) +-- README.rst +-- website RST files +-- conf.py (for website) +-- build/ +-- source/ +-- slide RST files +-- conf.py (for slides) +-- _assets/ +-- _static/ +-- locale/ (new) +-- README.rst +-- build/ +-- source/ +-- website/ | +-- website RST files | +-- conf.py (for website) | +-- _assets/ +-- slides/ | +-- slide RST files | +-- conf.py (for slides) | +-- _assets/ | +-- _static/ +-- locales/ training-guide directory is reorganized similarly. training-guide _assets/README has been removed as it is used. Also updates tox.ini to share target command definitions. We do not need to have same things in many places. Note that this commit does not change the build document paths. Change-Id: I5a21f170c06d8f71f1f2d0df354e6d6280cb29d0
73 lines
2.4 KiB
INI
73 lines
2.4 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = checkbuild
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python2
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
install_command = pip install -U {opts} {packages}
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
whitelist_externals =
|
|
echo
|
|
mkdir
|
|
rm
|
|
rsync
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[doc8]
|
|
# Settings for doc8:
|
|
# File extensions to use
|
|
extension = .rst,.txt
|
|
ignore-path = doc/upstream-training/build/*,doc/training-guides/build/*
|
|
|
|
[testenv:checkbuild]
|
|
commands =
|
|
{[testenv:upstream-slides]commands}
|
|
{[testenv:training-slides]commands}
|
|
# Publish for check site
|
|
mkdir -p publish-docs/upstream-training
|
|
mkdir -p publish-docs/training-guides
|
|
rsync -av doc/upstream-training/build/slides/ publish-docs/upstream-training/
|
|
rsync -av doc/training-guides/build/slides/ publish-docs/training-guides/
|
|
|
|
[testenv:publishdocs]
|
|
passenv = ZUUL*
|
|
commands =
|
|
{[testenv:upstream-slides]commands}
|
|
{[testenv:training-slides]commands}
|
|
# Publish as draft
|
|
mkdir -p publish-docs/draft/training-guides
|
|
rsync -av doc/training-guides/build/slides/ publish-docs/draft/training-guides/
|
|
{toxinidir}/tools/add-marker.sh publish-docs/draft/training-guides/
|
|
# Publish
|
|
mkdir -p publish-docs/upstream-training
|
|
rsync -av doc/upstream-training/build/slides/ publish-docs/upstream-training/
|
|
{toxinidir}/tools/add-marker.sh publish-docs/upstream-training
|
|
# Publish translated guides
|
|
{toxinidir}/tools/buildlang.sh
|
|
|
|
[testenv:upstream-slides]
|
|
commands =
|
|
# Niceness test
|
|
doc8 doc/upstream-training
|
|
# Build upstream-training slides
|
|
sphinx-build -W -b slides -d doc/upstream-training/build/slides.doctrees doc/upstream-training/source/slides doc/upstream-training/build/slides
|
|
# Build upstream landing page index.html
|
|
sphinx-build -W -b html -d doc/upstream-training/build/slides.doctrees doc/upstream-training/source/website doc/upstream-training/build/slides
|
|
|
|
[testenv:training-slides]
|
|
commands =
|
|
# Niceness test
|
|
doc8 doc/training-guides
|
|
# Build training-guides slides
|
|
sphinx-build -W -b slides -d doc/training-guides/build/slides.doctrees/associate-guide doc/training-guides/source/slides doc/training-guides/build/slides/associate-guide
|
|
# Build training-guides landing page index.html
|
|
sphinx-build -b html -d doc/training-guides/build/slides.doctrees doc/training-guides/source/website doc/training-guides/build/slides
|
|
|
|
[testenv:generatepot-training]
|
|
# Generate POT files for translation
|
|
commands = {toxinidir}/tools/generatepot-training.sh
|