"Fossies" - the Fresh Open Source Software Archive

Member "buildbot-2.5.1/docs/conf.py" (24 Nov 2019, 11642 Bytes) of package /linux/misc/buildbot-2.5.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "conf.py" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 2.4.1_vs_2.5.0.

    1 # -*- coding: utf-8 -*-
    2 #
    3 # Buildbot documentation build configuration file, created by
    4 # sphinx-quickstart on Tue Aug 10 15:13:31 2010.
    5 #
    6 # This file is exec()d with the current directory set to its containing dir.
    7 #
    8 # Note that not all possible configuration values are present in this
    9 # autogenerated file.
   10 #
   11 # All configuration values have a default; values that are commented out
   12 # serve to show the default.
   13 
   14 
   15 import os
   16 import pkg_resources
   17 import sys
   18 import textwrap
   19 
   20 # If extensions (or modules to document with autodoc) are in another directory,
   21 # add these directories to sys.path here. If the directory is relative to the
   22 # documentation root, use os.path.abspath to make it absolute, like shown here.
   23 sys.path.insert(1, os.path.dirname(os.path.abspath(__file__)))
   24 
   25 try:
   26     from buildbot.util.raml import RamlSpec
   27     from buildbot.reporters.telegram import TelegramContact
   28 except ImportError:
   29     sys.path.insert(2, os.path.join(os.path.dirname(os.path.abspath(__file__)),
   30                                     os.pardir))
   31     from buildbot.util.raml import RamlSpec
   32     from buildbot.reporters.telegram import TelegramContact
   33 
   34 # -- General configuration -----------------------------------------------
   35 try:
   36     import sphinxcontrib.blockdiag
   37     assert sphinxcontrib.blockdiag
   38 except ImportError:
   39     raise RuntimeError("sphinxcontrib.blockdiag is not installed. "
   40                        "Please install documentation dependencies with `pip install buildbot[docs]`")
   41 
   42 try:
   43     pkg_resources.require('docutils>=0.8')
   44 except pkg_resources.ResolutionError:
   45     raise RuntimeError("docutils is not installed or has incompatible version. "
   46                        "Please install documentation dependencies with `pip install buildbot[docs]`")
   47 # If your documentation needs a minimal Sphinx version, state it here.
   48 needs_sphinx = '1.0'
   49 
   50 # Add any Sphinx extension module names here, as strings. They can be extensions
   51 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
   52 extensions = [
   53     'sphinx.ext.autodoc',
   54     'sphinx.ext.todo',
   55     'sphinx.ext.extlinks',
   56     'bbdocs.ext',
   57     'bbdocs.highlighterrors',
   58     'sphinxcontrib.blockdiag',
   59     'sphinxcontrib.jinja',
   60 ]
   61 todo_include_todos = True
   62 
   63 # Add any paths that contain templates here, relative to this directory.
   64 templates_path = ['_templates']
   65 
   66 # The suffix of source filenames.
   67 source_suffix = '.rst'
   68 
   69 # The encoding of source files.
   70 # source_encoding = 'utf-8-sig'
   71 
   72 # The master toctree document.
   73 master_doc = 'index'
   74 
   75 # General information about the project.
   76 project = u'Buildbot'
   77 copyright = u'Buildbot Team Members'
   78 
   79 # The version info for the project you're documenting, acts as replacement for
   80 # |version| and |release|, also used in various other places throughout the
   81 # built documents.
   82 #
   83 # The short X.Y version.
   84 
   85 if 'VERSION' in os.environ:
   86     version = os.environ['VERSION']
   87 else:
   88     gl = {'__file__': '../buildbot/__init__.py'}
   89     with open('../buildbot/__init__.py') as f:
   90         exec(f.read(), gl)
   91     version = gl['version']
   92 
   93 # The full version, including alpha/beta/rc tags.
   94 release = version
   95 
   96 # blocksiag/seqdiag
   97 blockdiag_html_image_format = 'svg'
   98 blocdiag_transparency = True
   99 
  100 # add a loud note about python 2
  101 rst_prolog = textwrap.dedent("""\
  102 .. caution:: Buildbot no longer supports Python 2.7 on the Buildbot master.
  103 """)
  104 
  105 # add a loud note for anyone looking at the latest docs
  106 if release == 'latest':
  107     rst_prolog += textwrap.dedent("""\
  108     .. caution:: This page documents the latest, unreleased version of
  109         Buildbot.  For documentation for released versions, see
  110         http://docs.buildbot.net/current/.
  111 
  112     """)
  113 
  114 # The language for content autogenerated by Sphinx. Refer to documentation
  115 # for a list of supported languages.
  116 # language = None
  117 
  118 # There are two options for replacing |today|: either, you set today to some
  119 # non-false value, then it is used:
  120 # today = ''
  121 # Else, today_fmt is used as the format for a strftime call.
  122 # today_fmt = '%B %d, %Y'
  123 
  124 # List of patterns, relative to source directory, that match files and
  125 # directories to ignore when looking for source files.
  126 exclude_patterns = ['_build', 'release-notes/*.rst']
  127 
  128 # The reST default role (used for this markup: `text`) to use for all documents.
  129 # default_role = None
  130 
  131 # If true, '()' will be appended to :func: etc. cross-reference text.
  132 add_function_parentheses = False
  133 
  134 # If true, the current module name will be prepended to all description
  135 # unit titles (such as .. function::).
  136 # add_module_names = True
  137 
  138 # If true, sectionauthor and moduleauthor directives will be shown in the
  139 # output. They are ignored by default.
  140 # show_authors = False
  141 
  142 # The name of the Pygments (syntax highlighting) style to use.
  143 pygments_style = 'trac'
  144 
  145 # A list of ignored prefixes for module index sorting.
  146 # modindex_common_prefix = []
  147 
  148 intersphinx_mapping = {
  149     'python': ('https://python.readthedocs.io/en/latest/', None),
  150     'sqlalchemy': ('https://sqlalchemy.readthedocs.io/en/latest/', None),
  151 }
  152 
  153 extlinks = {
  154     'pull': ('https://github.com/buildbot/buildbot/pull/%s', 'pull request '),
  155     'issue': ('https://github.com/buildbot/buildbot/issues/%s', 'issue # '),
  156     # deprecated. Use issue instead, and point to Github
  157     'bug': ('http://trac.buildbot.net/ticket/%s', 'bug #'),
  158     # Renders as link with whole url, e.g.
  159     #   :src-link:`master`
  160     # renders as
  161     #   "https://github.com/buildbot/buildbot/blob/master/master".
  162     # Explicit title can be used for customizing how link looks like:
  163     #   :src-link:`master's directory <master>`
  164     'src-link': ('https://github.com/buildbot/buildbot/tree/master/%s', None),
  165     # "pretty" reference that looks like relative path in Buildbot source tree
  166     # by default.
  167     'src': ('https://github.com/buildbot/buildbot/tree/master/%s', ''),
  168     'contrib-src': ('https://github.com/buildbot/buildbot-contrib/tree/master/%s', ''),
  169 }
  170 
  171 # Sphinx' link checker.
  172 linkcheck_ignore = [
  173     # Local URLs:
  174     r'^http://localhost.*',
  175     # Available only to logged-in users:
  176     r'^https://github\.com/settings/applications$',
  177     # Sites which uses SSL that Python 2 can't handle:
  178     r'^https://opensource\.org/licenses/gpl-2.0\.php$',
  179     r'^https://docs\.docker\.com/engine/installation/$',
  180     # Looks like server doesn't like user agent:
  181     r'^https://www\.microsoft\.com/en-us/download/details\.aspx\?id=17657$',
  182     # Example domain.
  183     r'^https?://(.+\.)?example\.org',
  184     # Anchor check fails on rendered user files on GitHub, since GitHub uses
  185     # custom prefix for anchors in user generated content.
  186     r'https://github\.com/buildbot/guanlecoja-ui/tree/master#changelog',
  187     r'http://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps',
  188 ]
  189 linkcheck_timeout = 10
  190 linkcheck_retries = 3
  191 linkcheck_workers = 20
  192 
  193 # -- Options for HTML output ---------------------------------------------
  194 
  195 # The theme to use for HTML and HTML Help pages.  See the documentation for
  196 # a list of builtin themes.
  197 html_theme = 'qtile'
  198 
  199 # Theme options are theme-specific and customize the look and feel of a theme
  200 # further.  For a list of options available for each theme, see the
  201 # documentation.
  202 # html_theme_options = {'stickysidebar': 'true'}
  203 
  204 # Add any paths that contain custom themes here, relative to this directory.
  205 html_theme_path = [
  206     '_themes'
  207 ]
  208 
  209 # The name for this set of Sphinx documents.  If None, it defaults to
  210 # "<project> v<release> documentation".
  211 # html_title = None
  212 
  213 # A shorter title for the navigation bar.  Default is the same as html_title.
  214 # html_short_title = None
  215 
  216 # The name of an image file (relative to this directory) to place at the top
  217 # of the sidebar.
  218 html_logo = os.path.join('_images', 'full_logo.png')
  219 
  220 # The name of an image file (within the static path) to use as favicon of the
  221 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
  222 # pixels large or a png.
  223 html_favicon = os.path.join('_static', 'icon.png')
  224 
  225 # Add any paths that contain custom static files (such as style sheets) here,
  226 # relative to this directory. They are copied after the builtin static files,
  227 # so a file named "default.css" will overwrite the builtin "default.css".
  228 html_static_path = ['_static']
  229 
  230 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  231 # using the given strftime format.
  232 # html_last_updated_fmt = '%b %d, %Y'
  233 
  234 # Custom sidebar templates, maps document names to template names.
  235 html_sidebars = {
  236     '**': ['searchbox.html', 'localtoc.html', 'relations.html', 'sourcelink.html']
  237 }
  238 
  239 # Additional templates that should be rendered to pages, maps page names to
  240 # template names.
  241 # html_additional_pages = {}
  242 
  243 # If false, no module index is generated.
  244 # html_domain_indices = True
  245 
  246 html_use_index = True
  247 html_use_modindex = True
  248 
  249 # If true, the index is split into individual pages for each letter.
  250 # html_split_index = False
  251 
  252 # If true, links to the reST sources are added to the pages.
  253 # html_show_sourcelink = True
  254 
  255 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
  256 # html_show_sphinx = True
  257 
  258 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
  259 # html_show_copyright = True
  260 
  261 # If true, an OpenSearch description file will be output, and all pages will
  262 # contain a <link> tag referring to it.  The value of this option must be the
  263 # base URL from which the finished HTML is served.
  264 # html_use_opensearch = ''
  265 
  266 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
  267 # html_file_suffix = ''
  268 
  269 # Output file base name for HTML help builder.
  270 htmlhelp_basename = 'Buildbotdoc'
  271 
  272 
  273 # -- Options for LaTeX output --------------------------------------------
  274 
  275 latex_elements = {}
  276 # The paper size ('letter' or 'a4').
  277 latex_elements['papersize'] = 'a4'
  278 
  279 # The font size ('10pt', '11pt' or '12pt').
  280 # latex_font_size = '11pt'
  281 
  282 # Grouping the document tree into LaTeX files. List of tuples
  283 # (source start file, target name, title, author, documentclass [howto/manual]).
  284 latex_documents = [
  285     ('index', 'Buildbot.tex', u'Buildbot Documentation',
  286      u'Brian Warner', 'manual'),
  287 ]
  288 
  289 # The name of an image file (relative to this directory) to place at the top of
  290 # the title page.
  291 latex_logo = os.path.join('_images', 'header-text-transparent.png')
  292 
  293 # For "manual" documents, if this is true, then toplevel headings are parts,
  294 # not chapters.
  295 # latex_use_parts = False
  296 
  297 # If true, show page references after internal links.
  298 # latex_show_pagerefs = False
  299 
  300 # Three possible values for this option (see sphinx config manual) are:
  301 # 1. 'no' - do not display URLs (default)
  302 # 2. 'footnote' - display URLs in footnotes
  303 # 3. 'inline' - display URLs inline in parentheses
  304 latex_show_urls = 'inline'
  305 
  306 # Additional stuff for the LaTeX preamble.
  307 # latex_preamble = ''
  308 
  309 # Documents to append as an appendix to all manuals.
  310 # latex_appendices = []
  311 
  312 # If false, no module index is generated.
  313 # latex_domain_indices = True
  314 
  315 
  316 # -- Options for manual page output --------------------------------------
  317 
  318 # One entry per manual page. List of tuples
  319 # (source start file, name, description, authors, manual section).
  320 man_pages = [
  321     ('index', 'buildbot', u'Buildbot Documentation',
  322      [u'Brian Warner'], 1)
  323 ]
  324 
  325 jinja_contexts = {
  326     "data_api": {'raml': RamlSpec()},
  327     "telegram": {'commands': TelegramContact.describe_commands()},
  328 }
  329 
  330 # Spell checker.
  331 try:
  332     import enchant  # noqa # pylint: disable=unused-import
  333 except ImportError as ex:
  334     print("enchant module import failed:\n"
  335           "{0}\n"
  336           "Spell checking disabled.".format(ex),
  337           file=sys.stderr)
  338 
  339 else:
  340     extensions.append('sphinxcontrib.spelling')
  341     spelling_show_suggestions = True