8000 improve localized classes documentation (#534) · aliyevsultan/pvlib-python@36aec41 · GitHub
[go: up one dir, main page]

Skip to content

Commit 36aec41

Browse files
authored
improve localized classes documentation (pvlib#534)
1 parent 10339ee commit 36aec41

File tree

4 files changed

+45
-13
lines changed

4 files changed

+45
-13
lines changed

docs/sphinx/source/package_overview.rst

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,15 @@ object describes the modeling chain used to calculate PV output at that
163163
Location. This can be a useful paradigm if you prefer to think about the
164164
PV system and its location as separate concepts or if you develop your
165165
own ModelChain subclasses. It can also be helpful if you make extensive
166-
use of Location-specific methods for other calculations.
166+
use of Location-specific methods for other calculations. pvlib-python
167+
also includes a :py:class:`~pvlib.tracking.SingleAxisTracker` class that
168+
is a subclass of :py:class:`~pvlib.pvsystem.PVSystem`.
167169

168170
The following code demonstrates how to use
169171
:py:class:`~pvlib.location.Location`,
170172
:py:class:`~pvlib.pvsystem.PVSystem`, and
171-
:py:class:`~pvlib.modelchain.ModelChain`
172-
objects to accomplish our system modeling goal:
173+
:py:class:`~pvlib.modelchain.ModelChain` objects to accomplish our
174+
system modeling goal:
173175

174176
.. ipython:: python
175177
@@ -209,13 +211,30 @@ Object oriented (LocalizedPVSystem)
209211
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
210212

211213
The second object oriented paradigm uses a model where a
212-
:py:class:`~pvlib.pvsystem.LocalizedPVSystem` represents a
213-
PV system at a particular place on the planet. This can be a useful
214-
paradigm if you're thinking about a power plant that already exists.
214+
:py:class:`~pvlib.pvsystem.LocalizedPVSystem` represents a PV system at
215+
a particular place on the planet. This can be a useful paradigm if
216+
you're thinking about a power plant that already exists.
217+
218+
The :py:class:`~pvlib.pvsystem.LocalizedPVSystem` inherits from both
219+
:py:class:`~pvlib.pvsystem.PVSystem` and
220+
:py:class:`~pvlib.location.Location`, while the
221+
:py:class:`~pvlib.tracking.LocalizedSingleAxisTracker` inherits from
222+
:py:class:`~pvlib.tracking.SingleAxisTracker` (itself a subclass of
223+
:py:class:`~pvlib.pvsystem.PVSystem`) and
224+
:py:class:`~pvlib.location.Location`. The
225+
:py:class:`~pvlib.pvsystem.LocalizedPVSystem` and
226+
:py:class:`~pvlib.tracking.LocalizedSingleAxisTracker` classes may
227+
contain bugs due to the relative difficulty of implementing multiple
228+
inheritance. The :py:class:`~pvlib.pvsystem.LocalizedPVSystem` and
229+
:py:class:`~pvlib.tracking.LocalizedSingleAxisTracker` may be deprecated
230+
in a future release. We recommend that most modeling workflows implement
231+
:py:class:`~pvlib.location.Location`,
232+
:py:class:`~pvlib.pvsystem.PVSystem`, and
233+
:py:class:`~pvlib.modelchain.ModelChain`.
215234

216235
The following code demonstrates how to use a
217-
:py:class:`~pvlib.pvsystem.LocalizedPVSystem`
218-
object to accomplish our modeling goal:
236+
:py:class:`~pvlib.pvsystem.LocalizedPVSystem` object to accomplish our
237+
modeling goal:
219238

220239
.. ipython:: python
221240

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ Documentation
120120
* Expanded general contributing and pull request guidelines.
121121
* Added section on single diode equation with some detail on solutions used in
122122
pvlib-python (:issue:`518`)
123-
123+
* Improve LocalizedPVSystem and LocalizedSingleAxisTracker documentation.
124+
(:issue:`532`)
124125

125126
Testing
126127
~~~~~~~

pvlib/pvsystem.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,10 @@ class LocalizedPVSystem(PVSystem, Location):
690690
system attributes and modeling functions. This class combines the
691691
attributes and methods of the PVSystem and Location classes.
692692
693-
See the :py:class:`PVSystem` class for an object model that
694-
describes an unlocalized PV system.
693+
The LocalizedPVSystem may have bugs due to the difficulty of
694+
robustly implementing multiple inheritance. See
695+
:py:class:`~pvlib.modelchain.ModelChain` for an alternative paradigm
696+
for modeling PV systems at specific locations.
695697
"""
696698
def __init__(self, pvsystem=None, location=None, **kwargs):
697699

pvlib/tracking.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def get_irradiance(self, surface_tilt, surface_azimuth,
141141
142142
For a given set of solar zenith and azimuth angles, the
143143
surface tilt and azimuth parameters are typically determined
144-
by :py:method:`~SingleAxisTracker.singleaxis`.
144+
by :py:meth:`~SingleAxisTracker.singleaxis`.
145145
146146
Parameters
147147
----------
@@ -195,7 +195,17 @@ def get_irradiance(self, surface_tilt, surface_azimuth,
195195

196196

197197
class LocalizedSingleAxisTracker(SingleAxisTracker, Location):
198-
"""Highly experimental."""
198+
"""
199+
The LocalizedSingleAxisTracker class defines a standard set of
200+
installed PV system attributes and modeling functions. This class
201+
combines the attributes and methods of the SingleAxisTracker (a
202+
subclass of PVSystem) and Location classes.
203+
204+
The LocalizedSingleAxisTracker may have bugs due to the difficulty
205+
of robustly implementing multiple inheritance. See
206+
:py:class:`~pvlib.modelchain.ModelChain` for an alternative paradigm
207+
for modeling PV systems at specific locations.
208+
"""
199209

200210
def __init__(self, pvsystem=None, location=None, **kwargs):
201211

0 commit comments

Comments
 (0)
0