Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Remove and mock doc dependencies because readthedocs is OOM #983

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
5 changes: 1 addition & 4 deletions docs_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ click
fairseq
future
hypothesis<4.0
joblib
mock
numpy
onnx
pandas
pytorch-pretrained-bert
requests
scipy
torchtext
tensorboardX
10 changes: 10 additions & 0 deletions pytext/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os
import sys

import mock
from sphinx.domains.python import PythonDomain


Expand Down Expand Up @@ -112,6 +113,15 @@
#
# html_sidebars = {}

# Got this property from the official docs but doesn't seem to work
# even in the latest version of Sphinx. Keeping for future compat.
# autodoc_mock_imports = ['scipy', 'tensorboardX']

# Manually mocking out the libraries to prevent requiring these modules
MOCK_MODULES = ["scipy", "scipy.special", "tensorboardX"]
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.Mock()


# -- Options for HTMLHelp output ---------------------------------------------

Expand Down