diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 6ee5a5a1c3..157e77074a 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -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 = { + '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. @@ -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 diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index 1a3ac5e71e..cecba6237b 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -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 ------- diff --git a/pyproject.toml b/pyproject.toml index f8283a42eb..8464b7ce23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,6 +66,7 @@ doc = [ 'sphinx-toggleprompt == 0.5.2', 'sphinx-favicon', 'solarfactors', + 'sphinx-hoverxref', ] test = [ 'pytest',