Description
Is your feature request related to a problem? Please describe.
Conventions like pvlib's definition of surface_tilt
and surface_azimuth
are documented somewhat haphazardly in docstring parameter descriptions. This is objectionable in that it is redundant (same description appears in many places) and inconsistent (not all descriptions are the same for a particular parameter). For example many functions in pvlib.irradiance
have parameter descriptions like this:
pvlib-python/pvlib/irradiance.py
Lines 553 to 555 in df1c56e
while some others have this:
pvlib-python/pvlib/irradiance.py
Line 329 in df1c56e
Describe the solution you'd like
I'm proposing we convert the "Variables and Symbols" page into a sphinx glossary. Much like how :py:func:
links to function definitions, sphinx glossaries allow you to link terms to their definitions using :term:`surface_tilt`
. So a glossary like this:
.. glossary::
surface_tilt
Collector surface tilt angle, measured upwards from horizontal.
Zero tilt means a horizontal surface (facing directly upwards).
See also :term:`surface_azimuth`.
...
would let all surface_tilt
docstring parameter descriptions reduce to something like this:
surface_tilt : numeric
See :term:`surface_tilt` [degrees]
Describe alternatives you've considered
The downside I see to extracting and centralizing this information is that the gallery definitions are only immediately accessible in the built sphinx docs, so help(pvlib.irradiance.klucher)
and pvlib.irradiance.klucher?
will be less useful (or, depending on your viewpoint, less cluttered). So there is an argument to be made that centralizing this information is not a net gain and we should continue including it in the docstrings themselves.
Additional context
#1253 is vaguely relevant