From 5e0f0916886580486315a7d92089230dda3812c3 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Mon, 3 Oct 2016 02:46:57 +0900 Subject: [PATCH] [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 --- .../02-getting-started-quiz.rst | 8 +++++++ .../associate-guide/06-compute-node-quiz.rst | 8 +++++++ .../associate-guide/slide-index.rst | 20 +++++++++------- doc/training-guides/conf.py | 2 +- doc/training-guides/slide-index.rst | 23 ------------------- tox.ini | 10 ++++---- 6 files changed, 34 insertions(+), 37 deletions(-) delete mode 100644 doc/training-guides/slide-index.rst diff --git a/doc/training-guides/associate-guide/02-getting-started-quiz.rst b/doc/training-guides/associate-guide/02-getting-started-quiz.rst index 1739bb85..6afe8bea 100755 --- a/doc/training-guides/associate-guide/02-getting-started-quiz.rst +++ b/doc/training-guides/associate-guide/02-getting-started-quiz.rst @@ -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 ------------------------------ diff --git a/doc/training-guides/associate-guide/06-compute-node-quiz.rst b/doc/training-guides/associate-guide/06-compute-node-quiz.rst index 50a7b241..b6eb3a64 100755 --- a/doc/training-guides/associate-guide/06-compute-node-quiz.rst +++ b/doc/training-guides/associate-guide/06-compute-node-quiz.rst @@ -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 --------------------------- diff --git a/doc/training-guides/associate-guide/slide-index.rst b/doc/training-guides/associate-guide/slide-index.rst index f48f9af1..678a5a9f 100644 --- a/doc/training-guides/associate-guide/slide-index.rst +++ b/doc/training-guides/associate-guide/slide-index.rst @@ -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 `_ +.. 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 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> diff --git a/doc/training-guides/conf.py b/doc/training-guides/conf.py index dc1454db..bd612774 100644 --- a/doc/training-guides/conf.py +++ b/doc/training-guides/conf.py @@ -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. diff --git a/doc/training-guides/slide-index.rst b/doc/training-guides/slide-index.rst deleted file mode 100644 index c97b1578..00000000 --- a/doc/training-guides/slide-index.rst +++ /dev/null @@ -1,23 +0,0 @@ -========================= -OpenStack Training Guides -========================= - -.. image:: figures/os_background.png - :class: fill - :width: 100% - -Associate Guide - Modules -========================= - -- `Using with horizon `_ -- `OpenStack networking `_ -- `OpenStack compute `_ - - -Associate Guide - Quizzes -========================= - -- `Getting started `_ -- `Compute node `_ - - diff --git a/tox.ini b/tox.ini index b57adf40..d95fbe55 100644 --- a/tox.ini +++ b/tox.ini @@ -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