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

Last change on this file since 2802 was 2802, checked in by toby, 5 years ago

updates for doc build

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