From 9f44f79a2d0aba8e41d10b0d1a8a183a0309b95d Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Wed, 8 Jul 2015 07:54:23 -0700 Subject: [PATCH] Fix the module index link in the docs Since we weren't autodoc'ing the modules during the docs build, the module index link was broken. This generates the module docs (but hides them from the main top-level table of contents) so they can be accessed via the 'Module Index' link. Also cleans up some docs issues so that warnerrors=True works during sphinx-build. Closes-Bug: #1472642 Change-Id: I5a3a16d1e81b12237452d5a3a3f7f0cc42618e88 --- .gitignore | 1 + CONTRIBUTING.rst | 4 ++++ doc/source/index.rst | 8 ++++++++ elastic_recheck/results.py | 9 ++++++--- setup.cfg | 4 ++++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index cfbf22d8..8298eb92 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ output/*/index.html # Sphinx doc/build +doc/source/api/* # pbr generates these AUTHORS diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index c66913be..a2bbf6a3 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,3 +1,7 @@ +============ +Contributing +============ + If you would like to contribute to the development of OpenStack, you must follow the steps in this page: diff --git a/doc/source/index.rst b/doc/source/index.rst index 61174b46..2b8b65c9 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -16,6 +16,14 @@ Contents: usage contributing +.. # NOTE(mriedem): This is where we hide things that we don't want shown in + # the top level table of contents. api/autoindex is hidden since it's in + # the modindex link below. +.. toctree:: + :hidden: + + api/autoindex + Indices and tables ================== diff --git a/elastic_recheck/results.py b/elastic_recheck/results.py index e17c85c2..cf79999f 100644 --- a/elastic_recheck/results.py +++ b/elastic_recheck/results.py @@ -75,9 +75,12 @@ class ResultSet(list): natural. For instance: - results = se.search(...) - for hit in results: - print hit.build_status + + :: + + results = se.search(...) + for hit in results: + print hit.build_status This greatly simplifies code that is interacting with search results, and allows us to handle some schema instability with elasticsearch, through diff --git a/setup.cfg b/setup.cfg index 238ca26f..f75ae4a2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,3 +53,7 @@ input_file = elastic_recheck/locale/elastic-recheck.pot keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg output_file = elastic_recheck/locale/elastic-recheck.pot + +[pbr] +autodoc_index_modules = True +warnerrors = True