1 | # -*- coding: utf-8 -*- |
---|
2 | # |
---|
3 | # SasView documentation build configuration file, created by |
---|
4 | # sphinx-quickstart on Wed Aug 28 14:59:44 2013. |
---|
5 | # |
---|
6 | # This file is execfile()d with the current directory set to its containing dir. |
---|
7 | # |
---|
8 | # Note that not all possible configuration values are present in this |
---|
9 | # autogenerated file. |
---|
10 | # |
---|
11 | # All configuration values have a default; values that are commented out |
---|
12 | # serve to show the default. |
---|
13 | |
---|
14 | import sys, os, collections |
---|
15 | |
---|
16 | # If extensions (or modules to document with autodoc) are in another directory, |
---|
17 | # add these directories to sys.path here. If the directory is relative to the |
---|
18 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
---|
19 | from distutils.util import get_platform |
---|
20 | platform = '.%s-%s'%(get_platform(),sys.version[:3]) |
---|
21 | build_lib = os.path.abspath('../../../build/lib'+platform) |
---|
22 | sys.path.insert(0, build_lib) |
---|
23 | sys.path.insert(0, os.path.abspath('_extensions')) # for sphinx extensions |
---|
24 | print "-- path --" |
---|
25 | print "\n".join(sys.path) |
---|
26 | |
---|
27 | # -- General configuration ----------------------------------------------------- |
---|
28 | |
---|
29 | # If your documentation needs a minimal Sphinx version, state it here. |
---|
30 | #needs_sphinx = '1.0' |
---|
31 | |
---|
32 | # Add any Sphinx extension module names here, as strings. They can be extensions |
---|
33 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
---|
34 | extensions = ['sphinx.ext.autodoc', |
---|
35 | 'sphinx.ext.todo', |
---|
36 | 'sphinx.ext.coverage', |
---|
37 | 'sphinx.ext.mathjax', |
---|
38 | 'dollarmath', |
---|
39 | 'sphinx.ext.viewcode'] |
---|
40 | |
---|
41 | # Add any paths that contain templates here, relative to this directory. |
---|
42 | templates_path = ['_templates'] |
---|
43 | |
---|
44 | # The suffix of source filenames. |
---|
45 | source_suffix = '.rst' |
---|
46 | |
---|
47 | # The encoding of source files. |
---|
48 | #source_encoding = 'utf-8-sig' |
---|
49 | |
---|
50 | # The master toctree document. |
---|
51 | master_doc = 'index' |
---|
52 | |
---|
53 | # General information about the project. |
---|
54 | project = u'SasView' |
---|
55 | copyright = u'2017, The SasView Project' |
---|
56 | |
---|
57 | # The version info for the project you're documenting, acts as replacement for |
---|
58 | # |version| and |release|, also used in various other places throughout the |
---|
59 | # built documents. |
---|
60 | # |
---|
61 | # The short X.Y version. |
---|
62 | version = '4.1' |
---|
63 | # The full version, including alpha/beta/rc tags. |
---|
64 | release = '4.1.0' |
---|
65 | |
---|
66 | # The language for content autogenerated by Sphinx. Refer to documentation |
---|
67 | # for a list of supported languages. |
---|
68 | #language = None |
---|
69 | |
---|
70 | # There are two options for replacing |today|: either, you set today to some |
---|
71 | # non-false value, then it is used: |
---|
72 | #today = '' |
---|
73 | # Else, today_fmt is used as the format for a strftime call. |
---|
74 | #today_fmt = '%B %d, %Y' |
---|
75 | |
---|
76 | # List of patterns, relative to source directory, that match files and |
---|
77 | # directories to ignore when looking for source files. |
---|
78 | # |
---|
79 | # PGP 2014/04/03: We have some code which doesn't get carried over to |
---|
80 | # the build directory. Exclude the appropriate *.rst files here so |
---|
81 | # that we don't get various "ImportError: No module named ___" when |
---|
82 | # running Sphinx. |
---|
83 | exclude_patterns = ["*sas.sasgui.perspectives.simulation.rst", |
---|
84 | "*sas.sascalc.pr.c_extensions.rst", |
---|
85 | "*sas.sascalc.realspace.rst", |
---|
86 | "*sas.sascalc.simulation.rst", |
---|
87 | "*sas.sasview.setup_exe.rst", |
---|
88 | "*sas.sasview.setup_mac.rst", |
---|
89 | "*sas.sasgui.guiframe.custom_pstats.rst", # pstats not in standard library on Ubuntu out of the box |
---|
90 | ] |
---|
91 | |
---|
92 | # The reST default role (used for this markup: `text`) to use for all documents. |
---|
93 | #default_role = None |
---|
94 | |
---|
95 | # If true, '()' will be appended to :func: etc. cross-reference text. |
---|
96 | #add_function_parentheses = True |
---|
97 | |
---|
98 | # If true, the current module name will be prepended to all description |
---|
99 | # unit titles (such as .. function::). |
---|
100 | #add_module_names = True |
---|
101 | |
---|
102 | # If true, sectionauthor and moduleauthor directives will be shown in the |
---|
103 | # output. They are ignored by default. |
---|
104 | #show_authors = False |
---|
105 | |
---|
106 | # The name of the Pygments (syntax highlighting) style to use. |
---|
107 | pygments_style = 'sphinx' |
---|
108 | |
---|
109 | # A list of ignored prefixes for module index sorting. |
---|
110 | #modindex_common_prefix = [] |
---|
111 | |
---|
112 | # If true, keep warnings as "system message" paragraphs in the built documents. |
---|
113 | #keep_warnings = False |
---|
114 | |
---|
115 | |
---|
116 | # -- Options for HTML output --------------------------------------------------- |
---|
117 | |
---|
118 | # The theme to use for HTML and HTML Help pages. See the documentation for |
---|
119 | # a list of builtin themes. |
---|
120 | html_theme = 'default' |
---|
121 | |
---|
122 | # Theme options are theme-specific and customize the look and feel of a theme |
---|
123 | # further. For a list of options available for each theme, see the |
---|
124 | # documentation. |
---|
125 | #html_theme_options = {} |
---|
126 | |
---|
127 | # Add any paths that contain custom themes here, relative to this directory. |
---|
128 | #html_theme_path = [] |
---|
129 | |
---|
130 | # The name for this set of Sphinx documents. If None, it defaults to |
---|
131 | # "<project> v<release> documentation". |
---|
132 | #html_title = None |
---|
133 | |
---|
134 | # A shorter title for the navigation bar. Default is the same as html_title. |
---|
135 | #html_short_title = None |
---|
136 | |
---|
137 | # The name of an image file (relative to this directory) to place at the top |
---|
138 | # of the sidebar. |
---|
139 | #html_logo = None |
---|
140 | |
---|
141 | # The name of an image file (within the static path) to use as favicon of the |
---|
142 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
---|
143 | # pixels large. |
---|
144 | #html_favicon = None |
---|
145 | |
---|
146 | # Add any paths that contain custom static files (such as style sheets) here, |
---|
147 | # relative to this directory. They are copied after the builtin static files, |
---|
148 | # so a file named "default.css" will overwrite the builtin "default.css". |
---|
149 | html_static_path = ['_static'] |
---|
150 | |
---|
151 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
---|
152 | # using the given strftime format. |
---|
153 | #html_last_updated_fmt = '%b %d, %Y' |
---|
154 | |
---|
155 | # If true, SmartyPants will be used to convert quotes and dashes to |
---|
156 | # typographically correct entities. |
---|
157 | #html_use_smartypants = True |
---|
158 | |
---|
159 | # Custom sidebar templates, maps document names to template names. |
---|
160 | #html_sidebars = {} |
---|
161 | |
---|
162 | # Additional templates that should be rendered to pages, maps page names to |
---|
163 | # template names. |
---|
164 | #html_additional_pages = {} |
---|
165 | |
---|
166 | # If false, no module index is generated. |
---|
167 | #html_domain_indices = True |
---|
168 | |
---|
169 | # If false, no index is generated. |
---|
170 | #html_use_index = True |
---|
171 | |
---|
172 | # If true, the index is split into individual pages for each letter. |
---|
173 | #html_split_index = False |
---|
174 | |
---|
175 | # If true, links to the reST sources are added to the pages. |
---|
176 | #html_show_sourcelink = True |
---|
177 | |
---|
178 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
---|
179 | #html_show_sphinx = True |
---|
180 | |
---|
181 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
---|
182 | #html_show_copyright = True |
---|
183 | |
---|
184 | # If true, an OpenSearch description file will be output, and all pages will |
---|
185 | # contain a <link> tag referring to it. The value of this option must be the |
---|
186 | # base URL from which the finished HTML is served. |
---|
187 | #html_use_opensearch = '' |
---|
188 | |
---|
189 | # This is the file name suffix for HTML files (e.g. ".xhtml"). |
---|
190 | #html_file_suffix = None |
---|
191 | |
---|
192 | # Output file base name for HTML help builder. |
---|
193 | htmlhelp_basename = 'SasViewdoc' |
---|
194 | |
---|
195 | # Turn off permalinks, which are a nice feature for the docs when viewed in a |
---|
196 | # browser, but which look weird (and cannot be "right-click->copy url") in |
---|
197 | # the SasView help. |
---|
198 | html_add_permalinks = "" |
---|
199 | |
---|
200 | |
---|
201 | # -- Options for LaTeX output -------------------------------------------------- |
---|
202 | |
---|
203 | LATEX_PREAMBLE=r""" |
---|
204 | \renewcommand{\AA}{\text{\r{A}}} % Allow \AA in math mode |
---|
205 | \usepackage[utf8]{inputenc} % Allow unicode symbols in text |
---|
206 | \usepackage[T1]{fontenc} % Taking care of underscores |
---|
207 | \catcode`\_=12 % Moving underscore to category 12 |
---|
208 | \newcommand{\lt}{<} %lower than symbol handling |
---|
209 | \newcommand{\gt}{>} %greater than symbol handling |
---|
210 | \DeclareUnicodeCharacter {00B7} {\ensuremath{\cdot}} % cdot |
---|
211 | \DeclareUnicodeCharacter {00B0} {\ensuremath{^\circ}} % degrees |
---|
212 | \DeclareUnicodeCharacter {212B} {\AA} % Angstrom |
---|
213 | """ |
---|
214 | latex_elements = { |
---|
215 | # The paper size ('letterpaper' or 'a4paper'). |
---|
216 | 'papersize': 'a4paper', |
---|
217 | |
---|
218 | # The font size ('10pt', '11pt' or '12pt'). |
---|
219 | #'pointsize': '10pt', |
---|
220 | |
---|
221 | # Additional stuff for the LaTeX preamble. |
---|
222 | 'preamble': LATEX_PREAMBLE |
---|
223 | |
---|
224 | } |
---|
225 | |
---|
226 | # Grouping the document tree into LaTeX files. List of tuples |
---|
227 | # (source start file, target name, title, author, documentclass [howto/manual]). |
---|
228 | latex_documents = [ |
---|
229 | ('index', 'SasView.tex', u'SasView Documentation', |
---|
230 | u'The SasView Project', 'manual'), |
---|
231 | ] |
---|
232 | |
---|
233 | # The name of an image file (relative to this directory) to place at the top of |
---|
234 | # the title page. |
---|
235 | #latex_logo = None |
---|
236 | |
---|
237 | # For "manual" documents, if this is true, then toplevel headings are parts, |
---|
238 | # not chapters. |
---|
239 | #latex_use_parts = False |
---|
240 | |
---|
241 | # If true, show page references after internal links. |
---|
242 | #latex_show_pagerefs = False |
---|
243 | |
---|
244 | # If true, show URL addresses after external links. |
---|
245 | #latex_show_urls = False |
---|
246 | |
---|
247 | # Documents to append as an appendix to all manuals. |
---|
248 | #latex_appendices = [] |
---|
249 | |
---|
250 | # If false, no module index is generated. |
---|
251 | #latex_domain_indices = True |
---|
252 | |
---|
253 | |
---|
254 | # -- Options for manual page output -------------------------------------------- |
---|
255 | |
---|
256 | # One entry per manual page. List of tuples |
---|
257 | # (source start file, name, description, authors, manual section). |
---|
258 | man_pages = [ |
---|
259 | ('index', 'sasview', u'SasView Documentation', |
---|
260 | [u'The SasView Project'], 1) |
---|
261 | ] |
---|
262 | |
---|
263 | # If true, show URL addresses after external links. |
---|
264 | #man_show_urls = False |
---|
265 | |
---|
266 | |
---|
267 | # -- Options for Texinfo output ------------------------------------------------ |
---|
268 | |
---|
269 | # Grouping the document tree into Texinfo files. List of tuples |
---|
270 | # (source start file, target name, title, author, |
---|
271 | # dir menu entry, description, category) |
---|
272 | texinfo_documents = [ |
---|
273 | ('index', 'SasView', u'SasView Documentation', |
---|
274 | u'The SasView Project', 'SasView', 'One line description of project.', |
---|
275 | 'Miscellaneous'), |
---|
276 | ] |
---|
277 | |
---|
278 | # Documents to append as an appendix to all manuals. |
---|
279 | #texinfo_appendices = [] |
---|
280 | |
---|
281 | # If false, no module index is generated. |
---|
282 | #texinfo_domain_indices = True |
---|
283 | |
---|
284 | # How to display URL addresses: 'footnote', 'no', or 'inline'. |
---|
285 | #texinfo_show_urls = 'footnote' |
---|
286 | |
---|
287 | # If true, do not generate a @detailmenu in the "Top" node's menu. |
---|
288 | #texinfo_no_detailmenu = False |
---|
289 | |
---|
290 | if os.path.exists('rst_prolog'): |
---|
291 | with open('rst_prolog') as fid: |
---|
292 | rst_prolog = fid.read() |
---|
293 | |
---|
294 | numfig = True |
---|