Skip to content

Commit

Permalink
Fix docs generating on RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
J535D165 committed Nov 8, 2016
1 parent 7164cb4 commit 8b7b3d7
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,34 @@
import sys
import os
import shlex
import mock

# 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.
sys.path.insert(0, os.path.abspath('..'))
# sys.path.insert(0, os.path.abspath('../recordlinkage'))

autodoc_mock_imports = [
'numpy',
'scipy',
'scipy.sparse',
'pandas',
'pandas.types.inference',
'sklearn',
'sklearn.feature_extraction',
'sklearn.feature_extraction.text',
'sklearn.utils.validation',
'sklearn.preprocessing'
# why does autodoc_mock_imports fail on rtd
MOCK_MODULES = [
'numpy',
'scipy',
'scipy.sparse',
'pandas',
'pandas.types',
'pandas.types.inference',
'sklearn',
'sklearn.feature_extraction',
'sklearn.feature_extraction.text',
'sklearn.utils',
'sklearn.utils.validation',
'sklearn.preprocessing'
]


for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.Mock()

import recordlinkage

# -- General configuration ------------------------------------------------
Expand Down

0 comments on commit 8b7b3d7

Please sign in to comment.