|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# |
| 3 | +# Dataset loaders documentation build configuration file, created by |
| 4 | +# sphinx-quickstart on Thu Jun 22 11:26:05 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 | +# import sys |
| 21 | +# sys.path.insert(0, os.path.abspath('.')) |
| 22 | + |
| 23 | +import os |
| 24 | +import sys |
| 25 | +from recommonmark.parser import CommonMarkParser |
| 26 | +import sphinx_rtd_theme |
| 27 | + |
| 28 | +import dataset_loaders |
| 29 | + |
| 30 | +# Use read the docs theme locally |
| 31 | +html_theme = "sphinx_rtd_theme" |
| 32 | +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
| 33 | + |
| 34 | +# Parse Markdown syntax |
| 35 | +source_parsers = { |
| 36 | + '.md': CommonMarkParser, |
| 37 | +} |
| 38 | + |
| 39 | +# The suffix(es) of source filenames. |
| 40 | +# You can specify multiple suffix as a list of string: |
| 41 | +# |
| 42 | +source_suffix = ['.rst', '.md'] |
| 43 | + |
| 44 | + |
| 45 | +# -- General configuration ------------------------------------------------ |
| 46 | + |
| 47 | +# If your documentation needs a minimal Sphinx version, state it here. |
| 48 | +# |
| 49 | +# needs_sphinx = '1.0' |
| 50 | + |
| 51 | +# Add any Sphinx extension module names here, as strings. They can be |
| 52 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 53 | +# ones. |
| 54 | +extensions = ['sphinx.ext.autodoc', |
| 55 | + 'sphinx.ext.intersphinx', |
| 56 | + 'sphinx.ext.mathjax', |
| 57 | + 'sphinx.ext.viewcode', |
| 58 | + 'sphinx.ext.githubpages', |
| 59 | + # 'sphinx.ext.todo', |
| 60 | + # 'sphinx.ext.doctest', |
| 61 | + 'sphinx.ext.napoleon', |
| 62 | + 'sphinx.ext.linkcode'] |
| 63 | + # 'sphinxcontrib.napoleon'] |
| 64 | + |
| 65 | +napoleon_google_docstring = False |
| 66 | +napoleon_include_special_with_doc = False |
| 67 | + |
| 68 | +# Add any paths that contain templates here, relative to this directory. |
| 69 | +templates_path = ['.templates'] |
| 70 | + |
| 71 | +# The master toctree document. |
| 72 | +master_doc = 'index' |
| 73 | + |
| 74 | +# General information about the project. |
| 75 | +project = u'Dataset loaders' |
| 76 | +copyright = u'2017, Francesco Visin and Adriana Romero' |
| 77 | +author = u'Francesco Visin and Adriana Romero' |
| 78 | + |
| 79 | +# The version info for the project you're documenting, acts as replacement for |
| 80 | +# |version| and |release|, also used in various other places throughout the |
| 81 | +# built documents. |
| 82 | +# |
| 83 | +# The short X.Y version. |
| 84 | +version = u'1.0' |
| 85 | +# The full version, including alpha/beta/rc tags. |
| 86 | +release = u'1.0' |
| 87 | + |
| 88 | +# The language for content autogenerated by Sphinx. Refer to documentation |
| 89 | +# for a list of supported languages. |
| 90 | +# |
| 91 | +# This is also used if you do content translation via gettext catalogs. |
| 92 | +# Usually you set "language" from the command line for these cases. |
| 93 | +language = None |
| 94 | + |
| 95 | +# List of patterns, relative to source directory, that match files and |
| 96 | +# directories to ignore when looking for source files. |
| 97 | +# This patterns also effect to html_static_path and html_extra_path |
| 98 | +exclude_patterns = ['.build', 'Thumbs.db', '.DS_Store'] |
| 99 | + |
| 100 | +# The name of the Pygments (syntax highlighting) style to use. |
| 101 | +pygments_style = 'sphinx' |
| 102 | + |
| 103 | +# If true, `todo` and `todoList` produce output, else they produce nothing. |
| 104 | +todo_include_todos = False |
| 105 | + |
| 106 | + |
| 107 | +# Options for the linkcode extension |
| 108 | +# ---------------------------------- |
| 109 | +# Resolve function |
| 110 | +# This function is used to populate the (source) links in the API |
| 111 | +def linkcode_resolve(domain, info): |
| 112 | + def find_source(): |
| 113 | + # try to find the file and line number, based on code from numpy: |
| 114 | + # https://github.com/numpy/numpy/blob/master/doc/source/conf.py#L286 |
| 115 | + obj = sys.modules[info['module']] |
| 116 | + for part in info['fullname'].split('.'): |
| 117 | + obj = getattr(obj, part) |
| 118 | + import inspect |
| 119 | + fn = inspect.getsourcefile(obj) |
| 120 | + fn = os.path.relpath(fn, |
| 121 | + start=os.path.dirname(dataset_loaders.__file__)) |
| 122 | + source, lineno = inspect.getsourcelines(obj) |
| 123 | + return fn, lineno, lineno + len(source) - 1 |
| 124 | + |
| 125 | + if domain != 'py' or not info['module']: |
| 126 | + return None |
| 127 | + try: |
| 128 | + filename = 'dataset_loaders/%s#L%d-L%d' % find_source() |
| 129 | + except Exception: |
| 130 | + filename = info['module'].replace('.', '/') + '.py' |
| 131 | + import subprocess |
| 132 | + tag = subprocess.Popen(['git', 'rev-parse', 'HEAD'], |
| 133 | + stdout=subprocess.PIPE, |
| 134 | + universal_newlines=True).communicate()[0][:-1] |
| 135 | + return "https://github.com/fvisin/dataset_loaders/blob/%s/%s" % (tag, filename) |
| 136 | + |
| 137 | + |
| 138 | +# -- Options for HTML output ---------------------------------------------- |
| 139 | + |
| 140 | +# The html-style |
| 141 | +# |
| 142 | +# html_style = '/default.css' |
| 143 | + |
| 144 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 145 | +# a list of builtin themes. |
| 146 | +# |
| 147 | +# Read the docs style: |
| 148 | +if os.environ.get('READTHEDOCS') != 'True': |
| 149 | + try: |
| 150 | + import sphinx_rtd_theme |
| 151 | + except ImportError: |
| 152 | + pass # assume we have sphinx >= 1.3 |
| 153 | + else: |
| 154 | + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
| 155 | + html_theme = 'sphinx_rtd_theme' |
| 156 | + |
| 157 | +# Theme options are theme-specific and customize the look and feel of a theme |
| 158 | +# further. For a list of options available for each theme, see the |
| 159 | +# documentation. |
| 160 | +# |
| 161 | +# html_theme_options = {} |
| 162 | + |
| 163 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 164 | +# relative to this directory. They are copied after the builtin static files, |
| 165 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 166 | +html_static_path = ['.static'] |
| 167 | + |
| 168 | +# If true, SmartyPants will be used to convert quotes and dashes to |
| 169 | +# typographically correct entities. |
| 170 | +html_use_smartypants = True |
| 171 | + |
| 172 | + |
| 173 | +# -- Options for HTMLHelp output ------------------------------------------ |
| 174 | + |
| 175 | +# Output file base name for HTML help builder. |
| 176 | +htmlhelp_basename = 'Datasetloadersdoc' |
| 177 | + |
| 178 | + |
| 179 | +# -- Options for LaTeX output --------------------------------------------- |
| 180 | + |
| 181 | +latex_elements = { |
| 182 | + # The paper size ('letterpaper' or 'a4paper'). |
| 183 | + # |
| 184 | + # 'papersize': 'letterpaper', |
| 185 | + |
| 186 | + # The font size ('10pt', '11pt' or '12pt'). |
| 187 | + # |
| 188 | + # 'pointsize': '10pt', |
| 189 | + |
| 190 | + # Additional stuff for the LaTeX preamble. |
| 191 | + # |
| 192 | + # 'preamble': '', |
| 193 | + |
| 194 | + # Latex figure (float) alignment |
| 195 | + # |
| 196 | + # 'figure_align': 'htbp', |
| 197 | +} |
| 198 | + |
| 199 | +# Grouping the document tree into LaTeX files. List of tuples |
| 200 | +# (source start file, target name, title, |
| 201 | +# author, documentclass [howto, manual, or own class]). |
| 202 | +latex_documents = [ |
| 203 | + (master_doc, 'Datasetloaders.tex', u'Dataset loaders Documentation', |
| 204 | + u'Francesco Visin and Adriana Romero', 'manual'), |
| 205 | +] |
| 206 | + |
| 207 | + |
| 208 | +# -- Options for manual page output --------------------------------------- |
| 209 | + |
| 210 | +# One entry per manual page. List of tuples |
| 211 | +# (source start file, name, description, authors, manual section). |
| 212 | +man_pages = [ |
| 213 | + (master_doc, 'datasetloaders', u'Dataset loaders Documentation', |
| 214 | + [author], 1) |
| 215 | +] |
| 216 | + |
| 217 | + |
| 218 | +# -- Options for Texinfo output ------------------------------------------- |
| 219 | + |
| 220 | +# Grouping the document tree into Texinfo files. List of tuples |
| 221 | +# (source start file, target name, title, author, |
| 222 | +# dir menu entry, description, category) |
| 223 | +texinfo_documents = [ |
| 224 | + (master_doc, 'Datasetloaders', u'Dataset loaders Documentation', |
| 225 | + author, 'Datasetloaders', 'One line description of project.', |
| 226 | + 'Miscellaneous'), |
| 227 | +] |
| 228 | + |
| 229 | +# Example configuration for intersphinx: refer to the Python standard library. |
| 230 | +# intersphinx_mapping = {'https://docs.python.org/': None} |
0 commit comments