DOC: Fix intersphinx mapping w/fallbacks

This commit is contained in:
Josh Warner (Mac)
2015-08-02 20:37:24 -05:00
parent 60e15373a4
commit 8d33d3d072
4 changed files with 10 additions and 10 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
+10 -10
View File
@@ -298,13 +298,13 @@ plot2rst_rcparams = {'image.cmap' : 'gray',
# -----------------------------------------------------------------------------
_python_doc_base = 'http://docs.python.org/2.7'
intersphinx_mapping = {
_python_doc_base: None,
'http://docs.scipy.org/doc/numpy':
(None, './_intersphinx/numpy-objects.inv'),
'http://docs.scipy.org/doc/scipy/reference':
(None, './_intersphinx/scipy-objects.inv'),
'http://scikit-learn.org/stable':
(None, './_intersphinx/sklearn-objects.inv'),
'python': (_python_doc_base, None),
'numpy': ('http://docs.scipy.org/doc/numpy',
(None, './_intersphinx/numpy-objects.inv')),
'scipy': ('http://docs.scipy.org/doc/scipy/reference',
(None, './_intersphinx/scipy-objects.inv')),
'sklearn': ('http://scikit-learn.org/stable',
(None, './_intersphinx/sklearn-objects.inv')),
}
# ----------------------------------------------------------------------------
@@ -315,7 +315,7 @@ import inspect
from os.path import relpath, dirname
# Function courtesy of NumPy to return URLs containing line #'s'
# Function courtesy of NumPy to return URLs containing line numbers
def linkcode_resolve(domain, info):
"""
Determine the URL corresponding to Python object
@@ -357,8 +357,8 @@ def linkcode_resolve(domain, info):
fn = relpath(fn, start=dirname(skimage.__file__))
if 'dev' in skimage.__version__:
return ("http://github.com/scikit-image/skimage/blob/"
return ("http://github.com/scikit-image/scikit-image/blob/"
"master/skimage/%s%s" % (fn, linespec))
else:
return ("http://github.com/scikit-image/skimage/blob/"
return ("http://github.com/scikit-image/scikit-image/blob/"
"v%s/skimage/%s%s" % (skimage.__version__, fn, linespec))