Skip to content

Commit

Permalink
Merge pull request #8 from AMarkard/5-readthedocs
Browse files Browse the repository at this point in the history
Fixed Read the Docs problem, closes #5
  • Loading branch information
AMarkard committed Aug 27, 2019
2 parents 2b1d27f + a290647 commit 3b03255
Showing 1 changed file with 27 additions and 14 deletions.
41 changes: 27 additions & 14 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,28 @@

from unittest.mock import MagicMock

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

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

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

project = 'Framenet Tools'
copyright = '2019, Andre Markard'
author = 'Andre Markard'
project = "Framenet Tools"
copyright = "2019, Andre Markard"
author = "Andre Markard"

# The full version, including alpha/beta/rc tags
release = '0.0.1'
release = "0.0.1"


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc'
]
extensions = ["sphinx.ext.autodoc"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -51,20 +49,35 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'default'
html_theme = "default"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

master_doc = 'index'
master_doc = "index"


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

MOCK_MODULES = ['torch', 'torchtext', 'nltk', 'spacy', 'pyfn', 'argparse', 'numpy', 'pandas']

MOCK_MODULES = [
"nltk.stem",
"nltk.tree",
"torch.nn",
"torch.autograd",
"torch.nn.functional",
"torch",
"torchtext",
"nltk",
"spacy",
"pyfn",
"argparse",
"numpy",
"pandas",
]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

0 comments on commit 3b03255

Please sign in to comment.