Skip to content

Commit

Permalink
[FIX,DOC] remove mock packages
Browse files Browse the repository at this point in the history
  • Loading branch information
troyyyyy committed Jan 8, 2024
1 parent ad275d6 commit c8895a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 28 deletions.
27 changes: 0 additions & 27 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,6 @@
# -- Path setup --------------------------------------------------------------

sys.path.insert(0, os.path.abspath(".."))

from unittest.mock import MagicMock


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


MOCK_MODULES = [
"numpy",
"pyswip",
"torch",
"torchvision",
"zoopt",
"termcolor",
"torch.nn",
"torch.utils",
"torch.optim",
"torchvision.transform",
"torch.utils.data",
"torch.utils.data.sampler"
]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)


import ablkit # noqa: E402

# -- Project information -----------------------------------------------------
Expand Down
8 changes: 7 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ sphinx
sphinx-rtd-theme
recommonmark
sphinx-markdown-tables
sphinx-copybutton
sphinx-copybutton
numpy
pyswip
torch
torchvision
zoopt
termcolor

0 comments on commit c8895a7

Please sign in to comment.