diff --git a/.readthedocs.yml b/.readthedocs.yml index 3b85c84..a92f378 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -12,4 +12,6 @@ sphinx: python: install: - - requirements: docs/requirements.txt + - method: pip + path: . + - requirements: docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt index 88837d1..aec2a4c 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,3 +2,4 @@ Sphinx ipykernel nbsphinx sphinx_rtd_theme +numpy diff --git a/docs/source/conf.py b/docs/source/conf.py index 36bf8e8..bf79c75 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,8 +1,7 @@ import sys import os -# import matplotlib -from unittest import mock +from adjustText import __version__ sys.path.insert(0, os.path.abspath("../..")) # matplotlib.use("Agg") @@ -24,7 +23,6 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) - # -- Project information ----------------------------------------------------- project = "adjustText" @@ -32,7 +30,7 @@ author = "Ilya Flyamer" # The short X.Y version -version = "1.0beta" +version = "1.3.0" # The full version, including alpha/beta/rc tags # def get_version(path): # with open(path, "r") as f: @@ -43,6 +41,8 @@ # release = get_version("../_version.py") +release = __version__ + # -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. @@ -56,30 +56,19 @@ "sphinx.ext.autodoc", "sphinx.ext.viewcode", "sphinx.ext.githubpages", + "sphinx.ext.intersphinx", "nbsphinx", "sphinx.ext.mathjax", "sphinx.ext.napoleon", ] - -MOCK_MODULES = [ - "bioframe", - "numpy", - "scipy", - "scipy.spatial", - "scipy.spatial.distance", - "matplotlib", - "matplotlib.pyplot", - "matplotlib.patches", - "matplotlib.patches.FancyArrowPatch", - "matplotlib.path", - "matplotlib.path.get_path_collection_extents", -] - -for mod_name in MOCK_MODULES: - sys.modules[mod_name] = mock.Mock() - -autodoc_mock_imports = MOCK_MODULES +intersphinx_mapping = { + 'python': ('https://docs.python.org/3/', None), + 'matplotlib': ('https://matplotlib.org/', None), + 'scipy': ('https://docs.scipy.org/doc/scipy/', None), + 'numpy': ('https://numpy.org/doc/stable/', None), + 'bioframe': ('https://bioframe.readthedocs.io/en/stable/', None), +} # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -98,7 +87,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files.