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

Last change on this file since 4213 was 4213, checked in by toby, 2 years ago

multiple small changes to allow docs build under 3.x

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