Skip to content

Commit 8f7158c

Browse files
Update style_guide.rst
Co-Authored-By: Adam R. Jensen <[email protected]>
1 parent fc1159b commit 8f7158c

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

docs/sphinx/source/contributing/style_guide.rst

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ required for every function.
118118

119119
.. code-block:: python
120120
121-
def example_function(poa_global, exponents, degree_symbol,
122-
default_arg='someval', optional_arg=None):
121+
def example_function(poa_global, exponents, time_ref,
122+
default_arg='someval', optional_arg=None):
123123
r"""
124124
Brief summary of the function (no citations).
125125
@@ -129,10 +129,11 @@ required for every function.
129129
classes (:py:class:`pvlib.location.Location`).
130130
131131
.. versionadded:: 0.0.1
132+
There are many more purpose-specific directives, admonitions and such
133+
available at `this link <admonitions>`_. E.g.: ``.. versionchanged::``,
134+
``.. deprecated::``, ``.. note::`` and ``.. warning::``.
132135
133-
.. note:: This docstring is a template.
134-
135-
.. warning:: Code body is not included in this example!
136+
.. _admonitions: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#admonitions-messages-and-warnings
136137
137138
Parameters
138139
----------
@@ -142,8 +143,8 @@ required for every function.
142143
A list of exponents. [x⁰¹²³⁴⁵⁶⁷⁸⁹⁻].
143144
degree_symbol : pandas.Series or pandas.DataFrame
144145
It's different from superscript zero. [°].
145-
default_arg : string, default ``'someval'``.
146-
Text enclosed in double backticks mean code formatting.
146+
time_ref : ``'UT'`` or ``'TST'``, default: ``'UT'``
147+
``'UT'`` (universal time) or ``'TST'`` (True Solar Time).
147148
optional_arg : integer, optional
148149
A description of ``optional_arg``. [Unitless].
149150
@@ -157,7 +158,7 @@ required for every function.
157158
ValueError
158159
If ``poa_global`` is negative.
159160
KeyError
160-
If ``default_arg`` does not exist.
161+
If ``time_ref`` does not exist.
161162
162163
Notes
163164
-----
@@ -183,8 +184,7 @@ required for every function.
183184
184185
See Also
185186
--------
186-
pvlib.location.lookup_altitude
187-
pvlib.location.Location
187+
pvlib.location.lookup_altitude, pvlib.location.Location
188188
189189
Examples
190190
--------
@@ -197,8 +197,11 @@ required for every function.
197197
citation generator to format the citation correctly.
198198
199199
.. [1] Anderson, K., Hansen, C., Holmgren, W., Jensen, A., Mikofski, M.,
200-
and Driesse, A. “pvlib python: 2023 project update.” Journal of Open
201-
Source Software, 8(92), 5994, (2023). :doi:`10.21105/joss.05994`.
200+
and Driesse, A. "pvlib python: 2023 project update." Journal of Open
201+
Source Software, 8(92), 5994, (2023). :doi:`10.21105/joss.05994`.
202+
.. [2] J. Smith and J. Doe. "Obama inaugurated as President." CNN.com.
203+
Accessed: Feb. 1, 2009. [Online.]
204+
Available: http://www.cnn.com/POLITICS/01/21/obama_inaugurated/index.html
202205
"""
203206
return "Something"
204207

0 commit comments

Comments
 (0)