Browse Source

[FIX] fix readthedocs build

pull/6/head
troyyyyy 2 years ago
parent
commit
4a4bda8079
2 changed files with 7 additions and 12 deletions
  1. +0
    -11
      docs/conf.py
  2. +7
    -1
      docs/requirements.txt

+ 0
- 11
docs/conf.py View File

@@ -12,17 +12,6 @@ from sphinx.application import Sphinx
sys.path.insert(0, os.path.abspath(".."))

import ablkit # noqa: E402
from unittest.mock import MagicMock


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


MOCK_MODULES = ["numpy", "pyswip", "torch", "torchvision", "zoopt", "termcolor"]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

# -- Project information -----------------------------------------------------



+ 7
- 1
docs/requirements.txt View File

@@ -2,4 +2,10 @@ sphinx
sphinx-rtd-theme
recommonmark
sphinx-markdown-tables
sphinx-copybutton
sphinx-copybutton
numpy
pyswip
torch
torchvision
zoopt
termcolor

Loading…
Cancel
Save