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

Last change on this file since 2037 was 2037, checked in by toby, 7 years ago

last round RTFD build fixes?

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