1717import re
1818import sphinx_gallery
1919
20- #try:
21- from unittest .mock import MagicMock
22- #except ImportError:
23- # from mock import MagicMock
24-
25- sys .path .insert (0 , os .path .abspath ("../.." ))
26- #sys.setrecursionlimit(1500)
27-
28-
29-
30- class Mock (MagicMock ):
31- @classmethod
32- def __getattr__ (cls , name ):
33- return Mock ()
34-
35- MOCK_MODULES = [ 'emd' ,'ot.lp.emd' ]
36- sys .modules .update ((mod_name , Mock ()) for mod_name in MOCK_MODULES )
20+ ## try:
21+ # from unittest.mock import MagicMock
22+ ## except ImportError:
23+ ## from mock import MagicMock
24+ #
25+ # sys.path.insert(0, os.path.abspath("../.."))
26+ ## sys.setrecursionlimit(1500)
27+ #
28+ #
29+ #
30+ # class Mock(MagicMock):
31+ # @classmethod
32+ # def __getattr__(cls, name):
33+ # return Mock()
34+ #
35+ # MOCK_MODULES = [ 'emd','ot.lp.emd']
36+ # sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
3737
3838# If extensions (or modules to document with autodoc) are in another directory,
3939# add these directories to sys.path here. If the directory is relative to the
@@ -58,7 +58,7 @@ def __getattr__(cls, name):
5858 'sphinx.ext.ifconfig' ,
5959 'sphinx.ext.viewcode' ,
6060 'sphinx.ext.napoleon' ,
61- # 'sphinx_gallery.gen_gallery',
61+ 'sphinx_gallery.gen_gallery' ,
6262]
6363
6464# Add any paths that contain templates here, relative to this directory.
@@ -324,6 +324,7 @@ def __getattr__(cls, name):
324324sphinx_gallery_conf = {
325325 'examples_dirs' : '../../examples' ,
326326 'gallery_dirs' : 'auto_examples' ,
327+ 'mod_example_dir' : '../modules/generated/' ,
327328 'reference_url' : {
328329 'numpy' : 'http://docs.scipy.org/doc/numpy-1.9.1' ,
329330 'scipy' : 'http://docs.scipy.org/doc/scipy-0.17.0/reference' }
0 commit comments