seed_intersphinx_mapping¶
Populate the Sphinx ‘intersphinx_mapping’ dictionary from the project’s requirements.
This avoids having to manually compile (and keep updated) a mapping like:
intersphinx_mapping = {
"attrs": ("https://www.attrs.org/en/stable/", None),
"Flask": ("https://flask.palletsprojects.com/en/1.1.x/", None),
"matplotlib": ("https://matplotlib.org/stable/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pandas": ("https://pandas.pydata.org/docs/", None),
"Pyramid": ("https://docs.pylonsproject.org/projects/pyramid/en/latest/", None),
"scikit-learn": ("https://scikit-learn.org/stable/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference/", None),
"Sphinx": ("https://www.sphinx-doc.org/en/stable/", None),
}
# Source: https://gist.github.com/bskinn/0e164963428d4b51017cebdb6cda5209
Note
Not all projects include a link to their documentation in the Project-URL field of Python’s core metadata. Why not submit a pull request to them to include it?
For setuptools’ setup.cfg
, this would look like:
project_urls =
Documentation = <documentation_url, e.g. https://domdf-python-tools.readthedocs.io/en/latest>
Or, in pyproject.toml:
[project.urls]
Documentation = "<documentation_url, e.g. https://domdf-python-tools.readthedocs.io/en/latest>"
In the meantime you will still need to manually include an entry for that project in your intersphinx_mapping
.
See also
The Sphinx documentation for sphinx.ext.intersphinx
.
Contents¶
View the Function Index or browse the Source Code.