Skip to content

Commit 932b3c8

Browse files
committed
DOC update conf.py, should run on readthedocs.org now
1 parent b24d552 commit 932b3c8

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

source/conf.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,25 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
import sys
1615
import os
16+
import sys
17+
18+
if sys.version_info[0] >= 3:
19+
from unittest.mock import MagicMock
20+
else:
21+
from mock import MagicMock
22+
23+
24+
class Mock(MagicMock):
25+
@classmethod
26+
def __getattr__(cls, name):
27+
return Mock()
28+
29+
30+
MOCK_MODULES = ['pygtk', 'gtk', 'gobject', 'argparse', 'numpy', 'pandas',
31+
'scipy', 'scipy.sparse', 'scipy.io', 'scipy.io.arff']
32+
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
33+
1734

1835
# If extensions (or modules to document with autodoc) are in another directory,
1936
# add these directories to sys.path here. If the directory is relative to the
@@ -33,10 +50,12 @@
3350
# ones.
3451
extensions = [
3552
'sphinx.ext.autodoc',
53+
'sphinx.ext.autosummary',
3654
'sphinx.ext.doctest',
3755
'sphinx.ext.coverage',
3856
'sphinx.ext.mathjax',
3957
'sphinx.ext.ifconfig',
58+
'numpydoc'
4059
]
4160

4261
# Add any paths that contain templates here, relative to this directory.

0 commit comments

Comments
 (0)