source: orange-reliability/docs/rst/conf.py @ 44:5a8c28575271

Revision 44:5a8c28575271, 7.8 KB checked in by markotoplak, 7 months ago (diff)

removed mock dependency

RevLine 
[0]1# -*- coding: utf-8 -*-
2#
3# This file is execfile()d with the current directory set to its containing dir.
4#
5# Note that not all possible configuration values are present in this
6# autogenerated file.
7#
8# All configuration values have a default; values that are commented out
9# serve to show the default.
10
11import sys, os
[44]12
13class Mock(object):
14    def __init__(self, *args, **kwargs):
15        pass
16
17    def __call__(self, *args, **kwargs):
18        return Mock()
19
20    @classmethod
21    def __getattr__(cls, name):
22        if name in ('__file__', '__path__'):
23            return '/dev/null'
24        elif name[0] == name[0].upper():
25            mockType = type(name, (), {})
26            mockType.__module__ = __name__
27            return mockType
28        else:
29            return Mock()
[20]30
31MOCK_MODULES = ["numpy", "numpy.core", "numpy.core.ma", "scipy", "scipy.stats", "ma", "linalg"]
32for mod_name in MOCK_MODULES:
[44]33    sys.modules[mod_name] = Mock()
[0]34
35import imp
36module_setup = imp.load_source('module_setup', os.path.join(os.path.dirname(__file__), '..', '..', 'setup.py'))
37VERSION = module_setup.VERSION
38AUTHOR = module_setup.AUTHOR
39DOCUMENTATION_NAME = module_setup.DOCUMENTATION_NAME
40
41TITLE = "%s v%s documentation" % (DOCUMENTATION_NAME, VERSION)
42
43# If extensions (or modules to document with autodoc) are in another directory,
44# add these directories to sys.path here. If the directory is relative to the
45# documentation root, use os.path.abspath to make it absolute, like shown here.
46#sys.path.append(os.path.abspath('.'))
47
48# -- General configuration -----------------------------------------------------
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.
52extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.pngmath']
53
54# Add any paths that contain templates here, relative to this directory.
55templates_path = ['_templates']
56
57# The suffix of source filenames.
58source_suffix = '.rst'
59
60# The encoding of source files.
61#source_encoding = 'utf-8'
62
63# The master toctree document.
64master_doc = 'index'
65
66# General information about the project.
67project = DOCUMENTATION_NAME
68copyright = AUTHOR
69
70# The version info for the project you're documenting, acts as replacement for
71# |version| and |release|, also used in various other places throughout the
72# built documents.
73#
74# The short X.Y version.
75version = VERSION
76# The full version, including alpha/beta/rc tags.
77release = VERSION
78
79# The language for content autogenerated by Sphinx. Refer to documentation
80# for a list of supported languages.
81#language = None
82
83# There are two options for replacing |today|: either, you set today to some
84# non-false value, then it is used:
85#today = ''
86# Else, today_fmt is used as the format for a strftime call.
87#today_fmt = '%B %d, %Y'
88
89# List of documents that shouldn't be included in the build.
90#unused_docs = []
91
92# List of directories, relative to source directory, that shouldn't be searched
93# for source files.
94exclude_trees = ['_build']
95
96# The reST default role (used for this markup: `text`) to use for all documents.
97#default_role = None
98
99# If true, '()' will be appended to :func: etc. cross-reference text.
100#add_function_parentheses = True
101
102# If true, the current module name will be prepended to all description
103# unit titles (such as .. function::).
104#add_module_names = True
105
106# If true, sectionauthor and moduleauthor directives will be shown in the
107# output. They are ignored by default.
108#show_authors = False
109
110# The name of the Pygments (syntax highlighting) style to use.
111pygments_style = 'sphinx'
112
113# A list of ignored prefixes for module index sorting.
114#modindex_common_prefix = []
115
116
117# -- Options for HTML output ---------------------------------------------------
118
119# The theme to use for HTML and HTML Help pages.  Major themes that come with
120# Sphinx are currently 'default' and 'sphinxdoc'.
121html_theme = 'nature'
122
123# Theme options are theme-specific and customize the look and feel of a theme
124# further.  For a list of options available for each theme, see the
125# documentation.
126#html_theme_options = {}
127
128# Add any paths that contain custom themes here, relative to this directory.
129#html_theme_path = []
130
131# The name for this set of Sphinx documents.  If None, it defaults to
132# "<project> v<release> documentation".
133html_title = TITLE
134
135# A shorter title for the navigation bar.  Default is the same as html_title.
136#html_short_title = None
137
138# The name of an image file (relative to this directory) to place at the top
139# of the sidebar.
140#html_logo = None
141
142# The name of an image file (within the static path) to use as favicon of the
143# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
144# pixels large.
145#html_favicon = None
146
147# Add any paths that contain custom static files (such as style sheets) here,
148# relative to this directory. They are copied after the builtin static files,
149# so a file named "default.css" will overwrite the builtin "default.css".
[4]150#html_static_path = ['_static']
151html_static_path = []
[0]152
153# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
154# using the given strftime format.
155#html_last_updated_fmt = '%b %d, %Y'
156
157# If true, SmartyPants will be used to convert quotes and dashes to
158# typographically correct entities.
159#html_use_smartypants = True
160
161# Custom sidebar templates, maps document names to template names.
162#html_sidebars = {}
163
164# Additional templates that should be rendered to pages, maps page names to
165# template names.
166#html_additional_pages = {}
167
168# If false, no module index is generated.
169#html_domain_indices = True
170
171# If false, no index is generated.
172#html_use_index = True
173
174# If true, the index is split into individual pages for each letter.
175#html_split_index = False
176
177# If true, links to the reST sources are added to the pages.
178#html_show_sourcelink = True
179
180# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
181html_show_sphinx = False
182
183# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
184html_show_copyright = False
185
186# If true, an OpenSearch description file will be output, and all pages will
187# contain a <link> tag referring to it.  The value of this option must be the
188# base URL from which the finished HTML is served.
189#html_use_opensearch = ''
190
191# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
192#html_file_suffix = ''
193
194# Output file base name for HTML help builder.
195htmlhelp_basename = 'addon'
196
197
198# -- Options for LaTeX output --------------------------------------------------
199
200# The paper size ('letter' or 'a4').
201#latex_paper_size = 'letter'
202
203# The font size ('10pt', '11pt' or '12pt').
204#latex_font_size = '10pt'
205
206# Grouping the document tree into LaTeX files. List of tuples
207# (source start file, target name, title, author, documentclass [howto/manual]).
208latex_documents = [
209  ('index', 'addon.tex', html_title,
210   copyright, 'manual'),
211]
212
213# The name of an image file (relative to this directory) to place at the top of
214# the title page.
215#latex_logo = None
216
217# For "manual" documents, if this is true, then toplevel headings are parts,
218# not chapters.
219#latex_use_parts = False
220
221# If true, show page references after internal links.
222#latex_show_pagerefs = False
223
224# If true, show URL addresses after external links.
225#latex_show_urls = False
226
227# Additional stuff for the LaTeX preamble.
228#latex_preamble = ''
229
230# Documents to append as an appendix to all manuals.
231#latex_appendices = []
232
233# If false, no module index is generated.
234#latex_domain_indices = True
235
236# -- Options for manual page output --------------------------------------------
237
238# One entry per manual page. List of tuples
239# (source start file, name, description, authors, manual section).
240man_pages = [
241    ('index', 'addon', TITLE,
242     [AUTHOR], 1)
243]
244
245# Example configuration for intersphinx: refer to the Python standard library.
246intersphinx_mapping = {
[42]247    'python': ('http://python.readthedocs.org/en/latest/', None)
[0]248}
249
Note: See TracBrowser for help on using the repository browser.