Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement hoverxref for floating tooltips #2290

Merged
merged 26 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,30 @@
'sphinx_gallery.gen_gallery',
'sphinx_toggleprompt',
'sphinx_favicon',
'hoverxref.extension',
'sphinx.ext.intersphinx',
RDaxini marked this conversation as resolved.
Show resolved Hide resolved
]

mathjax3_config = {'chtml': {'displayAlign': 'left',
'displayIndent': '2em'}}

# used with hoverxref to link to other projects' documentation not hosted by
# readthedocs
intersphinx_mapping = {
RDaxini marked this conversation as resolved.
Show resolved Hide resolved
"python": ("https://docs.python.org/3/", None),
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
"numpy": ("https://numpy.org/doc/stable", None),
"scipy": ("https://docs.scipy.org/doc/scipy", None),
"matplotlib": ("https://matplotlib.org/stable/", None),
}

# Enable hover tooltips
hoverxref_auto_ref = True
hoverxref_roles = ["class", "meth", "func", "ref", "term"]
hoverxref_role_types = dict.fromkeys(hoverxref_roles, "tooltip")
hoverxref_domains = ["py"]
hoverxref_intersphinx = list(intersphinx_mapping.keys())

napoleon_use_rtype = False # group rtype on same line together with return

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion pvlib/irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def beam_component(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth,
solar_azimuth : numeric
Solar azimuth angle.
dni : numeric
Direct Normal Irradiance
Direct normal irradiance, see :term:`dni`. [Wm⁻²]

Returns
-------
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ doc = [
'sphinx-toggleprompt == 0.5.2',
'sphinx-favicon',
'solarfactors',
'sphinx-hoverxref',
]
test = [
'pytest',
Expand Down
Loading