Skip to content

Commit 7a00cff

Browse files
committed
fix merge
2 parents 4d5b640 + 2eaea2c commit 7a00cff

33 files changed

+35495
-35302
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- Thank you for your contribution! The following items must be addressed before the code can be merged. Please don't hesitate to ask for help if you're unsure of how to accomplish any of the items. Feel free to remove checklist items that are not relevant to your change. -->
22

33
- [ ] Closes #xxxx
4-
- [ ] I am familiar with the [contributing guidelines](https://pvlib-python.readthedocs.io/en/latest/contributing.html)
4+
- [ ] I am familiar with the [contributing guidelines](https://pvlib-python.readthedocs.io/en/latest/contributing/index.html)
55
- [ ] Tests added
66
- [ ] Updates entries in [`docs/sphinx/source/reference`](https://github.com/pvlib/pvlib-python/blob/main/docs/sphinx/source/reference) for API changes.
77
- [ ] Adds description and name entries in the appropriate "what's new" file in [`docs/sphinx/source/whatsnew`](https://github.com/pvlib/pvlib-python/tree/main/docs/sphinx/source/whatsnew) for all changes. Includes link to the GitHub Issue with `` :issue:`num` `` or this Pull Request with `` :pull:`num` ``. Includes contributor name and/or GitHub username (link with `` :ghuser:`user` ``).

docs/sphinx/source/conf.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,28 @@
5656
'sphinx_gallery.gen_gallery',
5757
'sphinx_toggleprompt',
5858
'sphinx_favicon',
59+
'hoverxref.extension',
5960
]
6061

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

65+
# Example configuration for intersphinx: refer to the Python standard library.
66+
intersphinx_mapping = {
67+
'python': ('https://docs.python.org/3/', None),
68+
'numpy': ('https://numpy.org/doc/stable/', None),
69+
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
70+
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
71+
'matplotlib': ('https://matplotlib.org/stable', None),
72+
}
73+
74+
# Enable hover tooltips
75+
hoverxref_auto_ref = True
76+
hoverxref_roles = ["class", "meth", "func", "ref", "term"]
77+
hoverxref_role_types = dict.fromkeys(hoverxref_roles, "tooltip")
78+
hoverxref_domains = ["py"]
79+
hoverxref_intersphinx = list(intersphinx_mapping.keys())
80+
6481
napoleon_use_rtype = False # group rtype on same line together with return
6582

6683
# Add any paths that contain templates here, relative to this directory.
@@ -357,15 +374,6 @@ def setup(app):
357374
# If true, do not generate a @detailmenu in the "Top" node's menu.
358375
# texinfo_no_detailmenu = False
359376

360-
# Example configuration for intersphinx: refer to the Python standard library.
361-
intersphinx_mapping = {
362-
'python': ('https://docs.python.org/3/', None),
363-
'numpy': ('https://numpy.org/doc/stable/', None),
364-
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
365-
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
366-
'matplotlib': ('https://matplotlib.org/stable', None),
367-
}
368-
369377
ipython_warning_is_error = False
370378

371379
# suppress "WARNING: Footnote [1] is not referenced." messages

docs/sphinx/source/contributing/how_to_contribute_new_code.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ We strongly recommend using virtual environments for development.
153153
Virtual environments make it easier to switch between different
154154
versions of software. This `scientific-python.org guide
155155
<https://learn.scientific-python.org/development/tutorials/dev-environment/>`_
156-
is a good reference for virtual environments. The pvlib-python `installation
157-
user guide <https://pvlib-python.readthedocs.io/en/stable/user_guide/
158-
installation.html#set-up-a-virtual-environment>`_ also provides instructions on
156+
is a good reference for virtual environments. The pvlib-python
157+
:ref:`installation guide <setupenvironment>` also provides instructions on
159158
setting up a virtual environment. If this is your first pull request, don't
160159
worry about using a virtual environment.

docs/sphinx/source/contributing/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _contributing:
2+
13
============
24
Contributing
35
============

docs/sphinx/source/contributing/style_guide.rst

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,30 @@ the ``docs/readthedocs.org:pvlib-python`` link within the checks
7070
status box at the bottom of the pull request.
7171

7272

73-
.. _references:
73+
.. _documentation-units:
74+
75+
Parameter names and units
76+
-------------------------
77+
78+
When specifying parameters and their units, please follow these guidelines:
79+
80+
- Use the recommended parameter name and units listed in the :ref:`nomenclature` where applicable.
81+
- Enclose units in square brackets after the parameter description, e.g., ``Air temperature. [°C]``.
82+
- Use unicode superscripts symbols for exponents, e.g. ``m⁻²``.
83+
84+
- Numbers: ````, ``¹``, ``²``, ``³``, ````, ````, ````, ````, ````, ````
85+
- Negative exponent: ````
86+
- Degree symbol: ``°``
87+
88+
- Link to a brief description in the :ref:`nomenclature` section if it exists, via the sphinx role ``:term:`glossary_term```. For example, to document ``dni`` use:
89+
90+
.. code-block:: rst
91+
92+
dni : numeric
93+
Direct normal irradiance, see :term:`dni`. [Wm⁻²]
94+
95+
96+
.. _reference_style:
7497

7598
References
7699
----------

docs/sphinx/source/reference/tracking.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
Tracking
44
========
55

6-
Functions
7-
---------
8-
96
.. autosummary::
107
:toctree: generated/
118

docs/sphinx/source/reference/transformer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Transformer losses
44
==================
55

6-
Methods to account for losses in transformers
6+
Functions to account for losses in transformers
77

88
.. autosummary::
99
:toctree: generated/

docs/sphinx/source/user_guide/nomenclature.rst

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,21 @@ There is a convention on consistent variable names throughout the library:
102102
Photocurrent
103103

104104
poa_diffuse
105-
Total diffuse irradiation in plane. Sum of ground and sky diffuse.
105+
Total diffuse irradiance in plane [Wm⁻²]. Sum of ground and sky diffuse
106+
components of global irradiance.
106107

107108
poa_direct
108-
Direct/beam irradiation in plane
109+
Direct/beam irradiance in plane [Wm⁻²].
109110

110111
poa_global
111-
Global irradiation in plane. sum of diffuse and beam projection.
112+
Global irradiance in plane. Sum of diffuse and beam projection [Wm⁻²].
112113

113114
poa_ground_diffuse
114-
In plane ground reflected irradiation
115+
In plane ground reflected irradiance [Wm⁻²].
115116

116117
poa_sky_diffuse
117-
Diffuse irradiation in plane from scattered light in the atmosphere
118-
(without ground reflected irradiation)
118+
Diffuse irradiance in plane from scattered light in the atmosphere
119+
(without ground reflected irradiance) [Wm⁻²].
119120

120121
precipitable_water
121122
Total precipitable water contained in a column of unit cross section
@@ -168,10 +169,6 @@ There is a convention on consistent variable names throughout the library:
168169
temp_module
169170
Temperature of the module
170171

171-
transposition_factor
172-
The gain ratio of the radiation on inclined plane to global horizontal
173-
irradiation: :math:`\frac{poa\_global}{ghi}`
174-
175172
tz
176173
Timezone
177174

docs/sphinx/source/user_guide/singlediode.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ diode model equation.
2424

2525
.. math::
2626
27-
I = I_L - I_0 \left(\exp \left(\frac{V + I R_s}{n Ns V_{th}} \right) - 1 \right)
27+
I = I_L - I_0 \left(\exp \left(\frac{V + I R_s}{n N_s V_{th}} \right) - 1 \right)
2828
- \frac{V + I R_s}{R_{sh}}
2929
3030
Lambert W-function is the inverse of the function
@@ -36,8 +36,8 @@ a form that can be expressed as a Lambert W-function.
3636

3737
.. math::
3838
39-
z = \frac{R_s I_0}{n Ns V_{th} \left(1 + \frac{R_s}{R_{sh}} \right)} \exp \left(
40-
\frac{R_s \left( I_L + I_0 \right) + V}{n Ns V_{th} \left(1 + \frac{R_s}{R_{sh}}\right)}
39+
z = \frac{R_s I_0}{n N_s V_{th} \left(1 + \frac{R_s}{R_{sh}} \right)} \exp \left(
40+
\frac{R_s \left( I_L + I_0 \right) + V}{n N_s V_{th} \left(1 + \frac{R_s}{R_{sh}}\right)}
4141
\right)
4242
4343
Then the module current can be solved using the Lambert W-function,
@@ -46,7 +46,7 @@ Then the module current can be solved using the Lambert W-function,
4646
.. math::
4747
4848
I = \frac{I_L + I_0 - \frac{V}{R_{sh}}}{1 + \frac{R_s}{R_{sh}}}
49-
- \frac{n Ns V_{th}}{R_s} W \left(z \right)
49+
- \frac{n N_s V_{th}}{R_s} W \left(z \right)
5050
5151
5252
Bishop's Algorithm
@@ -60,7 +60,7 @@ by a zero diode voltage and an estimate of open circuit voltage given by
6060

6161
.. math::
6262
63-
V_{oc, est} = n Ns V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)
63+
V_{oc, est} = n N_s V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)
6464
6565
We know that :math:`V_d = 0` corresponds to a voltage less than zero, and
6666
we can also show that when :math:`V_d = V_{oc, est}`, the resulting
@@ -73,24 +73,24 @@ between 0 and :math:`V_{oc, est}` will always find any desired condition in the
7373

7474
.. math::
7575
76-
I = I_L - I_0 \left(\exp \left(\frac{V_{oc, est}}{n Ns V_{th}} \right) - 1 \right)
76+
I = I_L - I_0 \left(\exp \left(\frac{V_{oc, est}}{n N_s V_{th}} \right) - 1 \right)
7777
- \frac{V_{oc, est}}{R_{sh}} \newline
7878
79-
I = I_L - I_0 \left(\exp \left(\frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{n Ns V_{th}} \right) - 1 \right)
80-
- \frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
79+
I = I_L - I_0 \left(\exp \left(\frac{n N_s V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{n N_s V_{th}} \right) - 1 \right)
80+
- \frac{n N_s V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
8181
8282
I = I_L - I_0 \left(\exp \left(\log \left(\frac{I_L}{I_0} + 1 \right) \right) - 1 \right)
83-
- \frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
83+
- \frac{n N_s V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
8484
8585
I = I_L - I_0 \left(\frac{I_L}{I_0} + 1 - 1 \right)
86-
- \frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
86+
- \frac{n N_s V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
8787
8888
I = I_L - I_0 \left(\frac{I_L}{I_0} \right)
89-
- \frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
89+
- \frac{n N_s V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
9090
91-
I = I_L - I_L - \frac{n Ns V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
91+
I = I_L - I_L - \frac{n N_s V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
9292
93-
I = - \frac{n Ns V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)}{R_{sh}}
93+
I = - \frac{n N_s V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)}{R_{sh}}
9494
9595
References
9696
----------
@@ -111,4 +111,4 @@ Clifford W. Hansen, Sandia `Report SAND2015-2065
111111

112112
[4] "Computer simulation of the effects of electrical mismatches in
113113
photovoltaic cell interconnection circuits" JW Bishop, Solar Cell (1988)
114-
:doi:`10.1016/0379-6787(88)90059-2`
114+
:doi:`10.1016/0379-6787(88)90059-2`

docs/sphinx/source/whatsnew/v0.11.2.rst

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,22 @@ v0.11.2 (Anticipated December, 2024)
66

77
Deprecations
88
~~~~~~~~~~~~
9+
* Deprecated terms ``dni_clearsky`` and ``clearsky_dni``, replaced with ``dni_clear``.
10+
Affected functions are :py:func:`~pvlib.irradiance.dirindex` and :py:func:`~pvlib.irradiance.dni`.
11+
(:issue:`2272`, :pull:`2274`)
912

1013

1114
Enhancements
1215
~~~~~~~~~~~~
16+
* :py:func:`~pvlib.ivtools.sdm.fit_desoto` now allows input of initial
17+
parameter guesses. (:issue:`1014`, :pull:`2291`)
1318

1419
Bug Fixes
1520
~~~~~~~~~
1621
* :py:meth:`~pvlib.pvsystem.PVSystem.get_irradiance` accepts float inputs.
1722
(:issue:`1338`, :pull:`2227`)
23+
* Handle DST transitions that happen at midnight in :py:func:`pvlib.solarposition.hour_angle`
24+
(:issue:`2132` :pull:`2133`)
1825

1926
Bug fixes
2027
~~~~~~~~~
@@ -25,10 +32,17 @@ Documentation
2532
~~~~~~~~~~~~~
2633
* Edited docstrings for :py:func:`~pvlib.pvsystem.dc_ohms_from_percent` and
2734
:py:func:`~pvlib.pvsystem.dc_ohmic_losses` for clarity. (:issue:`1601`, :pull:`2229`)
28-
* Added a new citation style guide (:ref:`references`) to the contributing
35+
* Added 'freestanding' and 'insulated' `racking_model` options for cell
36+
temperature calculation in :py:class:`~pvlib.pvsystem.PVSystem`
37+
:py:class:`~pvlib.pvsystem.SingleAxisTrackerMount`, and
38+
:py:class:`~pvlib.pvsystem.FixedMount` docstrings. Various formatting edits
39+
for clarity. (:issue:`1942`, :pull:`2232`)
40+
* Added a new citation style guide (:ref:`reference_style`) to the contributing
2941
page. (:issue:`2202`, :pull:`2226`)
3042
* Updated :py:func:`~pvlib.irradiance.reindl` to include definitions of terms
3143
and a new "notes" section (:issue:`2183`, :pull:`2193`)
44+
* Clarified the error message in :py:func:`~pvlib.clearsky.detect_clearsky` when
45+
windows contain fewer than three data points (:issue:`2005`, :pull:`2281`)
3246
* Added a new :ref:`nomenclature` page, in place of the Variables and Symbols
3347
page, using the sphinx glossary directive. (:issue:`1421`, :pull:`2234`)
3448
* Explained how to write docstrings for new functions in :ref:`example-docstring`
@@ -39,9 +53,14 @@ Documentation
3953

4054
- `spectra` and `spectra_components` (:issue:`2150`, :pull:`2264`)
4155

56+
* Added a section in the style guide for parameter naming and units best practices.
57+
See :ref:`documentation-units`. (:issue:`2205`, :pull:`2248`)
58+
* Added a example to :py:func:`~pvlib.pvsystem.retrieve_sam` docstring to
59+
demonstrate how to retrieve a database from the SAM repo. (:pull:`2313`)
4260

4361
Testing
4462
~~~~~~~
63+
* Updated test files to track new PVGIS 5.3 data. (:pull:`2305`)
4564

4665

4766
Requirements
@@ -63,3 +82,5 @@ Contributors
6382
* Mark Mikofski (:ghuser:`mikofski`)
6483
* matsuobasho (:ghuser:`matsuobasho`)
6584
* Echedey Luis (:ghuser:`echedey-ls`)
85+
* Kevin Anderson (:ghuser:`kandersolar`)
86+
* Scott Nelson (:ghuser:`scttnlsn`)

0 commit comments

Comments
 (0)