Skip to content

Commit 79038f2

Browse files
authored
Fix most sphinx warnings (#912)
* fix underline in examples/plot_singlediode.py * move references out of the first sentence * pin docutils at 0.15.2 in doc requirements
1 parent c9929e8 commit 79038f2

18 files changed

+70
-42
lines changed

docs/examples/plot_singlediode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
Calculating a module's IV curves
3-
=====================
3+
================================
44
55
Examples of modeling IV curves using a single-diode circuit equivalent model.
66
"""

pvlib/bifacial.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ def pvfactors_timeseries(
1818
"""
1919
Calculate front and back surface plane-of-array irradiance on
2020
a fixed tilt or single-axis tracker PV array configuration, and using
21-
the open-source "pvfactors" package [1]_.
21+
the open-source "pvfactors" package. pvfactors implements the model
22+
described in [1]_.
2223
Please refer to pvfactors online documentation for more details:
2324
https://sunpower.github.io/pvfactors/
2425

pvlib/clearsky.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def simplified_solis(apparent_elevation, aod700=0.1, precipitable_water=1.,
405405
pressure=101325., dni_extra=1364.):
406406
"""
407407
Calculate the clear sky GHI, DNI, and DHI according to the
408-
simplified Solis model [1]_.
408+
simplified Solis model.
409409
410410
Reference [1]_ describes the accuracy of the model as being 15, 20,
411411
and 18 W/m^2 for the beam, global, and diffuse components. Reference
@@ -604,7 +604,7 @@ def detect_clearsky(measured, clearsky, times, window_length,
604604
return_components=False):
605605
"""
606606
Detects clear sky times according to the algorithm developed by Reno
607-
and Hansen for GHI measurements [1]. The algorithm was designed and
607+
and Hansen for GHI measurements. The algorithm [1]_ was designed and
608608
validated for analyzing GHI time series only. Users may attempt to
609609
apply it to other types of time series data using different filter
610610
settings, but should be skeptical of the results.

pvlib/iotools/crn.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242

4343
def read_crn(filename):
4444
"""
45-
Read NOAA USCRN [1]_ [2]_ fixed-width file into pandas dataframe.
45+
Read a NOAA USCRN fixed-width file into pandas dataframe. The CRN is
46+
described in [1]_ and [2]_.
4647
4748
Parameters
4849
----------

pvlib/iotools/midc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def format_index_raw(data):
154154

155155
def read_midc(filename, variable_map={}, raw_data=False, **kwargs):
156156
"""Read in National Renewable Energy Laboratory Measurement and
157-
Instrumentation Data Center [1]_ weather data.
157+
Instrumentation Data Center weather data. The MIDC is described in [1]_.
158158
159159
Parameters
160160
----------

pvlib/iotools/psm3.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def get_psm3(latitude, longitude, api_key, email, names='tmy', interval=60,
2424
leap_day=False, full_name=PVLIB_PYTHON, affiliation=PVLIB_PYTHON,
2525
timeout=30):
2626
"""
27-
Retrieve NSRDB [1]_ PSM3 timeseries weather data from the PSM3 API [2]_
28-
[3]_.
27+
Retrieve NSRDB PSM3 timeseries weather data from the PSM3 API. The NSRDB
28+
is described in [1]_ and the PSM3 API is described in [2]_ and [3]_.
2929
3030
Parameters
3131
----------
@@ -147,7 +147,8 @@ def get_psm3(latitude, longitude, api_key, email, names='tmy', interval=60,
147147

148148
def parse_psm3(fbuf):
149149
"""
150-
Parse an NSRDB [1]_ PSM3 weather file (formatted as SAM CSV [2]_).
150+
Parse an NSRDB PSM3 weather file (formatted as SAM CSV). The NSRDB
151+
is described in [1]_ and the SAM CSV format is described in [2]_.
151152
152153
Parameters
153154
----------
@@ -269,7 +270,8 @@ def parse_psm3(fbuf):
269270

270271
def read_psm3(filename):
271272
"""
272-
Read an NSRDB [1]_ PSM3 weather file (formatted as SAM CSV [2]_).
273+
Read an NSRDB PSM3 weather file (formatted as SAM CSV). The NSRDB
274+
is described in [1]_ and the SAM CSV format is described in [2]_.
273275
274276
Parameters
275277
----------

pvlib/iotools/pvgis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_pvgis_tmy(lat, lon, outputformat='json', usehorizon=True,
2828
userhorizon=None, startyear=None, endyear=None, url=URL,
2929
timeout=30):
3030
"""
31-
Get TMY data from PVGIS [1]_. For more information see the PVGIS TMY tool
31+
Get TMY data from PVGIS. For more information see the PVGIS [1]_ TMY tool
3232
documentation [2]_.
3333
3434
Parameters

pvlib/iotools/solrad.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949

5050
def read_solrad(filename):
5151
"""
52-
Read NOAA SOLRAD [1]_ [2]_ fixed-width file into pandas dataframe.
52+
Read NOAA SOLRAD fixed-width file into pandas dataframe. The SOLRAD
53+
network is described in [1]_ and [2]_.
5354
5455
Parameters
5556
----------

pvlib/iotools/srml.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626

2727
def read_srml(filename):
2828
"""
29-
Read University of Oregon SRML[1]_ 1min .tsv file into pandas dataframe.
29+
Read University of Oregon SRML 1min .tsv file into pandas dataframe. The
30+
SRML is described in [1]_.
3031
3132
Parameters
3233
----------
@@ -166,8 +167,8 @@ def format_index(df):
166167

167168

168169
def read_srml_month_from_solardat(station, year, month, filetype='PO'):
169-
"""Request a month of SRML[1] data from solardat and read it into
170-
a Dataframe.
170+
"""Request a month of SRML data from solardat and read it into
171+
a Dataframe. The SRML is described in [1]_.
171172
172173
Parameters
173174
----------

pvlib/iotools/surfrad.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838

3939

4040
def read_surfrad(filename, map_variables=True):
41-
"""Read in a daily NOAA SURFRAD[1]_ file.
41+
"""Read in a daily NOAA SURFRAD file. The SURFRAD network is
42+
described in [1]_.
4243
4344
Parameters
4445
----------

pvlib/irradiance.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,9 @@ def clearness_index(ghi, solar_zenith, extra_radiation, min_cos_zenith=0.065,
12261226
def clearness_index_zenith_independent(clearness_index, airmass,
12271227
max_clearness_index=2.0):
12281228
"""
1229-
Calculate the zenith angle independent clearness index [1]_.
1229+
Calculate the zenith angle independent clearness index.
1230+
1231+
See [1]_ for details.
12301232
12311233
Parameters
12321234
----------
@@ -1764,8 +1766,9 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times,
17641766
model='perez', model_perez='allsitescomposite1990',
17651767
calculate_gt_90=True, max_iterations=30):
17661768
"""
1767-
Determine GHI, DNI, DHI from POA global using the GTI DIRINT model
1768-
[1]_.
1769+
Determine GHI, DNI, DHI from POA global using the GTI DIRINT model.
1770+
1771+
The GTI DIRINT model is described in [1]_.
17691772
17701773
.. warning::
17711774

pvlib/ivtools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ def fit_sdm_desoto(v_mp, i_mp, v_oc, i_sc, alpha_sc, beta_voc,
264264
cells_in_series, EgRef=1.121, dEgdT=-0.0002677,
265265
temp_ref=25, irrad_ref=1000, root_kwargs={}):
266266
"""
267-
Calculates the parameters for the De Soto single diode model using the
268-
procedure described in [1]_. This procedure has the advantage of
267+
Calculates the parameters for the De Soto single diode model.
268+
This procedure (described in [1]_) has the advantage of
269269
using common specifications given by manufacturers in the
270270
datasheets of PV modules.
271271

pvlib/pvsystem.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ def calcparams_cec(effective_irradiance, temp_cell,
12051205
'''
12061206
Calculates five parameter values for the single diode equation at
12071207
effective irradiance and cell temperature using the CEC
1208-
model described in [1]_. The CEC model differs from the De soto et al.
1208+
model. The CEC model [1]_ differs from the De soto et al.
12091209
model [3]_ by the parameter Adjust. The five values returned by
12101210
calcparams_cec can be used by singlediode to calculate an IV curve.
12111211
@@ -1325,8 +1325,9 @@ def calcparams_pvsyst(effective_irradiance, temp_cell,
13251325
'''
13261326
Calculates five parameter values for the single diode equation at
13271327
effective irradiance and cell temperature using the PVsyst v6
1328-
model described in [1]_, [2]_, [3]_. The five values returned by
1329-
calcparams_pvsyst can be used by singlediode to calculate an IV curve.
1328+
model. The PVsyst v6 model is described in [1]_, [2]_, [3]_.
1329+
The five values returned by calcparams_pvsyst can be used by singlediode
1330+
to calculate an IV curve.
13301331
13311332
Parameters
13321333
----------
@@ -2662,7 +2663,7 @@ def scale_voltage_current_power(data, voltage=1, current=1):
26622663

26632664
def pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.):
26642665
r"""
2665-
Implements NREL's PVWatts DC power model [1]_:
2666+
Implements NREL's PVWatts DC power model. The PVWatts DC model [1]_ is:
26662667
26672668
.. math::
26682669
@@ -2713,7 +2714,8 @@ def pvwatts_losses(soiling=2, shading=3, snow=0, mismatch=2, wiring=2,
27132714
connections=0.5, lid=1.5, nameplate_rating=1, age=0,
27142715
availability=3):
27152716
r"""
2716-
Implements NREL's PVWatts system loss model [1]_:
2717+
Implements NREL's PVWatts system loss model.
2718+
The PVWatts loss model [1]_ is:
27172719
27182720
.. math::
27192721
@@ -2764,7 +2766,8 @@ def pvwatts_losses(soiling=2, shading=3, snow=0, mismatch=2, wiring=2,
27642766

27652767
def pvwatts_ac(pdc, pdc0, eta_inv_nom=0.96, eta_inv_ref=0.9637):
27662768
r"""
2767-
Implements NREL's PVWatts inverter model [1]_.
2769+
Implements NREL's PVWatts inverter model.
2770+
The PVWatts inverter model [1]_ is:
27682771
27692772
.. math::
27702773

pvlib/singlediode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
7272
NsVbi=np.Inf, gradients=False):
7373
"""
7474
Explicit calculation of points on the IV curve described by the single
75-
diode equation [1]_.
75+
diode equation. Values are calculated as described in [1]_.
7676
7777
.. warning::
7878
* Do not use ``d2mutau`` with CEC coefficients.

pvlib/solarposition.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ def spa_python(time, latitude, longitude,
277277
atmos_refract=None, how='numpy', numthreads=4, **kwargs):
278278
"""
279279
Calculate the solar position using a python implementation of the
280-
NREL SPA algorithm described in [1].
280+
NREL SPA algorithm.
281+
282+
The details of the NREL SPA algorithm are described in [1]_.
281283
282284
If numba is installed, the functions can be compiled to
283285
machine code and the function can be multithreaded.
@@ -385,7 +387,9 @@ def sun_rise_set_transit_spa(times, latitude, longitude, how='numpy',
385387
delta_t=67.0, numthreads=4):
386388
"""
387389
Calculate the sunrise, sunset, and sun transit times using the
388-
NREL SPA algorithm described in [1].
390+
NREL SPA algorithm.
391+
392+
The details of the NREL SPA algorithm are described in [1]_.
389393
390394
If numba is installed, the functions can be compiled to
391395
machine code and the function can be multithreaded.
@@ -958,7 +962,9 @@ def pyephem_earthsun_distance(time):
958962
def nrel_earthsun_distance(time, how='numpy', delta_t=67.0, numthreads=4):
959963
"""
960964
Calculates the distance from the earth to the sun using the
961-
NREL SPA algorithm described in [1]_.
965+
NREL SPA algorithm.
966+
967+
The details of the NREL SPA algorithm are described in [1]_.
962968
963969
Parameters
964970
----------
@@ -1131,9 +1137,11 @@ def equation_of_time_pvcdrom(dayofyear):
11311137

11321138
def declination_spencer71(dayofyear):
11331139
"""
1134-
Solar declination from Duffie & Beckman [1] and attributed to
1140+
Solar declination from Duffie & Beckman and attributed to
11351141
Spencer (1971) and Iqbal (1983).
11361142
1143+
See [1]_ for details.
1144+
11371145
.. warning::
11381146
Return units are radians, not degrees.
11391147
@@ -1173,7 +1181,9 @@ def declination_spencer71(dayofyear):
11731181

11741182
def declination_cooper69(dayofyear):
11751183
"""
1176-
Solar declination from Duffie & Beckman [1] and attributed to Cooper (1969)
1184+
Solar declination from Duffie & Beckman and attributed to Cooper (1969).
1185+
1186+
See [1]_ for details.
11771187
11781188
.. warning::
11791189
Return units are radians, not degrees.

pvlib/temperature.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ def _temperature_model_params(model, parameter_set):
3333
def sapm_cell(poa_global, temp_air, wind_speed, a, b, deltaT,
3434
irrad_ref=1000):
3535
r'''
36-
Calculate cell temperature per the Sandia PV Array Performance Model [1]_.
36+
Calculate cell temperature per the Sandia PV Array Performance Model.
37+
38+
See [1]_ for details on the Sandia Array Performance Model.
3739
3840
Parameters
3941
----------
@@ -120,7 +122,9 @@ def sapm_cell(poa_global, temp_air, wind_speed, a, b, deltaT,
120122
def sapm_module(poa_global, temp_air, wind_speed, a, b):
121123
r'''
122124
Calculate module back surface temperature per the Sandia PV Array
123-
Performance Model [1]_.
125+
Performance Model.
126+
127+
See [1]_ for details on the Sandia Array Performance Model.
124128
125129
Parameters
126130
----------
@@ -273,9 +277,9 @@ def pvsyst_cell(poa_global, temp_air, wind_speed=1.0, u_c=29.0, u_v=0.0,
273277

274278
def faiman(poa_global, temp_air, wind_speed=1.0, u0=25.0, u1=6.84):
275279
'''
276-
Calculate cell or module temperature using an empirical heat loss factor
277-
model as proposed by Faiman [1]_ and adopted in the IEC 61853
278-
standards [2]_ and [3]_.
280+
Calculate cell or module temperature using the Faiman model. The Faiman
281+
model uses an empirical heat loss factor model [1]_ and is adopted in the
282+
IEC 61853 standards [2]_ and [3]_.
279283
280284
Usage of this model in the IEC 61853 standard does not distinguish
281285
between cell and module temperature.

pvlib/tracking.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,10 @@ def singleaxis(apparent_zenith, apparent_azimuth,
249249
axis_tilt=0, axis_azimuth=0, max_angle=90,
250250
backtrack=True, gcr=2.0/7.0):
251251
"""
252-
Determine the rotation angle of a single axis tracker using the
253-
equations in [1]_ when given a particular sun zenith and azimuth
254-
angle. backtracking may be specified, and if so, a ground coverage
252+
Determine the rotation angle of a single axis tracker when given a
253+
particular sun zenith and azimuth angle. See [1]_ for details about
254+
the equations.
255+
Backtracking may be specified, and if so, a ground coverage
255256
ratio is required.
256257
257258
Rotation angle is determined in a panel-oriented coordinate system.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
'optional': ['ephem', 'cython', 'netcdf4', 'nrel-pysam', 'numba',
4848
'pvfactors', 'scipy', 'siphon', 'tables'],
4949
'doc': ['ipython', 'matplotlib', 'sphinx == 1.8.5', 'sphinx_rtd_theme',
50-
'sphinx-gallery'],
50+
'sphinx-gallery', 'docutils == 0.15.2'],
5151
'test': TESTS_REQUIRE
5252
}
5353
EXTRAS_REQUIRE['all'] = sorted(set(sum(EXTRAS_REQUIRE.values(), [])))

0 commit comments

Comments
 (0)