Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,9 @@

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

# For dependencies
from unittest.mock import MagicMock


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


MOCK_MODULES = ["numpy", "matplotlib", "matplotlib.pyplot", "pandas", "scipy"]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
# Heavy dependencies aren't installed for the docs build. Sphinx mocks them, and
# shows mocked names in signatures (e.g. `pandas.DataFrame`).
autodoc_mock_imports = ["numpy", "matplotlib", "pandas", "scipy"]

# -- General configuration ------------------------------------------------

Expand Down
Loading