Skip to content

Commit 72f3783

Browse files
clean up 0.8 whatsnew, other minor doc issues (#1054)
* remove api entry for pvsystem.sapm_aoi_loss * fix issues in api.rst and whatsnew * xarray whats new pattern * fix various rst issues * missing issues and contributors * remove travis badge from readme * Update docs/sphinx/source/whatsnew/v0.8.0.rst Co-authored-by: Kevin Anderson <[email protected]> * review fixes * backticks, links * typooooo Co-authored-by: Kevin Anderson <[email protected]>
1 parent a6667a3 commit 72f3783

File tree

5 files changed

+94
-70
lines changed

5 files changed

+94
-70
lines changed

README.md

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
<tr>
2626
<td>Build Status</td>
2727
<td>
28-
<a href="https://travis-ci.org/pvlib/pvlib-python">
29-
<img src="https://travis-ci.org/pvlib/pvlib-python.svg?branch=master" alt="travis build status" />
30-
</a>
3128
<a href="http://pvlib-python.readthedocs.org/en/stable/">
3229
<img src="https://readthedocs.org/projects/pvlib-python/badge/?version=stable" alt="documentation build status" />
3330
</a>

docs/sphinx/source/api.rst

+18-7
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ Methods for irradiance calculations
136136

137137
pvsystem.PVSystem.get_irradiance
138138
pvsystem.PVSystem.get_aoi
139+
pvsystem.PVSystem.get_iam
139140
tracking.SingleAxisTracker.get_irradiance
140141

141142
Decomposing and combining irradiance
@@ -235,9 +236,10 @@ PV temperature models
235236
temperature.pvsyst_cell
236237
temperature.faiman
237238
temperature.fuentes
239+
pvsystem.PVSystem.sapm_celltemp
238240

239241
Temperature Model Parameters
240-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
242+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
241243
.. currentmodule:: pvlib.temperature
242244
.. autodata:: TEMPERATURE_MODEL_PARAMETERS
243245
:annotation:
@@ -276,9 +278,9 @@ Functions for fitting diode models
276278
.. autosummary::
277279
:toctree: generated/
278280

279-
ivtools.fit_sde_sandia
280-
ivtools.fit_sdm_cec_sam
281-
ivtools.fit_sdm_desoto
281+
ivtools.sde.fit_sandia_simple
282+
ivtools.sdm.fit_cec_sam
283+
ivtools.sdm.fit_desoto
282284

283285
Inverter models (DC to AC conversion)
284286
-------------------------------------
@@ -310,7 +312,6 @@ Sandia array performance model (SAPM)
310312
pvsystem.sapm
311313
pvsystem.sapm_effective_irradiance
312314
pvsystem.sapm_spectral_loss
313-
pvsystem.sapm_aoi_loss
314315
inverter.sandia
315316
temperature.sapm_cell
316317

@@ -360,7 +361,7 @@ Utilities for working with IV curve data
360361
.. autosummary::
361362
:toctree: generated/
362363

363-
ivtools.utility.rectify_iv_curve
364+
ivtools.utils.rectify_iv_curve
364365

365366
Other
366367
-----
@@ -376,25 +377,35 @@ Effects on PV System Output
376377
===========================
377378

378379
Loss models
379-
^^^^^^^^^^^
380+
-----------
381+
380382
.. autosummary::
381383
:toctree: generated/
382384

383385
pvsystem.combine_loss_factors
384386

387+
Snow
388+
----
389+
385390
.. autosummary::
386391
:toctree: generated/
387392

388393
snow.coverage_nrel
389394
snow.fully_covered_nrel
390395
snow.dc_loss_nrel
391396

397+
Soiling
398+
-------
399+
392400
.. autosummary::
393401
:toctree: generated/
394402

395403
soiling.hsu
396404
soiling.kimber
397405

406+
Shading
407+
-------
408+
398409
.. autosummary::
399410
:toctree: generated/
400411

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

+64-49
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,42 @@
11
.. _whatsnew_0800:
22

3-
v0.8.0 (Month day, year)
4-
-------------------------
5-
6-
API Breaking Changes
7-
~~~~~~~~~~~~~~~~~~~~
8-
9-
* The ``ivtools.py`` module has been reorganized into sub-modules and functions
10-
in ``ivtools.py`` have been renamed (:pull:`708`)
11-
- Functions for fitting diode models are now in ``ivtools\sdm.py``
12-
- :py:func:`pvlib.ivtools.fit_sdm_cec_sam` is now :py:func:`pvlib.ivtools.sdm.fit_cec_sam`
13-
- :py:func:`pvlib.ivtools.fit_sdm_desoto` is now :py:func:`pvlib.ivtools.sdm.fit_desoto`
14-
- Functions for fitting the single diode equation are now in ``ivtools\sde.py``
15-
- :py:func:`pvlib.ivtools.fit_sde_sandia` is now :py:func:`pvlib.ivtools.sde.fit_sandia_simple`
16-
17-
API Changes with Deprecations
18-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19-
* Moved functions related to inverters from ``pvsystem.py`` to ``inverter.py``.
20-
Functions are renamed to follow a more consistent pattern, as follows (:pull:`886`):
21-
- :py:func:`pvlib.pvsystem.snlinverter` is now :py:func:`pvlib.inverter.sandia`
22-
- :py:func:`pvlib.pvsystem.pvwatts_ac` is now :py:func:`pvlib.inverter.pvwatts`
23-
- :py:func:`pvlib.pvsystem.adrinverter` is now :py:func:`pvlib.inverter.adr`
24-
* Argument ``ac_model`` for :py:class:`pvlib.modelchain.ModelChain` now accepts
25-
``'sandia'``, ``'pvwatts'`` and ``'adr'`` for the inverter models. (:pull:`886`)
26-
* :py:class:`pvlib.pvsystem.PVSystem` ``module_type`` and ``racking_model`` now
27-
default to ``None``. This continues a deprecation of assuming SAPM values
28-
for cell temperature modeling. In this v0.8 release series, calling
29-
:py:meth:`pvlib.pvsystem.PVSystem.sapm_celltemp` without setting ``PVSystem.temperature model parameters``,
30-
or a valid combination of ``PVsystem.module_type`` and ``PVsystem.racking_model``, will cause
31-
``PVSystem.temperature_model_parameters`` to be set to SAPM values for a
32-
glass/glass module in open racking and emit a warning. In v0.9, users must
33-
provide ``temperature_model_parameters`` or a valid combination of
34-
``module_type`` and ``racking_model``. (:issue:`1030`, :pull:`1033`)
35-
* Deprecated arbitrary keyword arguments for
36-
:py:class:`pvlib.location.Location`, :py:class:`pvlib.pvsystem.PVSystem`,
37-
:py:class:`pvlib.tracking.SingleAxisTracker`, and
38-
:py:class:`pvlib.modelchain.ModelChain`. Supplying arbitrary keyword
39-
to these objects will result in TypeErrors in v0.9. (:issue:`1029`, :pull:`1053`)
40-
* ``pvlib.pvsystem.LocalizedPVSystem`` and ``pvlib.pvsystem.LocalizedSingleAxisTracker``
41-
are deprecated and will be removed in 0.9. Use
42-
:py:class:`pvlib.location.Location`, :py:class:`pvlib.pvsystem.PVSystem`,
43-
:py:class:`pvlib.tracking.SingleAxisTracker`, and
44-
:py:class:`pvlib.modelchain.ModelChain` instead.
45-
(:issue:`1029`, :pull:`1034`, :pull:`1053`)
3+
v0.8.0 (September 8, 2020)
4+
--------------------------
5+
6+
Breaking changes
7+
~~~~~~~~~~~~~~~~
8+
* The ``ivtools.py`` module has been reorganized into a subpackage and functions
9+
in ``ivtools.py`` have been renamed (:pull:`708`):
10+
11+
- Functions for fitting diode models are now in :py:mod:`pvlib.ivtools.sdm`
12+
- :py:func:`pvlib.ivtools.fit_sdm_cec_sam` is now :py:func:`pvlib.ivtools.sdm.fit_cec_sam`
13+
- :py:func:`pvlib.ivtools.fit_sdm_desoto` is now :py:func:`pvlib.ivtools.sdm.fit_desoto`
14+
- Functions for fitting the single diode equation are now in :py:mod:`pvlib.ivtools.sde`
15+
- :py:func:`pvlib.ivtools.fit_sde_sandia` is now :py:func:`pvlib.ivtools.sde.fit_sandia_simple`
4616

47-
API Changes
48-
~~~~~~~~~~~
4917
* Removed ``run_parallel_calculations`` and ``n_workers_for_parallel_calcs``
5018
from :py:func:`pvlib.bifacial.pvfactors_timeseries` inputs (:issue:`902`) (:pull:`934`)
19+
5120
* :py:func:`pvlib.iotools.read_tmy3` can now only read local data files because
5221
the NREL RREDC server hosting the TMY3 dataset has been retired. For
5322
fetching TMY data from NREL servers, :py:func:`pvlib.iotools.get_psm3` is
5423
now recommended to retrieve newer PSM3 data over the older TMY3 data.
5524
(:issue:`996`) (:pull:`1004`)
25+
5626
* The tkinter-based file selection dialog has been removed from
5727
:py:func:`pvlib.iotools.read_tmy2` and :py:func:`pvlib.iotools.read_tmy3`;
5828
the filepath is now a required parameter. (:pull:`1004`)
29+
5930
* Removed ``systemdef`` function from ``pvsystem.py``. This function was not
6031
used in pvlib and its output was not directly compatible with any pvlib
6132
function. See :py:func:`pvlib.iotools.read_tmy2`,
6233
:py:func:`pvlib.iotools.read_tmy3`, :py:meth:`pvlib.location.Location.from_tmy`, and
6334
:py:class:`pvlib.pvsystem.LocalizedPVSystem` for alternatives. (:issue:`965`)
6435
(:pull:`1008`)
36+
6537
* The following functions, methods, and arguments were deprecated in a previous
6638
release and have now been removed (:issue:`966`, :pull:`1033`):
39+
6740
* ``pvsystem.PVSystem.ashraeiam``. Use :py:meth:`pvlib.pvsystem.PVSystem.get_iam`.
6841
* ``pvsystem.PVSystem.physicaliam``. Use :py:meth:`pvlib.pvsystem.PVSystem.get_iam`.
6942
* ``pvsystem.PVSystem.sapm_aoi_loss``. Use :py:meth:`pvlib.pvsystem.PVSystem.get_iam`.
@@ -80,6 +53,41 @@ API Changes
8053
* ``temp_model`` keyword argument of
8154
:py:meth:`pvlib.modelchain.ModelChain`. Use ``temperature_model`` instead.
8255

56+
Deprecations
57+
~~~~~~~~~~~~
58+
* Moved functions related to inverters from ``pvsystem.py`` to ``inverter.py``.
59+
Functions are renamed to follow a more consistent pattern, as follows (:pull:`886`):
60+
61+
- ``pvlib.pvsystem.snlinverter`` is now :py:func:`pvlib.inverter.sandia`
62+
- ``pvlib.pvsystem.pvwatts_ac`` is now :py:func:`pvlib.inverter.pvwatts`
63+
- ``pvlib.pvsystem.adrinverter`` is now :py:func:`pvlib.inverter.adr`
64+
65+
* Argument ``ac_model`` for :py:class:`pvlib.modelchain.ModelChain` now accepts
66+
``'sandia'``, ``'pvwatts'`` and ``'adr'`` for the inverter models. (:pull:`886`)
67+
68+
* :py:class:`pvlib.pvsystem.PVSystem` ``module_type`` and ``racking_model`` now
69+
default to ``None``. This continues a deprecation of assuming SAPM values
70+
for cell temperature modeling. In this v0.8 release series, calling
71+
:py:meth:`pvlib.pvsystem.PVSystem.sapm_celltemp` without setting ``PVSystem.temperature_model_parameters``,
72+
or a valid combination of ``PVsystem.module_type`` and ``PVsystem.racking_model``, will cause
73+
``PVSystem.temperature_model_parameters`` to be set to SAPM values for a
74+
glass/glass module in open racking and emit a warning. In v0.9, users must
75+
provide ``temperature_model_parameters`` or a valid combination of
76+
``module_type`` and ``racking_model``. (:issue:`1030`, :pull:`1033`)
77+
78+
* Deprecated arbitrary keyword arguments for
79+
:py:class:`pvlib.location.Location`, :py:class:`pvlib.pvsystem.PVSystem`,
80+
:py:class:`pvlib.tracking.SingleAxisTracker`, and
81+
:py:class:`pvlib.modelchain.ModelChain`. Supplying arbitrary keyword
82+
to these objects will result in TypeErrors in v0.9. (:issue:`1029`, :pull:`1053`)
83+
84+
* ``pvlib.pvsystem.LocalizedPVSystem`` and ``pvlib.pvsystem.LocalizedSingleAxisTracker``
85+
are deprecated and will be removed in 0.9. Use
86+
:py:class:`pvlib.location.Location`, :py:class:`pvlib.pvsystem.PVSystem`,
87+
:py:class:`pvlib.tracking.SingleAxisTracker`, and
88+
:py:class:`pvlib.modelchain.ModelChain` instead.
89+
(:issue:`1029`, :pull:`1034`, :pull:`1053`)
90+
8391
Enhancements
8492
~~~~~~~~~~~~
8593
* Update :func:`~pvlib.bifacial.pvfactors_timeseries` to run with ``pvfactors`` v1.4.1 (:issue:`902`)(:pull:`934`)
@@ -99,9 +107,9 @@ Enhancements
99107
objects configured for the respective modeling paradigms. The
100108
configurations are defined in ``modelchain.PVWATTS_CONFIG``, and
101109
``modelchain.SAPM_CONFIG``. (:issue:`1013`, :pull:`1022`)
102-
* Added *racking_model*, *module_type*, and *temperature_model_parameters* to
103-
PVSystem, LocalizedPVSystem, SingleAxisTracker, and
104-
LocalizedSingleAxisTracker repr methods. (:issue:`1027`)
110+
* Added ``racking_model``, ``module_type``, and ``temperature_model_parameters`` to
111+
:py:class:`~pvlib.pvsystem.PVSystem` and :py:class:`~pvlib.tracking.SingleAxisTracker`
112+
repr methods. (:issue:`1027`)
105113
* Added :py:func:`~pvlib.tracking.calc_axis_tilt` to calculate the
106114
tracker axes tilt and :py:func:`~pvlib.tracking.calc_cross_axis_tilt` to
107115
calculate the cross-axis tilt, which is the angle, relative to horizontal, of
@@ -126,8 +134,10 @@ Bug fixes
126134
~~~~~~~~~
127135
* Fixed unit and default value errors in :py:func:`pvlib.soiling.hsu`. (:pull:`977`, :pull:`980`)
128136
* Handle NUL characters and fix version column dtype in
129-
:py:func:`~pvlib.iotools.crn.read_crn`. (:issue:`1025`)
137+
:py:func:`~pvlib.iotools.read_crn`. (:issue:`1025`)
130138
* Fix low sun angle tracker rotation calculation. (:issue:`824`)
139+
* Fix issue with big-endian and little-endian data in ``forecast.py``.
140+
(:issue:`921`)
131141

132142
Testing
133143
~~~~~~~
@@ -182,3 +192,8 @@ Contributors
182192
* Joshua S. Stein (:ghuser:`jsstein`)
183193
* Marc A. Anoma (:ghuser:`anomam`)
184194
* Will Holmgren (:ghuser:`wholmgren`)
195+
* Brock Taute (:ghuser:`btaute`)
196+
* Cameron Stark (:ghuser:`CameronTStark`)
197+
* :ghuser:`kahemker`
198+
* Miguel Sánchez de León Peque (:ghuser:`Peque`)
199+
* Stephen Lightfoote (:ghuser:`srlightfoote`)

pvlib/ivtools/utils.py

+8-11
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,17 @@ def rectify_iv_curve(voltage, current, decimals=None):
142142
voltage : numeric [V]
143143
current : numeric [A]
144144
145-
Raises
146-
------
147-
ValueError if voltage and current are different length
148-
149145
Notes
150146
-----
151-
``rectify_IV_curve`` ensures that the IV curve lies in the first quadrant
147+
``rectify_iv_curve`` ensures that the IV curve lies in the first quadrant
152148
of the (voltage, current) plane. The returned IV curve:
153-
* increases in voltage
154-
* contains no negative current or voltage values
155-
* contains no NaNs
156-
* contains no points with duplicate voltage values. Where voltage
157-
values are repeated, a single data point is substituted with current
158-
equal to the average of current at duplicated voltages.
149+
150+
* increases in voltage
151+
* contains no negative current or voltage values
152+
* contains no NaNs
153+
* contains no points with duplicate voltage values. Where voltage
154+
values are repeated, a single data point is substituted with current
155+
equal to the average of current at duplicated voltages.
159156
"""
160157

161158
df = pd.DataFrame(data=np.vstack((voltage, current)).T, columns=['v', 'i'])

pvlib/modelchain.py

+4
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ def dc_model(self, model):
611611
self._dc_model = partial(model, self)
612612

613613
def infer_dc_model(self):
614+
"""Infer DC power model from system attributes."""
614615
params = set(self.system.module_parameters.keys())
615616
if {'A0', 'A1', 'C7'} <= params:
616617
return self.sapm, 'sapm'
@@ -705,6 +706,7 @@ def ac_model(self, model):
705706
self._ac_model = partial(model, self)
706707

707708
def infer_ac_model(self):
709+
"""Infer AC power model from system attributes."""
708710
inverter_params = set(self.system.inverter_parameters.keys())
709711
if {'C0', 'C1', 'C2'} <= inverter_params:
710712
return self.snlinverter
@@ -816,6 +818,7 @@ def spectral_model(self, model):
816818
self._spectral_model = partial(model, self)
817819

818820
def infer_spectral_model(self):
821+
"""Infer spectral model from system attributes."""
819822
params = set(self.system.module_parameters.keys())
820823
if {'A4', 'A3', 'A2', 'A1', 'A0'} <= params:
821824
return self.sapm_spectral_loss
@@ -877,6 +880,7 @@ def temperature_model(self, model):
877880
self._temperature_model = partial(model, self)
878881

879882
def infer_temperature_model(self):
883+
"""Infer temperature model from system attributes."""
880884
params = set(self.system.temperature_model_parameters.keys())
881885
# remove or statement in v0.9
882886
if {'a', 'b', 'deltaT'} <= params or (

0 commit comments

Comments
 (0)