8000 DOC: fix napoleon, render sphinx docs right by mikofski · Pull Request #691 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

DOC: fix napoleon, render sphinx docs right #691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,15 @@ def __getattr__(cls, name):
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx',
'sphinx.ext.extlinks',
'numpydoc',
'sphinx.ext.napoleon',
'sphinx.ext.autosummary',
'numpydoc',
'IPython.sphinxext.ipython_directive',
'IPython.sphinxext.ipython_console_highlighting'
]

napoleon_use_rtype = False

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down
4 changes: 2 additions & 2 deletions pvlib/bifacial.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def pvfactors_timeseries(
Please refer to pvfactors online documentation for more details:
https://sunpower.github.io/pvfactors/

Inputs
------
Parameters
----------
solar_azimuth: numeric
Sun's azimuth angles using pvlib's azimuth convention (deg)
solar_zenith: numeric
Expand Down
8 changes: 5 additions & 3 deletions pvlib/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def get_solarposition(self, times, pressure=None, temperature=12,
:py:func:`atmosphere.alt2pres` and ``self.altitude``.
temperature : None, float, or array-like, default 12

kwargs passed to :py:func:`solarposition.get_solarposition`
kwargs
passed to :py:func:`solarposition.get_solarposition`

Returns
-------
Expand Down Expand Up @@ -178,8 +179,9 @@ def get_clearsky(self, times, model='ineichen', solar_position=None,
dni_extra: None or numeric, default None
If None, will be calculated from times.

kwargs passed to the relevant functions. Climatological values
are assumed in many cases. See source code for details!
kwargs
Extra parameters passed to the relevant functions. Climatological
values are assumed in many cases. See source code for details!

Returns
-------
Expand Down
18 changes: 8 additions & 10 deletions pvlib/modelchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,21 +798,19 @@ def prepare_inputs(self, times=None, weather=None):
Times at which to evaluate the model. Can be None if
attribute `times` is already set.
weather : None or DataFrame, default None
If None, the weather attribute is used. If the weather
attribute is also None assumes air temperature is 20 C, wind
If ``None``, the weather attribute is used. If the weather
attribute is also ``None`` assumes air temperature is 20 C, wind
speed is 0 m/s and irradiation calculated from clear sky
data. Column names must be 'wind_speed', 'temp_air', 'dni',
'ghi', 'dhi'. Do not pass incomplete irradiation data. Use
data. Column names must be `'wind_speed'`, `'temp_air'`, `'dni'`,
`'ghi'`, `'dhi'`. Do not pass incomplete irradiation data. Use
method
:py:meth:`~pvlib.modelchain.ModelChain.complete_irradiance`
instead.

Returns
-------
self

Assigns attributes: times, solar_position, airmass, total_irrad,
aoi
Notes
-----
Assigns attributes: `times`, `solar_position`, `airmass`, `total_irrad`,
`aoi`
"""
if weather is not None:
self.weather = weather
Expand Down
6 changes: 3 additions & 3 deletions pvlib/pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ def get_irradiance(self, solar_zenith, solar_azimuth, dni, ghi, dhi,
model : String, default 'haydavies'
Irradiance model.

**kwargs
Passed to :func:`irradiance.total_irrad`.
kwargs
Extra parameters passed to :func:`irradiance.total_irrad`.

Returns
-------
Expand Down Expand Up @@ -429,7 +429,7 @@ def sapm(self, effective_irradiance, temp_cell, **kwargs):
aoi : Series
Angle of incidence (degrees).

**kwargs
kwargs
See pvsystem.sapm for details

Returns
Expand Down
7 changes: 5 additions & 2 deletions pvlib/solarposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,8 @@ def solar_zenith_analytical(latitude, hourangle, declination):

Returns
-------
zenith : numeric Solar zenith angle in radians.
zenith : numeric
Solar zenith angle in radians.

References
----------
Expand All @@ -1299,7 +1300,9 @@ def solar_zenith_analytical(latitude, hourangle, declination):

See Also
--------
declination_spencer71 declination_cooper69 hour_angle
declination_spencer71
declination_cooper69
hour_angle
"""
return np.arccos(
np.cos(declination) * np.cos(latitude) * np.cos(hourangle) +
Expand Down
19 changes: 19 additions & 0 deletions pvlib/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ class SingleAxisTracker(PVSystem):
"""
Inherits the PV modeling methods from :py:class:`~pvlib.pvsystem.PVSystem`.


Parameters
----------
axis_tilt : float, default 0
The tilt of the axis of rotation (i.e, the y-axis defined by
axis_azimuth) with respect to horizontal, in decimal degrees.
Expand Down Expand Up @@ -40,6 +43,7 @@ class SingleAxisTracker(PVSystem):
2 meters wide, centered on the tracking axis, with 6 meters
between the tracking axes has a gcr of 2/6=0.333. If gcr is not
provided, a gcr of 2/7 is default. gcr must be <=1.

"""

def __init__(self, axis_tilt=0, axis_azimuth=0,
Expand Down Expand Up @@ -67,6 +71,21 @@ def __repr__(self):
return sat_repr + '\n' + pvsystem_repr

def singleaxis(self, apparent_zenith, apparent_azimuth):
"""
Get tracking data. See :py:func:`pvlib.tracking.singleaxis` more detail.

Parameters
----------
apparent_zenith : float, 1d array, or Series
Solar apparent zenith angles in decimal degrees.

apparent_azimuth : float, 1d array, or Series
Solar apparent azimuth angles in decimal degrees.

Returns
-------
traciking data
"""
tracking_data = singleaxis(apparent_zenith, apparent_azimuth,
self.axis_tilt, self.axis_azimuth,
self.max_angle,
Expand Down
0