Skip to content

Commit 3db9fca

Browse files
committed
Use intersphinx for documentation links
1 parent aab1e19 commit 3db9fca

3 files changed

Lines changed: 17 additions & 25 deletions

File tree

.readthedocs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ sphinx:
1212

1313
python:
1414
install:
15-
- requirements: docs/requirements.txt
15+
- method: pip
16+
path: .
17+
- requirements: docs/requirements.txt

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ Sphinx
22
ipykernel
33
nbsphinx
44
sphinx_rtd_theme
5+
numpy

docs/source/conf.py

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import sys
22
import os
33

4-
# import matplotlib
5-
from unittest import mock
4+
from adjustText import __version__
65

76
sys.path.insert(0, os.path.abspath("../.."))
87
# matplotlib.use("Agg")
@@ -24,15 +23,14 @@
2423
# import sys
2524
# sys.path.insert(0, os.path.abspath('.'))
2625

27-
2826
# -- Project information -----------------------------------------------------
2927

3028
project = "adjustText"
3129
copyright = "2018, Ilya Flyamer"
3230
author = "Ilya Flyamer"
3331

3432
# The short X.Y version
35-
version = "1.0beta"
33+
version = "1.3.0"
3634
# The full version, including alpha/beta/rc tags
3735
# def get_version(path):
3836
# with open(path, "r") as f:
@@ -43,6 +41,8 @@
4341

4442
# release = get_version("../_version.py")
4543

44+
release = __version__
45+
4646
# -- General configuration ---------------------------------------------------
4747

4848
# If your documentation needs a minimal Sphinx version, state it here.
@@ -56,30 +56,19 @@
5656
"sphinx.ext.autodoc",
5757
"sphinx.ext.viewcode",
5858
"sphinx.ext.githubpages",
59+
"sphinx.ext.intersphinx",
5960
"nbsphinx",
6061
"sphinx.ext.mathjax",
6162
"sphinx.ext.napoleon",
6263
]
6364

64-
65-
MOCK_MODULES = [
66-
"bioframe",
67-
"numpy",
68-
"scipy",
69-
"scipy.spatial",
70-
"scipy.spatial.distance",
71-
"matplotlib",
72-
"matplotlib.pyplot",
73-
"matplotlib.patches",
74-
"matplotlib.patches.FancyArrowPatch",
75-
"matplotlib.path",
76-
"matplotlib.path.get_path_collection_extents",
77-
]
78-
79-
for mod_name in MOCK_MODULES:
80-
sys.modules[mod_name] = mock.Mock()
81-
82-
autodoc_mock_imports = MOCK_MODULES
65+
intersphinx_mapping = {
66+
'python': ('https://docs.python.org/3/', None),
67+
'matplotlib': ('https://matplotlib.org/', None),
68+
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
69+
'numpy': ('https://numpy.org/doc/stable/', None),
70+
'bioframe': ('https://bioframe.readthedocs.io/en/stable/', None),
71+
}
8372

8473
# Add any paths that contain templates here, relative to this directory.
8574
templates_path = ["_templates"]
@@ -98,7 +87,7 @@
9887
#
9988
# This is also used if you do content translation via gettext catalogs.
10089
# Usually you set "language" from the command line for these cases.
101-
language = None
90+
language = "en"
10291

10392
# List of patterns, relative to source directory, that match files and
10493
# directories to ignore when looking for source files.

0 commit comments

Comments
 (0)