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

Last change on this file since 3190 was 3000, checked in by toby, 6 years ago

make the two frame version the trunk as we hit version 3000

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