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