mirror of
https://github.com/wassname/ray.git
synced 2026-09-11 12:43:20 +08:00
Properly mock ray submodules when building documentation. (#337)
This commit is contained in:
committed by
Philipp Moritz
parent
0a233b7144
commit
a7ddac6fb1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user