Skip to content

Commit

Permalink
Added module mocks to documentation config (for RTD).
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Carreiras committed Aug 18, 2015
1 parent 60b27b8 commit 290640c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion biosppy/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# built-in
import json
import os
import zipfile

# 3rd party
import h5py
import shortuuid
import zipfile
from sklearn.externals import joblib

# local
Expand Down
10 changes: 10 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
import os
import shlex

# To be able to import to ReadTheDocs
import mock

MOCK_MODULES = ['numpy', 'scipy', 'matplotlib', 'matplotlib.pyplot', 'scipy.signal', 'scipy.interpolate',
'scipy.optimize', 'scipy.stats', 'scipy.cluster', 'scipy.cluster.hierarchy', 'scipy.cluster.vq', 'scipy.sparse',
'scipy.spatial', 'scipy.spatial.distance', 'sklearn', 'sklearn.cluster', 'sklearn.grid_search', 'sklearn.external',
'matplotlib.gridspec', 'h5py']
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.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.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy
numpy==1.9.2
matplotlib==1.4.3
scipy==0.15.1
scikit-learn==0.16.1
Expand Down

0 comments on commit 290640c

Please sign in to comment.