/ docs / conf.py
conf.py
  1  # -*- coding: utf-8 -*-
  2  #
  3  # Configuration file for the Sphinx documentation builder.
  4  #
  5  # This file does only contain a selection of the most common options. For a
  6  # full list see the documentation:
  7  # http://www.sphinx-doc.org/en/master/config
  8  
  9  # -- Path setup --------------------------------------------------------------
 10  
 11  # If extensions (or modules to document with autodoc) are in another directory,
 12  # add these directories to sys.path here. If the directory is relative to the
 13  # documentation root, use os.path.abspath to make it absolute, like shown here.
 14  #
 15  
 16  import os
 17  import sys
 18  from os.path import dirname, abspath
 19  
 20  sys.path.insert(0, abspath('..'))
 21  pyod_dir = dirname(dirname(abspath(__file__)))
 22  
 23  version_path = os.path.join(pyod_dir, 'pyod', 'version.py')
 24  exec(open(version_path).read())
 25  # -- Project information -----------------------------------------------------
 26  
 27  project = 'pyod'
 28  copyright = '2022, Yue Zhao'
 29  author = 'Yue Zhao'
 30  
 31  # The short X.Y version
 32  version = __version__
 33  # The full version, including alpha/beta/rc tags
 34  release = __version__
 35  
 36  # -- General configuration ---------------------------------------------------
 37  
 38  # If your documentation needs a minimal Sphinx version, state it here.
 39  #
 40  # needs_sphinx = '1.0'
 41  
 42  # Add any Sphinx extension module names here, as strings. They can be
 43  # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 44  # ones.
 45  extensions = [
 46      'sphinx.ext.autodoc',
 47      'sphinx.ext.doctest',
 48      'sphinx.ext.intersphinx',
 49      'sphinx.ext.coverage',
 50      'sphinx.ext.imgmath',
 51      'sphinx.ext.viewcode',
 52      'sphinxcontrib.bibtex',
 53  ]
 54  
 55  bibtex_bibfiles = ['zreferences.bib']
 56  
 57  # Add any paths that contain templates here, relative to this directory.
 58  templates_path = ['_templates']
 59  
 60  # The suffix(es) of source filenames.
 61  # You can specify multiple suffix as a list of string:
 62  #
 63  # source_suffix = ['.rst', '.md']
 64  source_suffix = '.rst'
 65  
 66  # The master toctree document.
 67  master_doc = 'index'
 68  
 69  # The language for content autogenerated by Sphinx. Refer to documentation
 70  # for a list of supported languages.
 71  #
 72  # This is also used if you do content translation via gettext catalogs.
 73  # Usually you set "language" from the command line for these cases.
 74  language = 'en'
 75  
 76  # List of patterns, relative to source directory, that match files and
 77  # directories to ignore when looking for source files.
 78  # This pattern also affects html_static_path and html_extra_path .
 79  exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'pyod.test.rst']
 80  
 81  # The name of the Pygments (syntax highlighting) style to use.
 82  pygments_style = 'sphinx'
 83  
 84  # -- Options for HTML output -------------------------------------------------
 85  
 86  # The theme to use for HTML and HTML Help pages.  See the documentation for
 87  # a list of builtin themes.
 88  #
 89  # html_theme = 'default'
 90  
 91  html_theme = "furo"
 92  
 93  # Theme options are theme-specific and customize the look and feel of a theme
 94  # further.  For a list of options available for each theme, see the
 95  # documentation.
 96  #
 97  # html_theme_options = {}
 98  
 99  # Add any paths that contain custom static files (such as style sheets) here,
100  # relative to this directory. They are copied after the builtin static files,
101  # so a file named "default.css" will overwrite the builtin "default.css".
102  html_static_path = []
103  
104  # Custom sidebar templates, must be a dictionary that maps document names
105  # to template names.
106  #
107  # The default sidebars (for documents that don't match any pattern) are
108  # defined by theme itself.  Builtin themes are using these templates by
109  # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
110  # 'searchbox.html']``.
111  #
112  # html_sidebars = {}
113  # html_sidebars = {'**': ['globaltoc.html', 'relations.html', 'sourcelink.html',
114  #                         'searchbox.html']}
115  
116  # -- Options for HTMLHelp output ---------------------------------------------
117  
118  # Output file base name for HTML help builder.
119  htmlhelp_basename = 'pyoddoc'
120  
121  # -- Options for LaTeX output ------------------------------------------------
122  
123  latex_elements = {
124      # The paper size ('letterpaper' or 'a4paper').
125      #
126      # 'papersize': 'letterpaper',
127  
128      # The font size ('10pt', '11pt' or '12pt').
129      #
130      # 'pointsize': '10pt',
131  
132      # Additional stuff for the LaTeX preamble.
133      #
134      # 'preamble': '',
135  
136      # Latex figure (float) alignment
137      #
138      # 'figure_align': 'htbp',
139  }
140  
141  # Grouping the document tree_ into LaTeX files. List of tuples
142  # (source start file, target name, title,
143  #  author, documentclass [howto, manual, or own class]).
144  latex_documents = [
145      (master_doc, 'pyod.tex', 'pyod Documentation',
146       'Yue Zhao', 'manual'),
147  ]
148  
149  # -- Options for manual page output ------------------------------------------
150  
151  # One entry per manual page. List of tuples
152  # (source start file, name, description, authors, manual section).
153  man_pages = [
154      (master_doc, 'pyod', 'pyod Documentation',
155       [author], 1)
156  ]
157  
158  # -- Options for Texinfo output ----------------------------------------------
159  
160  # Grouping the document tree_ into Texinfo files. List of tuples
161  # (source start file, target name, title, author,
162  #  dir menu entry, description, category)
163  texinfo_documents = [
164      (master_doc, 'pyod', 'pyod Documentation',
165       author, 'pyod', 'One line description of project.',
166       'Miscellaneous'),
167  ]
168  
169  # -- Extension configuration -------------------------------------------------
170  
171  # -- Options for intersphinx extension ---------------------------------------
172  
173  # Example configuration for intersphinx: refer to the Python standard library.
174  intersphinx_mapping = {
175      'python': ('https://docs.python.org/3', None),
176      'sklearn': ('https://scikit-learn.org/stable', None),
177      'numpy': ('https://numpy.org/doc/stable', None),
178      'scipy': ('https://docs.scipy.org/doc/scipy', None),
179  }
180  
181  # Suppress warnings from sklearn's auto-generated set_fit_request /
182  # set_predict_request methods whose docstrings reference sklearn's internal
183  # glossary terms. Keep ref.term narrow; do not add ref.ref here because that
184  # would mask legitimate broken cross-reference warnings across the whole
185  # doc set.
186  suppress_warnings = [
187      'ref.term',
188  ]
189