[training] Fix warnings in training guides

Use toctree in slide-index.rst to ensure all documents are listed
in toctree to avoid sphinx warnings.

Exclude associate-guides from HTML build. Also remove 'source' from
doc/training-guides/conf.py as it does not exists in doc/training-guide.

Ensure associate-guide/notes files are in toctree to avoid sphinx warnings.
These files are referred to by including them, so hidden toctrees are used.

Also specifies sphinx-build -W option to detect warnings.

Change-Id: I298202e3304d02f362cc4bf9cc58686857040fd8
This commit is contained in:
Akihiro Motoki 2016-10-03 02:46:57 +09:00
parent 82731ddab0
commit 5e0f091688
6 changed files with 34 additions and 37 deletions

View File

@ -5,6 +5,14 @@ Getting started quiz
:class: fill
:width: 100%
.. We use notes/02-getting-started by including it.
To avoid sphinx warning, we need to have it in some toctree.
.. toctree::
:hidden:
notes/02-getting-started.rst
Getting started quiz questions
------------------------------

View File

@ -5,6 +5,14 @@ Compute node quiz
:class: fill
:width: 100%
.. We use notes/02-getting-started by including it.
To avoid sphinx warning, we need to have it in some toctree.
.. toctree::
:hidden:
notes/06-compute-node.rst
Compute node quiz questions
---------------------------

View File

@ -9,17 +9,21 @@ OpenStack Training Guides - Associate Guide
Modules
=======
- `Getting started <01-getting-started.html>`_
- `Using with horizon <03-using-with-horizon.html>`_
- `Using with CLI <04-using-with-cli.html>`_
- `OpenStack networking <07-associate-network-node.html>`_
- `OpenStack compute <compute-overview.html>`_
.. toctree::
:maxdepth: 1
01-getting-started.rst
Using with horizon <03-using-with-horizon.rst>
Using with CLI <04-using-with-cli.rst>
OpenStack Networking <07-associate-network-node.rst>
OpenStack Compute <compute-overview.rst>
Quizzes
=======
- `Getting started quiz <02-getting-started-quiz.html>`_
- `Compute node <06-compute-node-quiz.html>`_
.. toctree::
:maxdepth: 1
Getting started quiz <02-getting-started-quiz.rst>
Compute node <06-compute-node-quiz.rst>

View File

@ -84,7 +84,7 @@ html_context = {"gitsha": gitsha, "bug_tag": bug_tag,
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['source', 'build']
exclude_patterns = ['associate-guide', 'build']
# The reST default role (used for this markup: `text`) to use for all
# documents.

View File

@ -1,23 +0,0 @@
=========================
OpenStack Training Guides
=========================
.. image:: figures/os_background.png
:class: fill
:width: 100%
Associate Guide - Modules
=========================
- `Using with horizon <associate-guide/03-using-with-horizon.html>`_
- `OpenStack networking <associate-guide/07-associate-network-node.html>`_
- `OpenStack compute <associate-guide/compute-overview.html>`_
Associate Guide - Quizzes
=========================
- `Getting started <associate-guide/02-getting-started-quiz.html>`_
- `Compute node <associate-guide/06-compute-node-quiz.html>`_

10
tox.ini
View File

@ -33,7 +33,7 @@ commands =
# Build upstream landing page
sphinx-build -W -b html -d doc/upstream-training/build/slides.doctrees doc/upstream-training doc/upstream-training/build/slides
# Build training-guides slides
sphinx-build -b slides -d doc/training-guides/build/slides.doctrees/associate-guide doc/training-guides/associate-guide/ doc/training-guides/build/slides/associate-guide
sphinx-build -W -b slides -d doc/training-guides/build/slides.doctrees/associate-guide doc/training-guides/associate-guide/ doc/training-guides/build/slides/associate-guide
# Build training-guides landing page
sphinx-build -b html -d doc/training-guides/build/slides.doctrees doc/training-guides doc/training-guides/build/slides doc/training-guides/index.rst
# Publish for check site
@ -50,9 +50,9 @@ commands =
# Build upstream landing page
sphinx-build -W -b html -d doc/upstream-training/build/slides.doctrees/ doc/upstream-training doc/upstream-training/build/slides
# Build training-guides slides
sphinx-build -b slides -d doc/training-guides/build/slides.doctrees/associate-guide doc/training-guides/associate-guide/ doc/training-guides/build/slides/associate-guide
sphinx-build -W -b slides -d doc/training-guides/build/slides.doctrees/associate-guide doc/training-guides/associate-guide/ doc/training-guides/build/slides/associate-guide
# Build training-guides landing page
sphinx-build -b html -d doc/training-guides/build/slides.doctrees doc/training-guides doc/training-guides/build/slides doc/training-guides/index.rst
sphinx-build -W -b html -d doc/training-guides/build/slides.doctrees doc/training-guides doc/training-guides/build/slides doc/training-guides/index.rst
# Publish as draft
mkdir -p publish-docs/draft/training-guides
rsync -av doc/training-guides/build/slides/ publish-docs/draft/training-guides/
@ -78,9 +78,9 @@ commands =
# Niceness test
doc8 doc/training-guides
# Build training-guides slides
sphinx-build -b slides doc/training-guides/associate-guide/ doc/training-guides/build/slides/associate-guide
sphinx-build -W -b slides doc/training-guides/associate-guide/ doc/training-guides/build/slides/associate-guide
# Build training-guides landing page index.html
sphinx-build -b html doc/training-guides doc/training-guides/build/slides doc/training-guides/index.rst
sphinx-build -W -b html doc/training-guides doc/training-guides/build/slides doc/training-guides/index.rst
[testenv:generatepot-training]
# Generate POT files for translation