Properly mock ray submodules when building documentation. (#337)

This commit is contained in:
Robert Nishihara
2017-03-04 23:02:56 -08:00
committed by Philipp Moritz
parent 0a233b7144
commit a7ddac6fb1
8 changed files with 74 additions and 59 deletions
+6
View File
@@ -16,6 +16,12 @@ import sys
import os
import shlex
# These lines added to enable Sphinx to work without installing Ray.
import mock
MOCK_MODULES = ["ray.numbuf", "ray.local_scheduler", "ray.plasma"]
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.Mock()
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.