Skip to content

Commit

Permalink
Merge pull request #533 from mcveanlab/docs-fix
Browse files Browse the repository at this point in the history
Remove table classes from Mock list.
  • Loading branch information
jeromekelleher committed Jun 16, 2018
2 parents 90b4cbe + 0e530a7 commit 38d7e9b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,11 @@

from unittest.mock import MagicMock

_table_classes = [
"NodeTable", "EdgeTable", "MigrationTable", "SiteTable", "MutationTable",
"ProvenanceTable"]


class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
# To get the documentation to build correctly for the table classes
# we need to jump through this hoop.
if name in _table_classes:
return MagicMock
else:
return MagicMock()
return MagicMock()

MOCK_MODULES = ["_msprime"]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
Expand Down
1 change: 0 additions & 1 deletion requirements/conda-minimal.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
numpy
nose
hdf5
h5py
gsl
six
1 change: 1 addition & 0 deletions requirements/readthedocs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
six
setuptools_scm
sphinx-argparse
h5py

0 comments on commit 38d7e9b

Please sign in to comment.