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 all 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
26 changes: 17 additions & 9 deletions docs/sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,28 @@
'sphinx_gallery.gen_gallery',
'sphinx_toggleprompt',
'sphinx_favicon',
'hoverxref.extension',
]

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

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
RDaxini marked this conversation as resolved.
Show resolved Hide resolved
'python': ('https://docs.python.org/3/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', 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 Expand Up @@ -357,15 +374,6 @@ def setup(app):
# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
'matplotlib': ('https://matplotlib.org/stable', None),
}

ipython_warning_is_error = False

# suppress "WARNING: Footnote [1] is not referenced." messages
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