Skip to content

Commit

Permalink
rtfd bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jpn-- committed Jan 8, 2015
1 parent 1b9dff9 commit c5ec4ae
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class Mock(MagicMock):
def __getattr__(cls, name):
return Mock()

MOCK_MODULES = ['argparse', 'numpy', 'pandas', 'larch.core', 'larch.apsw']
MOCK_MODULES = ['argparse', 'numpy', 'pandas', 'larch._core', 'larch.apsw']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)


Expand Down
16 changes: 16 additions & 0 deletions py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@
#
################################################################################

if os.environ.get('READTHEDOCS', None) == 'True':
# hack for building docs on rtfd

import sys
from unittest.mock import MagicMock

class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return Mock()

MOCK_MODULES = ['numpy', 'pandas', 'larch._core', 'larch.core', 'larch.apsw']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)



info = """Larch is free, open source software to estimate discrete choice models.
Copyright 2007-2015 Jeffrey Newman
This program is licensed under GPLv3 and comes with ABSOLUTELY NO WARRANTY."""
Expand Down

0 comments on commit c5ec4ae

Please sign in to comment.