source: trunk/docs/source/conf.py @ 2035

Last change on this file since 2035 was 2035, checked in by toby, 8 years ago

try RTFD build again with new approach

  • Property svn:eol-style set to native
File size: 10.7 KB
Line 
1# -*- coding: utf-8 -*-
2#
3# sphinx documentation build configuration file based on one built by sphinx-quickstart
4#
5# This file is execfile()d with the current directory set to its containing dir.
6#
7# Note that not all possible configuration values are present in this
8# autogenerated file.
9#
10# All configuration values have a default; values that are commented out
11# serve to show the default.
12
13import sys, os
14# set up dummy packages for misc imports not on readthedocs
15from mock import Mock as MagicMock
16class wx(MagicMock):
17    #@classmethod
18    #def __getattr__(cls, name):
19    #    return wx()
20    Menu = Panel = Dialog = CheckBox = Choice = ComboBox = object
21    Button = PyValidator = TextCtrl = TreeCtrl = object
22    DEFAULT_DIALOG_STYLE = RESIZE_BORDER = CENTRE = OK = CANCEL = True
23    ID_ANY = -1
24    def __getitem__(self,*args):
25        return '3.0.0'
26    class grid(object):
27        PyGridTableBase = PyGridCellEditor = Grid = object
28    class html(object):
29        HtmlWindow = object
30    class aui(MagicMock):
31        AuiNotebook = HtmlWindow = object
32    class lib(MagicMock):
33        class scrolledpanel(MagicMock):
34            ScrolledPanel = object
35        class gridmovers(MagicMock): pass
36        class colourselect(MagicMock): pass
37
38sys.modules.update({'wx':wx()})
39sys.modules.update({'wx.aui':wx.aui()})
40sys.modules.update({'wx.html':wx.html()})
41sys.modules.update({'wx.grid':wx.grid()})
42sys.modules.update({'wx.lib':wx.lib()})
43sys.modules.update({'wx.wizard':wx.grid()})
44sys.modules.update({'wx.glcanvas':wx.lib()})
45sys.modules.update({'wx.lib.scrolledpanel':wx.lib.scrolledpanel()})
46sys.modules.update({'wx.lib.gridmovers':wx.lib.gridmovers()})
47sys.modules.update({'wx.lib.colourselect':wx.lib.gridmovers()})
48
49class numpy(MagicMock):
50    pi = 3.0
51    def log(self,*args): return 0
52    def sqrt(self,*args): return 1
53    class ma(MagicMock):pass
54    class linalg(MagicMock):pass
55sys.modules.update({'numpy':numpy()})
56sys.modules.update({'numpy.ma':numpy.ma()})
57sys.modules.update({'numpy.linalg':numpy.linalg()})
58sys.modules.update({'numpy.fft':numpy.linalg()})
59
60class scipy(MagicMock):
61    class optimize(MagicMock):pass
62sys.modules.update({'scipy':scipy()})
63sys.modules.update({'scipy.optimize':scipy.optimize()})
64sys.modules.update({'scipy.stats':scipy.optimize()})
65sys.modules.update({'scipy.interpolate':scipy.optimize()})
66sys.modules.update({'scipy.special':scipy.optimize()})
67
68class OpenGL(MagicMock):
69    class GL(MagicMock):pass
70    class GLU(MagicMock):pass
71sys.modules.update({'OpenGL':OpenGL()})
72sys.modules.update({'OpenGL.GL':OpenGL.GL()})
73sys.modules.update({'OpenGL.GLU':OpenGL.GLU()})
74sys.modules.update({'OpenGL.GLE':OpenGL.GL()})
75
76class Mock(MagicMock):
77    @classmethod
78    def __getattr__(cls, name):
79        return Mock()
80
81MOCK_MODULES = [
82                'pypowder', 'pyspg', 'pytexture', 'polymask', 'fellipse',
83                'matplotlib', 'matplotlib.backends', 'matplotlib.backends.backend_wx', 
84                'matplotlib.backends.backend_wxagg','pylab',
85                'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.mplot3d.axes3d',
86                ]
87sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
88
89
90# If extensions (or modules to document with autodoc) are in another directory,
91# add these directories to sys.path here. If the directory is relative to the
92# documentation root, use os.path.abspath to make it absolute, like shown here.
93#sys.path.insert(0, os.path.abspath('.'))
94os.path.abspath(os.path.join('..', '..'))
95sys.path.insert(0, os.path.abspath(os.path.join('..', '..')))
96sys.path.insert(1, os.path.abspath(os.path.join('..', '..','exports')))
97sys.path.insert(1, os.path.abspath(os.path.join('..', '..','imports')))
98
99# -- General configuration -----------------------------------------------------
100
101# If your documentation needs a minimal Sphinx version, state it here.
102#needs_sphinx = '1.0'
103
104# Add any Sphinx extension module names here, as strings. They can be extensions
105# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
106extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.mathjax']
107
108# Add any paths that contain templates here, relative to this directory.
109templates_path = ['_templates']
110
111# The suffix of source filenames.
112source_suffix = '.rst'
113
114# The encoding of source files.
115#source_encoding = 'utf-8-sig'
116
117# The master toctree document.
118master_doc = 'index'
119
120# General information about the project.
121project = u'GSAS-II'
122copyright = u'2013, Von Dreele and Toby for Argonne National Laboratory'
123
124# The version info for the project you're documenting, acts as replacement for
125# |version| and |release|, also used in various other places throughout the
126# built documents.
127#
128# The short X.Y version.
129version = '0.2.0'
130# The full version, including alpha/beta/rc tags.
131release = '0.2.0'
132
133# The language for content autogenerated by Sphinx. Refer to documentation
134# for a list of supported languages.
135#language = None
136
137# There are two options for replacing |today|: either, you set today to some
138# non-false value, then it is used:
139#today = ''
140# Else, today_fmt is used as the format for a strftime call.
141#today_fmt = '%B %d, %Y'
142
143# List of patterns, relative to source directory, that match files and
144# directories to ignore when looking for source files.
145exclude_patterns = []
146
147# The reST default role (used for this markup: `text`) to use for all documents.
148#default_role = None
149
150# If true, '()' will be appended to :func: etc. cross-reference text.
151#add_function_parentheses = True
152
153# If true, the current module name will be prepended to all description
154# unit titles (such as .. function::).
155#add_module_names = True
156
157# If true, sectionauthor and moduleauthor directives will be shown in the
158# output. They are ignored by default.
159#show_authors = False
160
161# The name of the Pygments (syntax highlighting) style to use.
162pygments_style = 'sphinx'
163
164# A list of ignored prefixes for module index sorting.
165#modindex_common_prefix = []
166
167
168# -- Options for HTML output ---------------------------------------------------
169
170# The theme to use for HTML and HTML Help pages.  See the documentation for
171# a list of builtin themes.
172html_theme = 'default'
173#html_theme = 'agogo'
174#html_theme = 'sphinxdoc'
175
176# Theme options are theme-specific and customize the look and feel of a theme
177# further.  For a list of options available for each theme, see the
178# documentation.
179#html_theme_options = {}
180
181# Add any paths that contain custom themes here, relative to this directory.
182#html_theme_path = []
183
184# The name for this set of Sphinx documents.  If None, it defaults to
185# "<project> v<release> documentation".
186#html_title = None
187
188# A shorter title for the navigation bar.  Default is the same as html_title.
189#html_short_title = None
190
191# The name of an image file (relative to this directory) to place at the top
192# of the sidebar.
193html_logo = 'G2_html_logo.png'
194
195# The name of an image file (within the static path) to use as favicon of the
196# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
197# pixels large.
198#html_favicon = None
199
200# Add any paths that contain custom static files (such as style sheets) here,
201# relative to this directory. They are copied after the builtin static files,
202# so a file named "default.css" will overwrite the builtin "default.css".
203html_static_path = ['_static']
204
205# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
206# using the given strftime format.
207#html_last_updated_fmt = '%b %d, %Y'
208
209# If true, SmartyPants will be used to convert quotes and dashes to
210# typographically correct entities.
211#html_use_smartypants = True
212
213# Custom sidebar templates, maps document names to template names.
214#html_sidebars = {}
215
216# Additional templates that should be rendered to pages, maps page names to
217# template names.
218#html_additional_pages = {}
219
220# If false, no module index is generated.
221#html_domain_indices = True
222
223# If false, no index is generated.
224#html_use_index = True
225
226# If true, the index is split into individual pages for each letter.
227#html_split_index = False
228
229# If true, links to the reST sources are added to the pages.
230#html_show_sourcelink = True
231
232# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
233#html_show_sphinx = True
234
235# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
236#html_show_copyright = True
237
238# If true, an OpenSearch description file will be output, and all pages will
239# contain a <link> tag referring to it.  The value of this option must be the
240# base URL from which the finished HTML is served.
241#html_use_opensearch = ''
242
243# This is the file name suffix for HTML files (e.g. ".xhtml").
244#html_file_suffix = None
245
246# Output file base name for HTML help builder.
247htmlhelp_basename = 'GSASIIdoc'
248
249
250# -- Options for LaTeX output --------------------------------------------------
251
252latex_elements = {
253# The paper size ('letterpaper' or 'a4paper').
254#'papersize': 'letterpaper',
255
256# The font size ('10pt', '11pt' or '12pt').
257#'pointsize': '10pt',
258
259# Additional stuff for the LaTeX preamble.
260#'preamble': '',
261}
262
263# Grouping the document tree into LaTeX files. List of tuples
264# (source start file, target name, title, author, documentclass [howto/manual]).
265latex_documents = [
266  ('index', 'GSASIIdoc.tex', u'GSAS-II Developers Documentation',
267   u'Robert B. Von Dreele and Brian H. Toby', 'manual'),
268]
269
270# The name of an image file (relative to this directory) to place at the top of
271# the title page.
272latex_logo = 'G2_html_logo.png'
273
274# For "manual" documents, if this is true, then toplevel headings are parts,
275# not chapters.
276#latex_use_parts = False
277
278# If true, show page references after internal links.
279#latex_show_pagerefs = False
280
281# If true, show URL addresses after external links.
282#latex_show_urls = False
283
284# Documents to append as an appendix to all manuals.
285#latex_appendices = []
286
287# If false, no module index is generated.
288#latex_domain_indices = True
289
290
291# -- Options for manual page output --------------------------------------------
292
293# One entry per manual page. List of tuples
294# (source start file, name, description, authors, manual section).
295man_pages = [
296    ('index', 'GSASIIdoc', u'GSAS-II Developers Documentation',
297     [u'Robert B. Von Dreele',u'Brian H. Toby'], 1)
298]
299
300# If true, show URL addresses after external links.
301#man_show_urls = False
302
303
304# -- Options for Texinfo output ------------------------------------------------
305
306# Grouping the document tree into Texinfo files. List of tuples
307# (source start file, target name, title, author,
308#  dir menu entry, description, category)
309texinfo_documents = [
310    ('index', 'GSASIIdoc', u'GSAS-II Developers Documentation',
311   u'Robert B. Von Dreele and Brian H. Toby', 'GSASIIdoc', 'GSAS-II Developers Manual',
312   'Miscellaneous'),
313]
314
315# Documents to append as an appendix to all manuals.
316#texinfo_appendices = []
317
318# If false, no module index is generated.
319#texinfo_domain_indices = True
320
321# How to display URL addresses: 'footnote', 'no', or 'inline'.
322#texinfo_show_urls = 'footnote'
Note: See TracBrowser for help on using the repository browser.