Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
conf.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 #
3 # Core Cosmology Library documentation build configuration file, created by
4 # sphinx-quickstart on Sun Dec 17 07:12:51 2017.
5 #
6 # This file is execfile()d with the current directory set to its
7 # containing dir.
8 #
9 # Note that not all possible configuration values are present in this
10 # autogenerated file.
11 #
12 # All configuration values have a default; values that are commented out
13 # serve to show the default.
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 #
19 import os
20 from os.path import abspath, dirname, join as pjoin
21 import sys
22 this_dir = dirname(abspath(__file__))
23 root_path = abspath(pjoin(this_dir, '../'))
24 if os.path.isdir(root_path):
25  sys.path.insert(0, root_path)
26 
27 on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
28 if on_rtd:
29  try:
30  from unittest.mock import MagicMock
31  except ImportError:
32  from mock import Mock as MagicMock
33 
34  class Mock(MagicMock):
35  @classmethod
36  def __getattr__(cls, name):
37  return MagicMock()
38 
39  MOCK_MODULES = ["pyccl.ccllib","pyccl.background.ccllib","pyccl.constants.ccllib","pyccl.correlation.ccllib",
40  "pyccl.lsst_specs.ccllib","pyccl.neutrinos.ccllib","pyccl.ccllibutils.ccllib",
41  "pyccl.cls.ccllib","pyccl.core.ccllib","pyccl.massfunction.ccllib","pyccl.power.ccllib","yaml"]
42 
43 
44  sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
45 
46 # -- General configuration ------------------------------------------------
47 
48 # If your documentation needs a minimal Sphinx version, state it here.
49 #
50 # needs_sphinx = '1.0'
51 
52 # Add any Sphinx extension module names here, as strings. They can be
53 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
54 # ones.
55 extensions = [
56  'sphinx.ext.autodoc',
57  'sphinx.ext.doctest',
58  'sphinx.ext.intersphinx',
59  'sphinx.ext.todo',
60  'sphinx.ext.coverage',
61  'sphinx.ext.ifconfig',
62  'sphinx.ext.mathjax',
63  'sphinx.ext.viewcode',
64  'sphinx.ext.napoleon']
65 
66 # Add any paths that contain templates here, relative to this directory.
67 templates_path = ['_templates']
68 
69 # The suffix(es) of source filenames.
70 # You can specify multiple suffix as a list of string:
71 #
72 # source_suffix = ['.rst', '.md']
73 source_suffix = '.rst'
74 
75 # The master toctree document.
76 master_doc = 'index'
77 
78 # General information about the project.
79 project = u'pyccl'
80 copyright = u'2018, LSST DESC'
81 author = u'LSST DESC'
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.
88 version = u'1.0'
89 # The full version, including alpha/beta/rc tags.
90 release = u'1.0'
91 
92 # The language for content autogenerated by Sphinx. Refer to documentation
93 # for a list of supported languages.
94 #
95 # This is also used if you do content translation via gettext catalogs.
96 # Usually you set "language" from the command line for these cases.
97 language = None
98 
99 # List of patterns, relative to source directory, that match files and
100 # directories to ignore when looking for source files.
101 # This patterns also effect to html_static_path and html_extra_path
102 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
103 
104 # The name of the Pygments (syntax highlighting) style to use.
105 pygments_style = 'sphinx'
106 
107 # If true, `todo` and `todoList` produce output, else they produce nothing.
108 todo_include_todos = True
109 
110 
111 # -- Options for HTML output ----------------------------------------------
112 
113 # The theme to use for HTML and HTML Help pages. See the documentation for
114 # a list of builtin themes.
115 #
116 import sphinx_rtd_theme
117 html_theme = "sphinx_rtd_theme"
118 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
119 
120 # Theme options are theme-specific and customize the look and feel of a theme
121 # further. For a list of options available for each theme, see the
122 # documentation.
123 #
124 # html_theme_options = {}
125 
126 # Add any paths that contain custom static files (such as style sheets) here,
127 # relative to this directory. They are copied after the builtin static files,
128 # so a file named "default.css" will overwrite the builtin "default.css".
129 html_static_path = []#['_static']
130 
131 # Custom sidebar templates, must be a dictionary that maps document names
132 # to template names.
133 #
134 # This is required for the alabaster theme
135 # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
136 html_sidebars = {
137  '**': [
138  'about.html',
139  'navigation.html',
140  'relations.html', # needs 'show_related': True theme option to display
141  'searchbox.html',
142  'donate.html',
143  ]
144 }
145 
146 
147 # -- Options for HTMLHelp output ------------------------------------------
148 
149 # Output file base name for HTML help builder.
150 htmlhelp_basename = 'CoreCosmologyLibrarydoc'
151 
152 
153 # -- Options for LaTeX output ---------------------------------------------
154 
155 latex_elements = {
156  # The paper size ('letterpaper' or 'a4paper').
157  #
158  # 'papersize': 'letterpaper',
159 
160  # The font size ('10pt', '11pt' or '12pt').
161  #
162  # 'pointsize': '10pt',
163 
164  # Additional stuff for the LaTeX preamble.
165  #
166  # 'preamble': '',
167 
168  # Latex figure (float) alignment
169  #
170  # 'figure_align': 'htbp',
171 }
172 
173 # Grouping the document tree into LaTeX files. List of tuples
174 # (source start file, target name, title,
175 # author, documentclass [howto, manual, or own class]).
176 latex_documents = [
177  (master_doc, 'CoreCosmologyLibrary.tex', u'Core Cosmology Library Documentation',
178  u'LSST DESC', 'manual'),
179 ]
180 
181 
182 # -- Options for manual page output ---------------------------------------
183 
184 # One entry per manual page. List of tuples
185 # (source start file, name, description, authors, manual section).
186 man_pages = [
187  (master_doc, 'corecosmologylibrary', u'Core Cosmology Library Documentation',
188  [author], 1)
189 ]
190 
191 
192 # -- Options for Texinfo output -------------------------------------------
193 
194 # Grouping the document tree into Texinfo files. List of tuples
195 # (source start file, target name, title, author,
196 # dir menu entry, description, category)
197 texinfo_documents = [
198  (master_doc, 'CoreCosmologyLibrary', u'Core Cosmology Library Documentation',
199  author, 'LSSTDESC', 'Routines for cosmological calculations.',
200  'Miscellaneous'),
201 ]
202 
203 
204 
205 
206 # Example configuration for intersphinx: refer to the Python standard library.
207 intersphinx_mapping = {'https://docs.python.org/': None}
def __getattr__(cls, name)
Definition: conf.py:36