# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import sys

sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ----------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
    'sphinx.ext.autodoc',
    'sphinxcontrib.apidoc',
    #'sphinx.ext.intersphinx',
    'openstackdocstheme',
    'oslo_config.sphinxext',
]

# openstackdocstheme options
repository_name = 'openstack/oslo.reports'
bug_project = 'oslo.reports'
bug_tag = ''

# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'

# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable

# The suffix of source filenames.
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'oslo.reports'
copyright = u'2014, OpenStack Foundation'

# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = True

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['oslo_reports.']

# -- Options for HTML output --------------------------------------------------

# The theme to use for HTML and HTML Help pages.  Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
# html_static_path = ['static']
html_theme = 'openstackdocs'


# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
    ('index',
     '%s.tex' % project,
     u'%s Documentation' % project,
     u'OpenStack Foundation', 'manual'),
]

# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}

# -- sphinxcontrib.apidoc configuration --------------------------------------
apidoc_module_dir = '../../oslo_reports'
apidoc_output_dir = 'reference/api'
apidoc_excluded_paths = ['tests']

@@ -567,75 +567,8 @@
 e.%0A%0A
-import os%0Aimport sys%0A%0Asys.path.insert(0, os.path.abspath('../..'))%0A
 # --
@@ -863,39 +863,8 @@
 c',%0A
-    #'sphinx.ext.intersphinx',%0A
     
@@ -1036,338 +1036,8 @@
 ''%0A%0A
-# Must set this variable to include year, month, day, hours, and minutes.%0Ahtml_last_updated_fmt = '%25Y-%25m-%25d %25H:%25M'%0A%0A# autodoc generation is a bit aggressive and a nuisance when doing heavy%0A# text edit cycles.%0A# execute %22export SPHINX_DEBUG=1%22 in your terminal to disable%0A%0A# The suffix of source filenames.%0Asource_suffix = '.rst'%0A%0A
 # Th
@@ -1623,16 +1623,17 @@
 rts.'%5D%0A%0A
+%0A
 # -- Opt
@@ -1706,757 +1706,39 @@
 ----
--
 %0A%0A
-# The theme to use for HTML and HTML Help pages.  Major themes that come with%0A# Sphinx are currently 'default' and 'sphinxdoc'.%0A# html_theme_path = %5B%22.%22%5D%0A# html_theme = '_theme'%0A# html_static_path = %5B'static'%5D%0Ahtml_theme = 'openstackdocs'%0A%0A%0A# Output file base name for HTML help builder.%0Ahtmlhelp_basename = '%25sdoc' %25 project%0A%0A# Grouping the document tree into LaTeX files. List of tuples%0A# (source start file, target name, title, author, documentclass%0A# %5Bhowto/manual%5D).%0Alatex_documents = %5B%0A    ('index',%0A     '%25s.tex' %25 project,%0A     u'%25s Documentation' %25 project,%0A     u'OpenStack Foundation', 'manual'),%0A%5D%0A%0A# Example configuration for intersphinx: refer to the Python standard library.%0A#intersphinx_mapping = %7B'http://docs.python.org/': None%7D
+html_theme = 'openstackdocs'%0A
 %0A%0A# 
@@ -1814,16 +1814,17 @@
 -------%0A
+%0A
 apidoc_m
@@ -1921,13 +1921,20 @@
  = %5B
+%0A    
 'tests'
+,%0A
 %5D%0A

Remove cruft from sphinx config file