Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
Getting rid of mocking imports on readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Geneva committed Dec 8, 2020
1 parent 07b437e commit 54fa4d3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
5 changes: 4 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ sphinxcontrib-jsmath==1.0.1
sphinxcontrib-napoleon==0.7
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
numpy==1.19.1
numpy==1.19.1
torch==1.6.0
scipy==1.5.2
matplotlib==3.3.2
6 changes: 4 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
#
import os
import sys
import mock

sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath('../../tmglow'))

from sphinx.ext.autodoc import between
Expand Down Expand Up @@ -56,7 +57,8 @@ def setup(app):
templates_path = ['_templates']

# Fake import these packages when building, this will cause issues locally
autodoc_mock_imports = ['torch', 'matplotlib', 'scipy']
# Does not seem to work properly
# autodoc_mock_imports = ['torch', 'matplotlib', 'scipy']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/tmglow/nn.modules.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
nn.modules package
==================


nn.modules.actNorm module
-------------------------

Expand Down Expand Up @@ -65,3 +64,4 @@ nn.modules.misc module
:members:
:undoc-members:
:show-inheritance:

1 change: 1 addition & 0 deletions docs/source/tmglow/nn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ nn.trainFlowParallel module
:members:
:undoc-members:
:show-inheritance:

1 change: 1 addition & 0 deletions docs/source/tmglow/pc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ pc.physicsConstrained module
:members:
:undoc-members:
:show-inheritance:

3 changes: 2 additions & 1 deletion docs/source/tmglow/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ utils.viz module
.. automodule:: utils.viz
:members:
:undoc-members:
:show-inheritance:
:show-inheritance:

0 comments on commit 54fa4d3

Please sign in to comment.