mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-02 14:45:15 +02:00
more
This commit is contained in:
parent
98c06c1e7b
commit
86f745f66d
1 changed files with 30 additions and 30 deletions
60
doc/conf.py
60
doc/conf.py
|
|
@ -43,7 +43,7 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
|
||||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||||
|
|
||||||
if on_rtd:
|
if on_rtd:
|
||||||
sys.path.append("../GPy")
|
#sys.path.append("../GPy")
|
||||||
os.system("pwd")
|
os.system("pwd")
|
||||||
#os.system("cd ..")
|
#os.system("cd ..")
|
||||||
os.system("sphinx-apidoc -f -o . ../GPy")
|
os.system("sphinx-apidoc -f -o . ../GPy")
|
||||||
|
|
@ -314,38 +314,38 @@ epub_copyright = u'2013, Author'
|
||||||
# Include constructors in all the docs
|
# Include constructors in all the docs
|
||||||
# Got this method from:
|
# Got this method from:
|
||||||
# http://stackoverflow.com/questions/5599254/how-to-use-sphinxs-autodoc-to-document-a-classs-init-self-method
|
# http://stackoverflow.com/questions/5599254/how-to-use-sphinxs-autodoc-to-document-a-classs-init-self-method
|
||||||
def skip(app, what, name, obj, skip, options):
|
#def skip(app, what, name, obj, skip, options):
|
||||||
if name == "__init__":
|
#if name == "__init__":
|
||||||
return False
|
#return False
|
||||||
return skip
|
#return skip
|
||||||
|
|
||||||
def setup(app):
|
#def setup(app):
|
||||||
app.connect("autodoc-skip-member", skip)
|
#app.connect("autodoc-skip-member", skip)
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
##############################################################################
|
||||||
#
|
##
|
||||||
# Mock out imports with C dependencies because ReadTheDocs can't build them.
|
## Mock out imports with C dependencies because ReadTheDocs can't build them.
|
||||||
class Mock(object):
|
#class Mock(object):
|
||||||
def __init__(self, *args, **kwargs):
|
#def __init__(self, *args, **kwargs):
|
||||||
pass
|
#pass
|
||||||
|
|
||||||
def __call__(self, *args, **kwargs):
|
#def __call__(self, *args, **kwargs):
|
||||||
return Mock()
|
#return Mock()
|
||||||
|
|
||||||
@classmethod
|
#@classmethod
|
||||||
def __getattr__(cls, name):
|
#def __getattr__(cls, name):
|
||||||
if name in ('__file__', '__path__'):
|
#if name in ('__file__', '__path__'):
|
||||||
return '/dev/null'
|
#return '/dev/null'
|
||||||
elif name[0] == name[0].upper():
|
#elif name[0] == name[0].upper():
|
||||||
mockType = type(name, (), {})
|
#mockType = type(name, (), {})
|
||||||
mockType.__module__ = __name__
|
#mockType.__module__ = __name__
|
||||||
return mockType
|
#return mockType
|
||||||
else:
|
#else:
|
||||||
return Mock()
|
#return Mock()
|
||||||
|
|
||||||
MOCK_MODULES = [#'matplotlib', 'matplotlib.pyplot',
|
#MOCK_MODULES = [#'matplotlib', 'matplotlib.pyplot',
|
||||||
'pylab'
|
#'pylab'
|
||||||
]
|
#]
|
||||||
for mod_name in MOCK_MODULES:
|
#for mod_name in MOCK_MODULES:
|
||||||
sys.modules[mod_name] = Mock()
|
#sys.modules[mod_name] = Mock()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue