Skip to content

Commit

Permalink
Update conf.py with MagicMock
Browse files Browse the repository at this point in the history
This might solve the problem in readthedocs. If not, changes must be reverted.
  • Loading branch information
muammar committed Mar 6, 2020
1 parent 35b3971 commit 1971271
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,20 @@

sys.path.insert(0, os.path.abspath("../../"))

# class Mock(MagicMock):
# @classmethod
# def __getattr__(cls, name):
# return MagicMock()
#
# MOCK_MODULES = ['ase', 'ase.calculators', 'ase.calculators.calculator',
# 'ase.neighborlist' 'torch']
#
# sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return MagicMock()

MOCK_MODULES = ['torch']

sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)


# -- Project information -----------------------------------------------------

project = "ML4Chem"
copyright = "2019, Muammar El Khatib"
copyright = "2020, Muammar El Khatib"
author = "Muammar El Khatib"

# The short X.Y version
Expand Down

0 comments on commit 1971271

Please sign in to comment.