GPy/doc/source/conf.py
Eric Kalosa-Kenyon fa909768bd
v1.10.0 (#908)
* Update self.num_data in GP when X is updated

* Update appveyor.yml

* Update setup.cfg

* Stop using legacy bdist_wininst

* fix: reorder brackets to avoid an n^2 array

* Minor fix to multioutput regression example, to clarify code + typo.

* added missing import

* corrected typo in function name

* fixed docstring and added more explanation

* changed ordering of explanation to get to the point fast and provide additional details after

* self.num_data and self.input_dim are set dynamically in class GP() after the shape of X. In MRD, the user-specific values are passed around until X is defined.

* fixed technical description of gradients_X()

* brushed up wording

* fix normalizer

* fix ImportError in likelihood.py

in function log_predictive_density_sampling

* Update setup.py

bump min require version of scipy to 1.3.0

* Add cython into installation requirement

* Coregionalized regression bugfix (#824)

* route default arg W_rank correctly (Addresses #823)

* Drop Python 2.7 support (fix #833)

* travis, appveyor: Add Python 3.8 build

* README: Fix scipy version number

* setup.py: Install scipy < 1.5.0 when using Python 3.5

* plotting_tests.py: Use os.makedirs instead of matplotlib.cbook.mkdirs (fix #844)

* Use super().__init__ consistently, instead of sometimes calling base class __init__ directly

* README.md: Source formatting, one badge per line

* README.md: Remove broken landscape badge (fix #831)

* README.md: Badges for devel and deploy (fix #830)

* ignore itermediary sphinx restructured text

* ignore vs code project settings file

* add yml config for readthedocs

* correct path

* drop epub and pdf builds (as per main GPy)

* typo

* headings and structure

* update copyright

* restructuring and smartening

* remove dead links

* reorder package docs

* rst "markup"

* change rst syntax

* makes sense for core to go first

* add placeholder

* initial core docs, class diagram

* lower level detail

* higher res diagrams

* layout changes for diagrams

resolve conflict

* better syntax

* redunant block

* introduction

* inheritance diagrams

* more on models

* kernel docs to kern.src

* moved doc back from kern.src to kern

* kern not kern.src in index

* better kernel description

* likelihoods

* placeholder

* add plotting to docs index

* summarise plotting

* clarification

* neater contents

* architecture diagram

* using pods

* build with dot

* more on examples

* introduction for utils package

* compromise formatting for sphinx

* correct likelihod definition

* parameterization of priors

* latent function inference intro and format

* maint: Remove tabs (and some trailing spaces)

* dpgplvm.py: Wrap long line + remove tabs

* dpgplvm.py: Fix typo in the header

* maint: Wrap very long lines (> 450 chars)

* maint: Wrap very long lines (> 400 chars)

* Add the link to the api doc on the readme page.

* remove deprecated parameter

* Update README.md

* new: Added to_dict() method to Ornstein-Uhlenbeck (OU) kernel

* fix: minor typos in README !minor

* added python 3.9 build following 4aa2ea9f5e to address https://github.com/SheffieldML/GPy/issues/881

* updated cython-generated c files for python 3.9 via `pyenv virtualenv 3.9.1 gpy391 && pyenv activate gpy391 && python setup.py build --force

* updated osx to macOS 10.15.7, JDK to 14.0.2, and XCode to Xcode 12.2 (#904)

The CI  was broken. This commit fixes the CI. The root cause is reported in more detail in issue #905.

In short, the default macOS version (10.13, see the TravisCI docs) used in TravisCI isn't supported by brew which caused the brew install pandoc in the download_miniconda.sh pre-install script to hang and time out the build. It failed even on inert PRs (adding a line to README, e.g.). Now, with the updated macOS version (from 10.13 to 10.15), brew is supported and the brew install pandoc command succeeds and allows the remainder of the CI build and test sequence to succeed.

* incremented version

Co-authored-by: Masha Naslidnyk 🦉 <naslidny@amazon.co.uk>
Co-authored-by: Zhenwen Dai <zhenwendai@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Mark McLeod <mark.mcleod@mindfoundry.ai>
Co-authored-by: Sigrid Passano Hellan <sighellan@gmail.com>
Co-authored-by: Antoine Blanchard <antoine@sand-lab-gpu.mit.edu>
Co-authored-by: kae_mihara <rukamihara@outlook.com>
Co-authored-by: lagph <49130858+lagph@users.noreply.github.com>
Co-authored-by: Julien Bect <julien.bect@centralesupelec.fr>
Co-authored-by: Neil Lawrence <ndl21@cam.ac.uk>
Co-authored-by: bobturneruk <bob.turner.uk@gmail.com>
Co-authored-by: bobturneruk <r.d.turner@sheffield.ac.uk>
Co-authored-by: gehbiszumeis <16896724+gehbiszumeis@users.noreply.github.com>
2021-05-11 20:12:38 -07:00

401 lines
12 KiB
Python

# -*- coding: utf-8 -*-
#
# GPy documentation build configuration file, created by
# sphinx-quickstart on Fri Sep 18 18:16:28 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
import shlex
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#for p in os.walk('../../GPy'):
# sys.path.append(p[0])
sys.path.insert(0, os.path.abspath('../../'))
sys.path.insert(0, os.path.abspath('../../GPy/'))
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
import sys
from unittest.mock import MagicMock
class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return MagicMock()
MOCK_MODULES = [
"GPy.util.linalg.linalg_cython",
"GPy.util.linalg_cython",
"sympy",
'GPy.kern.stationary_cython',
"sympy.utilities",
"sympy.utilities.lambdify",
]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
#on_rtd = True
if on_rtd:
# sys.path.append(os.path.abspath('../GPy'))
import subprocess
# build extensions:
# proc = subprocess.Popen("cd ../../; python setup.py build_ext install", stdout=subprocess.PIPE, shell=True)
# (out, err) = proc.communicate()
# print("build_ext develop:")
# print(out)
# print current folder:
proc = subprocess.Popen("pwd", stdout=subprocess.PIPE, shell=True)
(out, err) = proc.communicate()
print("$ pwd: ")
print(out)
#Lets regenerate our rst files from the source, -P adds private modules (i.e kern._src)
proc = subprocess.Popen("sphinx-apidoc -M -P -f -o . ../../GPy", stdout=subprocess.PIPE, shell=True)
(out, err) = proc.communicate()
print("$ Apidoc:")
print(out)
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
#'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.graphviz',
'sphinx.ext.inheritance_diagram',
]
#---sphinx.ext.inheritance_diagram config
inheritance_graph_attrs = dict(rankdir="LR", dpi=1200)
#----- Autodoc
#import sys
#try:
# from unittest.mock import MagicMock
#except:
# from mock import Mock as MagicMock
#
#class Mock(MagicMock):
# @classmethod
# def __getattr__(cls, name):
# return Mock()
#
#
#sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
#
import sphinx_rtd_theme
autodoc_default_flags = ['members',
#'undoc-members',
#'private-members',
#'special-members',
#'inherited-members',
'show-inheritance']
autodoc_member_order = 'groupwise'
add_function_parentheses = False
add_module_names = False
#modindex_common_prefix = ['GPy']
show_authors = True
# ------ Sphinx
# Add any paths that contain templates here, relative to this directory.
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]#templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'GPy'
#author = u'`Humans <https://github.com/SheffieldML/GPy/graphs/contributors>`_'
author = 'GPy Authors, see https://github.com/SheffieldML/GPy/graphs/contributors'
copyright = u'2020, '+author
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
with open('../../GPy/__version__.py', 'r') as f:
version = f.read()
release = version
print version
# version = '0.8.8'
# The full version, including alpha/beta/rc tags.
# release = '0.8.8'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'python'
# autodoc:
autoclass_content = 'both'
autodoc_default_flags = ['members',
#'undoc-members',
#'private-members',
#'special-members',
#'inherited-members',
'show-inheritance']
autodoc_member_order = 'groupwise'
add_function_parentheses = False
add_module_names = False
modindex_common_prefix = ['paramz']
show_authors = True
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = dict(sidebarwidth='20}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_css_files = [
'wide.css',
]
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {
# '**': ['globaltoc.html', 'localtoc.html', 'sourcelink.html', 'searchbox.html'],
# 'using/windows': ['windowssidebar.html', 'searchbox.html'],
#}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
html_domain_indices = False
# If false, no index is generated.
html_use_index = False
# If true, the index is split into individual pages for each letter.
html_split_index = True
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
#html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'GPydoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
'papersize': 'a4paper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Latex figure (float) alignment
'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
#latex_documents = [
# (master_doc, 'GPy.tex', u'GPy Documentation',
# u'GPy Authors', 'manual'),
#]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
#man_pages = [
# (master_doc, 'gpy', u'GPy Documentation',
# [author], 1)
#]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
#texinfo_documents = [
# (master_doc, 'GPy', u'GPy Documentation',
# author, 'GPy', 'One line description of project.',
# 'Miscellaneous'),
#]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False