Blame doc/conf.py

Pierre-Yves Chibon 300c54
# -*- coding: utf-8 -*-
Pierre-Yves Chibon 300c54
#
Pierre-Yves Chibon 300c54
# pagure documentation build configuration file, created by
Pierre-Yves Chibon 300c54
# sphinx-quickstart on Wed Mar 1 10:30:13 2015.
Pierre-Yves Chibon 300c54
#
Pierre-Yves Chibon 300c54
# This file is execfile()d with the current directory set to its containing
Pierre-Yves Chibon 300c54
# dir.
Pierre-Yves Chibon 300c54
#
Pierre-Yves Chibon 300c54
# Note that not all possible configuration values are present in this
Pierre-Yves Chibon 300c54
# autogenerated file.
Pierre-Yves Chibon 300c54
#
Pierre-Yves Chibon 300c54
# All configuration values have a default; values that are commented out
Pierre-Yves Chibon 300c54
# serve to show the default.
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
import os
Pierre-Yves Chibon 300c54
import re
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
pagurefile = os.path.join(
Pierre-Yves Chibon 73d120
    os.path.dirname(__file__), "..", "pagure", "__init__.py"
Pierre-Yves Chibon 73d120
)
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# Thanks to SQLAlchemy:
Pierre-Yves Chibon 300c54
# https://github.com/zzzeek/sqlalchemy/blob/master/setup.py#L104
Pierre-Yves Chibon 300c54
with open(pagurefile) as stream:
Pierre-Yves Chibon 73d120
    VERSION = (
Pierre-Yves Chibon 73d120
        re.compile(r".*__version__ = \"(.*?)\"", re.S)
Pierre-Yves Chibon 73d120
        .match(stream.read())
Pierre-Yves Chibon 73d120
        .group(1)
Pierre-Yves Chibon 73d120
    )
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If extensions (or modules to document with autodoc) are in another
Pierre-Yves Chibon 300c54
# directory, add these directories to sys.path here. If the directory is
Pierre-Yves Chibon 300c54
# relative to the documentation root, use os.path.abspath to make it
Pierre-Yves Chibon 300c54
# absolute, like shown here.
Pierre-Yves Chibon 73d120
# sys.path.insert(0, os.path.abspath('.'))
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# -- General configuration ------------------------------------------------
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If your documentation needs a minimal Sphinx version, state it here.
Pierre-Yves Chibon 73d120
# needs_sphinx = '1.0'
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# Add any Sphinx extension module names here, as strings. They can be
Pierre-Yves Chibon 300c54
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
Pierre-Yves Chibon 300c54
extensions = [
Pierre-Yves Chibon 73d120
    "sphinx.ext.autodoc",
Pierre-Yves Chibon 73d120
    "sphinx.ext.coverage",
Pierre-Yves Chibon 73d120
    "sphinx.ext.viewcode",
Pierre-Yves Chibon 300c54
]
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# Add any paths that contain templates here, relative to this directory.
Pierre-Yves Chibon 73d120
templates_path = ["_templates"]
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# The suffix of source filenames.
Pierre-Yves Chibon 73d120
source_suffix = ".rst"
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# The encoding of source files.
Pierre-Yves Chibon 73d120
# source_encoding = 'utf-8-sig'
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# The master toctree document.
Pierre-Yves Chibon 73d120
master_doc = "index"
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# General information about the project.
Pierre-Yves Chibon 73d120
project = u"pagure"
Pierre-Yves Chibon 73d120
copyright = u"2015, Red Hat Inc, Pierre-Yves Chibon <pingou@pingoured.fr>"</pingou@pingoured.fr>
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# The version info for the project you're documenting, acts as replacement
Pierre-Yves Chibon 300c54
# for |version| and |release|, also used in various other places throughout
Pierre-Yves Chibon 300c54
# the built documents.
Pierre-Yves Chibon 300c54
#
Pierre-Yves Chibon 300c54
# The short X.Y version.
Pierre-Yves Chibon 73d120
# version = __version__
Pierre-Yves Chibon 300c54
version = VERSION
Pierre-Yves Chibon 300c54
# The full version, including alpha/beta/rc tags.
Pierre-Yves Chibon 73d120
# release = '1'
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# The language for content autogenerated by Sphinx. Refer to documentation
Pierre-Yves Chibon 300c54
# for a list of supported languages.
Pierre-Yves Chibon 73d120
# language = None
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# There are two options for replacing |today|: either, you set today to some
Pierre-Yves Chibon 300c54
# non-false value, then it is used:
Pierre-Yves Chibon 73d120
# today = ''
Pierre-Yves Chibon 300c54
# Else, today_fmt is used as the format for a strftime call.
Pierre-Yves Chibon 73d120
# today_fmt = '%B %d, %Y'
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# List of patterns, relative to source directory, that match files and
Pierre-Yves Chibon 300c54
# directories to ignore when looking for source files.
Pierre-Yves Chibon 73d120
exclude_patterns = ["_build"]
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# The reST default role (used for this markup: `text`) to use for all
Pierre-Yves Chibon 300c54
# documents.
Pierre-Yves Chibon 73d120
# default_role = None
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If true, '()' will be appended to :func: etc. cross-reference text.
Pierre-Yves Chibon 73d120
# add_function_parentheses = True
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If true, the current module name will be prepended to all description
Pierre-Yves Chibon 300c54
# unit titles (such as .. function::).
Pierre-Yves Chibon 73d120
# add_module_names = True
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If true, sectionauthor and moduleauthor directives will be shown in the
Pierre-Yves Chibon 300c54
# output. They are ignored by default.
Pierre-Yves Chibon 73d120
# show_authors = False
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# The name of the Pygments (syntax highlighting) style to use.
Pierre-Yves Chibon 73d120
pygments_style = "sphinx"
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# A list of ignored prefixes for module index sorting.
Pierre-Yves Chibon 73d120
# modindex_common_prefix = []
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# -- Options for HTML output ----------------------------------------------
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
import cloud_sptheme as csp
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 73d120
html_style = "site.css"
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# The theme to use for HTML and HTML Help pages. See the documentation for
Pierre-Yves Chibon 300c54
# a list of builtin themes.
Pierre-Yves Chibon 73d120
# html_theme = 'default'
Pierre-Yves Chibon 300c54
html_theme = "cloud"
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# Theme options are theme-specific and customize the look and feel of a theme
Pierre-Yves Chibon 300c54
# further. For a list of options available for each theme, see the
Pierre-Yves Chibon 300c54
# documentation.
Pierre-Yves Chibon 73d120
# html_theme_options = {}
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
html_theme_options = {
Pierre-Yves Chibon 300c54
    "sidebarwidth": "200px",
Pierre-Yves Chibon 300c54
    "max_width": "900px",
Pierre-Yves Chibon 300c54
    "compact_width": "800px",
Pierre-Yves Chibon 300c54
    "minimal_width": "700px",
Pierre-Yves Chibon 300c54
    # Style it like Fedora..
Pierre-Yves Chibon 300c54
    "bodyfont": "Cantarell",
Pierre-Yves Chibon 300c54
    "highlightcolor": "#79db32",  # First Green
Pierre-Yves Chibon 300c54
    "sidebarbgcolor": "#FEFEFE",
Pierre-Yves Chibon 300c54
    "sidebartrimcolor": "#FEFEFE",
Pierre-Yves Chibon 300c54
    "sectionbgcolor": "#FEFEFE",
Pierre-Yves Chibon 300c54
    "sectiontrimcolor": "#FEFEFE",
Pierre-Yves Chibon 300c54
    "sectiontextcolor": "#444444",
Pierre-Yves Chibon 300c54
    "relbarbgcolor": "#FEFEFE",
Pierre-Yves Chibon 300c54
    "relbartextcolor": "#444444",
Pierre-Yves Chibon 300c54
    "relbarlinkcolor": "#444444",
Pierre-Yves Chibon 300c54
    "bgcolor": "#FEFEFE",
Pierre-Yves Chibon 300c54
    "textcolor": "#444444",
Pierre-Yves Chibon 73d120
    # "linkcolor": "#79db32",  # First Green
Pierre-Yves Chibon 300c54
    "linkcolor": "#00009d",
Pierre-Yves Chibon 300c54
    "headtextcolor": "#444444",
Pierre-Yves Chibon 300c54
    "headlinkcolor": "#444444",
Pierre-Yves Chibon 73d120
    # "codebgcolor"
Pierre-Yves Chibon 73d120
    # "codetextcolor"
Pierre-Yves Chibon 300c54
    "codetrimcolor": "#79db32",  # First Green
Pierre-Yves Chibon 300c54
    "footerbgcolor": "#FEFEFE",
Pierre-Yves Chibon 73d120
    "fontcssurl": "_static/site.css",
Pierre-Yves Chibon 300c54
}
Pierre-Yves Chibon 300c54
# Add any paths that contain custom themes here, relative to this directory.
Pierre-Yves Chibon 73d120
# html_theme_path = []
Pierre-Yves Chibon 300c54
html_theme_path = [csp.get_theme_dir()]
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# The name for this set of Sphinx documents. If None, it defaults to
Pierre-Yves Chibon 300c54
# "<project> v<release> documentation".</release></project>
Pierre-Yves Chibon 73d120
# html_title = None
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# A shorter title for the navigation bar. Default is the same as html_title.
Pierre-Yves Chibon 73d120
# html_short_title = None
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# The name of an image file (relative to this directory) to place at the top
Pierre-Yves Chibon 300c54
# of the sidebar.
Pierre-Yves Chibon 73d120
# html_logo = None
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# The name of an image file (within the static path) to use as favicon of the
Pierre-Yves Chibon 300c54
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
Pierre-Yves Chibon 300c54
# pixels large.
Pierre-Yves Chibon 73d120
# html_favicon = None
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# Add any paths that contain custom static files (such as style sheets) here,
Pierre-Yves Chibon 300c54
# relative to this directory. They are copied after the builtin static files,
Pierre-Yves Chibon 300c54
# so a file named "default.css" will overwrite the builtin "default.css".
Pierre-Yves Chibon 73d120
html_static_path = ["_static"]
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
Pierre-Yves Chibon 300c54
# using the given strftime format.
Pierre-Yves Chibon 73d120
# html_last_updated_fmt = '%b %d, %Y'
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If true, SmartyPants will be used to convert quotes and dashes to
Pierre-Yves Chibon 300c54
# typographically correct entities.
Pierre-Yves Chibon 73d120
# html_use_smartypants = True
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# Custom sidebar templates, maps document names to template names.
Pierre-Yves Chibon 300c54
html_sidebars = {
Pierre-Yves Chibon 73d120
    "**": [
Pierre-Yves Chibon 73d120
        "pagure-logo.html",
Pierre-Yves Chibon 73d120
        "localtoc.html",
Pierre-Yves Chibon 73d120
        "relations.html",
Pierre-Yves Chibon 73d120
        "sourcelink.html",
Pierre-Yves Chibon 73d120
        "searchbox.html",
Pierre-Yves Chibon 300c54
    ]
Pierre-Yves Chibon 300c54
}
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# Additional templates that should be rendered to pages, maps page names to
Pierre-Yves Chibon 300c54
# template names.
Pierre-Yves Chibon 73d120
# html_additional_pages = {}
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If false, no module index is generated.
Pierre-Yves Chibon 73d120
# html_domain_indices = True
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If false, no index is generated.
Pierre-Yves Chibon 73d120
# html_use_index = True
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If true, the index is split into individual pages for each letter.
Pierre-Yves Chibon 73d120
# html_split_index = False
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If true, links to the reST sources are added to the pages.
Pierre-Yves Chibon 73d120
# html_show_sourcelink = True
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
Pierre-Yves Chibon 73d120
# html_show_sphinx = True
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
Pierre-Yves Chibon 73d120
# html_show_copyright = True
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If true, an OpenSearch description file will be output, and all pages will
Pierre-Yves Chibon 300c54
# contain a <link> tag referring to it. The value of this option must be the
Pierre-Yves Chibon 300c54
# base URL from which the finished HTML is served.
Pierre-Yves Chibon 73d120
# html_use_opensearch = ''
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# This is the file name suffix for HTML files (e.g. ".xhtml").
Pierre-Yves Chibon 73d120
# html_file_suffix = None
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# Output file base name for HTML help builder.
Pierre-Yves Chibon 73d120
htmlhelp_basename = "pagure"
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# -- Options for LaTeX output ---------------------------------------------
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
latex_elements = {
Pierre-Yves Chibon 300c54
    # The paper size ('letterpaper' or 'a4paper').
Pierre-Yves Chibon 300c54
    #'papersize': 'letterpaper',
Pierre-Yves Chibon 300c54
    # The font size ('10pt', '11pt' or '12pt').
Pierre-Yves Chibon 300c54
    #'pointsize': '10pt',
Pierre-Yves Chibon 300c54
    # Additional stuff for the LaTeX preamble.
Pierre-Yves Chibon 300c54
    #'preamble': '',
Pierre-Yves Chibon 300c54
}
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# Grouping the document tree into LaTeX files. List of tuples
Pierre-Yves Chibon 300c54
# (source start file, target name, title, author, documentclass
Pierre-Yves Chibon 300c54
# [howto/manual]).
Pierre-Yves Chibon 300c54
latex_documents = [
Pierre-Yves Chibon 300c54
    (
Pierre-Yves Chibon 73d120
        "index",
Pierre-Yves Chibon 73d120
        "pagure.tex",
Pierre-Yves Chibon 73d120
        u"Pagure Documentation",
Pierre-Yves Chibon 73d120
        u"Pierre-Yves Chibon \\textless{}pingou@pingoured.fr\\textgreater{}",
Pierre-Yves Chibon 73d120
        "manual",
Pierre-Yves Chibon 73d120
    )
Pierre-Yves Chibon 300c54
]
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# The name of an image file (relative to this directory) to place at the top of
Pierre-Yves Chibon 300c54
# the title page.
Pierre-Yves Chibon 73d120
# latex_logo = None
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# For "manual" documents, if this is true, then toplevel headings are parts,
Pierre-Yves Chibon 300c54
# not chapters.
Pierre-Yves Chibon 73d120
# latex_use_parts = False
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If true, show page references after internal links.
Pierre-Yves Chibon 73d120
# latex_show_pagerefs = False
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If true, show URL addresses after external links.
Pierre-Yves Chibon 73d120
# latex_show_urls = False
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# Documents to append as an appendix to all manuals.
Pierre-Yves Chibon 73d120
# latex_appendices = []
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If false, no module index is generated.
Pierre-Yves Chibon 73d120
# latex_domain_indices = True
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# -- Options for manual page output ---------------------------------------
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# One entry per manual page. List of tuples
Pierre-Yves Chibon 300c54
# (source start file, name, description, authors, manual section).
Pierre-Yves Chibon 300c54
man_pages = [
Pierre-Yves Chibon 300c54
    (
Pierre-Yves Chibon 73d120
        "index",
Pierre-Yves Chibon 73d120
        "pagure",
Pierre-Yves Chibon 73d120
        u"Pagure Documentation",
Pierre-Yves Chibon 73d120
        [u"Pierre-Yves Chibon <pingou@pingoured.fr>"],</pingou@pingoured.fr>
Pierre-Yves Chibon 73d120
        1,
Pierre-Yves Chibon 300c54
    )
Pierre-Yves Chibon 300c54
]
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If true, show URL addresses after external links.
Pierre-Yves Chibon 73d120
# man_show_urls = False
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# -- Options for Texinfo output -------------------------------------------
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# Grouping the document tree into Texinfo files. List of tuples
Pierre-Yves Chibon 300c54
# (source start file, target name, title, author,
Pierre-Yves Chibon 300c54
# dir menu entry, description, category)
Pierre-Yves Chibon 300c54
texinfo_documents = [
Pierre-Yves Chibon 300c54
    (
Pierre-Yves Chibon 73d120
        "index",
Pierre-Yves Chibon 73d120
        "pagure",
Pierre-Yves Chibon 73d120
        u"Pagure Documentation",
Pierre-Yves Chibon 73d120
        u"Pierre-Yves Chibon <pingou@pingoured.fr>",</pingou@pingoured.fr>
Pierre-Yves Chibon 73d120
        "pagure",
Pierre-Yves Chibon 73d120
        "Small git-centric forge",
Pierre-Yves Chibon 73d120
        "Miscellaneous",
Pierre-Yves Chibon 73d120
    )
Pierre-Yves Chibon 300c54
]
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# Documents to append as an appendix to all manuals.
Pierre-Yves Chibon 73d120
# texinfo_appendices = []
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# If false, no module index is generated.
Pierre-Yves Chibon 73d120
# texinfo_domain_indices = True
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
# How to display URL addresses: 'footnote', 'no', or 'inline'.
Pierre-Yves Chibon 73d120
# texinfo_show_urls = 'footnote'