Skip to content

Commit 9c364d8

Browse files
authored
fix handful of documentation warnings (#819)
* fix handful of documentation warnings * more fixes
1 parent 4a897d9 commit 9c364d8

File tree

8 files changed

+19
-20
lines changed

8 files changed

+19
-20
lines changed

docs/sphinx/source/introexamples.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ by examining the parameters defined for the module.
164164
orientation_strategy='south_at_latitude_tilt')
165165
# model results (ac, dc) and intermediates (aoi, temps, etc.)
166166
# assigned as mc object attributes
167-
mc.run_model(times=times, weather=weather)
167+
mc.run_model(weather)
168168
annual_energy = mc.ac.sum()
169169
energies[name] = annual_energy
170170

docs/sphinx/source/modelchain.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Next, we run a model with some simple weather data.
8181
columns=['ghi', 'dni', 'dhi', 'temp_air', 'wind_speed'],
8282
index=[pd.Timestamp('20170401 1200', tz='US/Arizona')])
8383
84-
mc.run_model(times=weather.index, weather=weather);
84+
mc.run_model(weather);
8585
8686
ModelChain stores the modeling results on a series of attributes. A few
8787
examples are shown below.
@@ -157,7 +157,7 @@ model, AC model, AOI loss model, and spectral loss model.
157157
158158
.. ipython:: python
159159
160-
mc.run_model(times=weather.index, weather=weather);
160+
mc.run_model(weather);
161161
mc.ac
162162
163163
Alternatively, we could have specified single diode or PVWatts related
@@ -180,7 +180,7 @@ information to determine which of those models to choose.
180180
181181
.. ipython:: python
182182
183-
mc.run_model(times=weather.index, weather=weather);
183+
mc.run_model(weather);
184184
mc.ac
185185
186186
User-supplied keyword arguments override ModelChain’s inspection
@@ -198,7 +198,7 @@ functions for a PVSystem that contains SAPM-specific parameters.
198198
199199
.. ipython:: python
200200
201-
mc.run_model(times=weather.index, weather=weather);
201+
mc.run_model(weather);
202202
mc.ac
203203
204204
Of course, these choices can also lead to failure when executing
@@ -461,5 +461,5 @@ The end result is that ModelChain.run_model works as expected!
461461

462462
.. ipython:: python
463463
464-
mc.run_model(times=weather.index, weather=weather);
464+
mc.run_model(weather);
465465
mc.dc

docs/sphinx/source/timetimezones.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ below? The solar position calculator will assume UTC time.
328328

329329
.. ipython:: python
330330
331-
index = pd.DatetimeIndex(start='1997-01-01 01:00', freq='1h', periods=24)
331+
index = pd.date_range(start='1997-01-01 01:00', freq='1h', periods=24)
332332
index
333333
334334
solar_position_notz = pvlib.solarposition.get_solarposition(index,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,24 +71,24 @@ API Changes with Deprecations
7171
- If `PVSystem.temperature_model_parameters` is not specified, `ModelChain`
7272
defaults to old behavior, using the SAPM temperature model with parameter
7373
set `open_rack_glass_glass`. This behavior is deprecated, and will be
74-
removed in v0.8. In v0.8 `PVSystem.temperature_model_parameters` will
75-
be required for `ModelChain`.
74+
removed in v0.8. In v0.8 `PVSystem.temperature_model_parameters` will
75+
be required for `ModelChain`.
7676
- Implemented `pvsyst` as an option for `ModelChain.temperature_model`.
7777
- `modelchain.basic_chain` has a new required argument
7878
`temperature_model_parameters`.
7979

8080
* Changes related to IAM (AOI loss) functions (:issue:`680`):
8181
* Changes to functions
8282
- Moved functions from `pvsystem.py` to `iam.py`. `pvsystem` IAM
83-
functions are deprecated and will be removed in v0.8.
83+
functions are deprecated and will be removed in v0.8.
8484
- Functions are renamed to a consistent pattern:
8585
- `pvsystem.physicaliam` is `iam.physical`
8686
- `pvsystem.ashraeiam` is `iam.ashrae`
8787
- `pvsystem.sapm_aoi_loss` is `iam.sapm`
8888
* Changes to `PVSystem` class
8989
- IAM models are provided by `PVSystem.get_iam` with kwarg `iam_model`.
9090
- Methods `PVSystem.ashraeiam`, `PVSystem.physicaliam` and
91-
`PVSystem.sapm_aoi_loss` are deprecated and will be removed in v0.8.
91+
`PVSystem.sapm_aoi_loss` are deprecated and will be removed in v0.8.
9292

9393
* Changes related to spectral modifier (:issue:`782`):
9494
* Changes to functions

pvlib/bifacial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ 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.
21+
the open-source "pvfactors" package [1]_.
2222
Please refer to pvfactors online documentation for more details:
2323
https://sunpower.github.io/pvfactors/
2424

pvlib/iam.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,12 @@ def interp(aoi, theta_ref, iam_ref, method='linear', normalize=True):
398398
399399
method : str, default 'linear'
400400
Specifies the interpolation method.
401-
Useful options are: 'linear', 'quadratic','cubic'.
401+
Useful options are: 'linear', 'quadratic', 'cubic'.
402402
See scipy.interpolate.interp1d for more options.
403403
404404
normalize : boolean, default True
405405
When true, the interpolated values are divided by the interpolated
406-
value at zero degrees. This ensures that ``iam``=1.0 at normal
406+
value at zero degrees. This ensures that ``iam=1.0`` at normal
407407
incidence.
408408
409409
Returns

pvlib/iotools/midc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,7 @@ def read_midc(filename, variable_map={}, raw_data=False, **kwargs):
184184
passing the dictionary below will rename the column to 'ghi' in
185185
the returned Dataframe.
186186
187-
{
188-
'Global Horizontal [W/m^2]': ghi,
189-
}
187+
{'Global Horizontal [W/m^2]': 'ghi'}
190188
191189
See the MIDC_VARIABLE_MAP for collection of mappings by site.
192190
For a full list of pvlib variable names see the `Variable Style Rules

pvlib/irradiance.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ def clearness_index(ghi, solar_zenith, extra_radiation, min_cos_zenith=0.065,
11761176
Calculate the clearness index.
11771177
11781178
The clearness index is the ratio of global to extraterrestrial
1179-
irradiance on a horizontal plane.
1179+
irradiance on a horizontal plane [1]_.
11801180
11811181
Parameters
11821182
----------
@@ -1226,7 +1226,7 @@ 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.
1229+
Calculate the zenith angle independent clearness index [1]_.
12301230
12311231
Parameters
12321232
----------
@@ -1764,7 +1764,8 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times,
17641764
model='perez', model_perez='allsitescomposite1990',
17651765
calculate_gt_90=True, max_iterations=30):
17661766
"""
1767-
Determine GHI, DNI, DHI from POA global using the GTI DIRINT model.
1767+
Determine GHI, DNI, DHI from POA global using the GTI DIRINT model
1768+
[1]_.
17681769
17691770
.. warning::
17701771

0 commit comments

Comments
 (0)