| 1 | # Copyright 2015 OpenStack Foundation |
| 2 | # All Rights Reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 | # not use this file except in compliance with the License. You may obtain |
| 6 | # a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | # License for the specific language governing permissions and limitations |
| 14 | # under the License. |
| 15 | |
| 16 | import os |
| 17 | import sys |
| 18 | |
| 19 | |
| 20 | sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), |
| 21 | '..', '..'))) |
| 22 | |
| 23 | # -- General configuration ---------------------------------------------------- |
| 24 | |
| 25 | # Add any Sphinx extension module names here, as strings. They can be |
| 26 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| 27 | extensions = [ |
| 28 | 'openstackdocstheme', |
| 29 | 'sphinxcontrib.apidoc', |
| 30 | ] |
| 31 | |
| 32 | # sphinxcontrib.apidoc options |
| 33 | apidoc_module_dir = '../../glanceclient' |
| 34 | apidoc_output_dir = 'reference/api' |
| 35 | apidoc_excluded_paths = [ |
| 36 | 'tests/*', |
| 37 | 'tests'] |
| 38 | apidoc_separate_modules = True |
| 39 | |
| 40 | # openstackdocstheme options |
| 41 | openstackdocs_repo_name = 'openstack/python-glanceclient' |
| 42 | openstackdocs_bug_project = 'python-glanceclient' |
| 43 | openstackdocs_bug_tag = '' |
| 44 | |
| 45 | # autodoc generation is a bit aggressive and a nuisance when doing heavy |
| 46 | # text edit cycles. |
| 47 | # execute "export SPHINX_DEBUG=1" in your terminal to disable |
| 48 | |
| 49 | # TODO: remove this once no dependency uses six anymore |
| 50 | autodoc_mock_imports = ['six'] |
| 51 | |
| 52 | # Add any paths that contain templates here, relative to this directory. |
| 53 | templates_path = ['_templates'] |
| 54 | |
| 55 | # The suffix of source filenames. |
| 56 | source_suffix = '.rst' |
| 57 | |
| 58 | # The master toctree document. |
| 59 | master_doc = 'index' |
| 60 | |
| 61 | # General information about the project. |
| 62 | project = 'python-glanceclient' |
| 63 | copyright = 'OpenStack Foundation' |
| 64 | |
| 65 | # If true, '()' will be appended to :func: etc. cross-reference text. |
| 66 | add_function_parentheses = True |
| 67 | |
| 68 | # If true, the current module name will be prepended to all description |
| 69 | # unit titles (such as .. function::). |
| 70 | add_module_names = True |
| 71 | |
| 72 | # The name of the Pygments (syntax highlighting) style to use. |
| 73 | pygments_style = 'native' |
| 74 | |
| 75 | # -- Options for HTML output -------------------------------------------------- |
| 76 | |
| 77 | # The theme to use for HTML and HTML Help pages. Major themes that come with |
| 78 | # Sphinx are currently 'default' and 'sphinxdoc'. |
| 79 | #html_theme = 'nature' |
| 80 | html_theme = 'openstackdocs' |
| 81 | |
| 82 | # Output file base name for HTML help builder. |
| 83 | htmlhelp_basename = '%sdoc' % project |
| 84 | |
| 85 | |
| 86 | # -- Options for man page output ---------------------------------------------- |
| 87 | |
| 88 | # Grouping the document tree for man pages. |
| 89 | # List of tuples 'sourcefile', 'target', 'title', 'Authors name', 'manual' |
| 90 | man_pages = [ |
| 91 | ('cli/glance', 'glance', 'Client for OpenStack Images API', |
| 92 | ['OpenStack Foundation'], 1), |
| 93 | ] |