Skip to content

Commit fb8a1b2

Browse files
committed
default None -> optional (pvlib#1574)
(?<spaces> {8}| {4})(?<name>\w*) : (?<types>.*), default None$ $1$2 : $3, optional (?<spaces> {8}| {4})(?<name>\w*) : None or (?<type>.*), optional$ $1$2 : $3, optional (?<spaces> {8}| {4})(?<name>\w*) : (?<type>.*) or [nN]one, optional$ $1$2 : $3, optional Over files: pvlib/**/*.py
1 parent 85a7c63 commit fb8a1b2

17 files changed

+211
-301
lines changed

pvlib/clearsky.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def lookup_linke_turbidity(time, latitude, longitude, filepath=None,
159159
160160
longitude : float or int
161161
162-
filepath : None or string, default None
162+
filepath : string, optional
163163
The path to the ``.h5`` file.
164164
165165
interp_turbidity : bool, default True
@@ -703,7 +703,7 @@ def detect_clearsky(measured, clearsky, times=None, infer_limits=False,
703703
Time series of measured GHI. [W/m2]
704704
clearsky : array or Series
705705
Time series of the expected clearsky GHI. [W/m2]
706-
times : DatetimeIndex or None, default None
706+
times : DatetimeIndex, optional
707707
Times of measured and clearsky values. If None the index of measured
708708
will be used.
709709
infer_limits : bool, default False

pvlib/iam.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def sapm(aoi, module, upper=None):
514514
A dict or Series with the SAPM IAM model parameters.
515515
See the :py:func:`sapm` notes section for more details.
516516
517-
upper : None or float, default None
517+
upper : float, optional
518518
Upper limit on the results.
519519
520520
Returns

pvlib/iotools/epw.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def read_epw(filename, coerce_year=None):
2525
filename : String
2626
Can be a relative file path, absolute file path, or url.
2727
28-
coerce_year : None or int, default None
28+
coerce_year : int, optional
2929
If supplied, the year of the data will be set to this value. This can
3030
be a useful feature because EPW data is composed of data from
3131
different years.
@@ -247,7 +247,7 @@ def parse_epw(csvdata, coerce_year=None):
247247
csvdata : file-like buffer
248248
a file-like buffer containing data in the EPW format
249249
250-
coerce_year : None or int, default None
250+
coerce_year : int, optional
251251
If supplied, the year of the data will be set to this value. This can
252252
be a useful feature because EPW data is composed of data from
253253
different years.

pvlib/iotools/pvgis.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ def get_pvgis_hourly(latitude, longitude, start=None, end=None,
6363
In decimal degrees, between -90 and 90, north is positive (ISO 19115)
6464
longitude : float
6565
In decimal degrees, between -180 and 180, east is positive (ISO 19115)
66-
start : int or datetime like, default None
66+
start : int or datetime like, optional
6767
First year of the radiation time series. Defaults to first year
6868
available.
69-
end : int or datetime like, default None
69+
end : int or datetime like, optional
7070
Last year of the radiation time series. Defaults to last year
7171
available.
72-
raddatabase : str, default None
72+
raddatabase : str, optional
7373
Name of radiation database. Options depend on location, see [3]_.
7474
components : bool, default True
7575
Output solar radiation components (beam, diffuse, and reflected).
@@ -87,14 +87,14 @@ def get_pvgis_hourly(latitude, longitude, start=None, end=None,
8787
PVGIS website and pvlib<=0.9.5 is offset by 180 degrees.
8888
usehorizon : bool, default True
8989
Include effects of horizon
90-
userhorizon : list of float, default None
90+
userhorizon : list of float, optional
9191
Optional user specified elevation of horizon in degrees, at equally
9292
spaced azimuth clockwise from north, only valid if ``usehorizon`` is
9393
true, if ``usehorizon`` is true but ``userhorizon`` is ``None`` then
9494
PVGIS will calculate the horizon [4]_
9595
pvcalculation : bool, default False
9696
Return estimate of hourly PV production.
97-
peakpower : float, default None
97+
peakpower : float, optional
9898
Nominal power of PV system in kW. Required if pvcalculation=True.
9999
pvtechchoice : {'crystSi', 'CIS', 'CdTe', 'Unknown'}, default 'crystSi'
100100
PV technology.
@@ -309,7 +309,7 @@ def read_pvgis_hourly(filename, pvgis_format=None, map_variables=True):
309309
----------
310310
filename : str, pathlib.Path, or file-like buffer
311311
Name, path, or buffer of hourly data file downloaded from PVGIS.
312-
pvgis_format : str, default None
312+
pvgis_format : str, optional
313313
Format of PVGIS file or buffer. Equivalent to the ``outputformat``
314314
parameter in the PVGIS API. If ``filename`` is a file and
315315
``pvgis_format`` is ``None`` then the file extension will be used to
@@ -409,14 +409,14 @@ def get_pvgis_tmy(latitude, longitude, outputformat='json', usehorizon=True,
409409
documentation [2]_ for more info.
410410
usehorizon : bool, default True
411411
include effects of horizon
412-
userhorizon : list of float, default None
412+
userhorizon : list of float, optional
413413
optional user specified elevation of horizon in degrees, at equally
414414
spaced azimuth clockwise from north, only valid if ``usehorizon`` is
415415
true, if ``usehorizon`` is true but ``userhorizon`` is ``None`` then
416416
PVGIS will calculate the horizon [3]_
417-
startyear : int, default None
417+
startyear : int, optional
418418
first year to calculate TMY
419-
endyear : int, default None
419+
endyear : int, optional
420420
last year to calculate TMY, must be at least 10 years from first year
421421
url : str, default :const:`pvlib.iotools.pvgis.URL`
422422
base url of PVGIS API, append ``tmy`` to get TMY endpoint
@@ -573,7 +573,7 @@ def read_pvgis_tmy(filename, pvgis_format=None, map_variables=True):
573573
----------
574574
filename : str, pathlib.Path, or file-like buffer
575575
Name, path, or buffer of file downloaded from PVGIS.
576-
pvgis_format : str, default None
576+
pvgis_format : str, optional
577577
Format of PVGIS file or buffer. Equivalent to the ``outputformat``
578578
parameter in the PVGIS TMY API. If ``filename`` is a file and
579579
``pvgis_format`` is ``None`` then the file extension will be used to

pvlib/iotools/sodapro.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
8787
integrated : boolean, default False
8888
Whether to return radiation parameters as integrated values (Wh/m^2)
8989
or as average irradiance values (W/m^2) (pvlib preferred units)
90-
label : {'right', 'left'}, default None
90+
label : {'right', 'left'}, optional
9191
Which bin edge label to label time-step with. The default is 'left' for
9292
all time steps except for '1M' which has a default of 'right'.
9393
map_variables : bool, default True
@@ -240,7 +240,7 @@ def parse_cams(fbuf, integrated=False, label=None, map_variables=True):
240240
integrated : boolean, default False
241241
Whether to return radiation parameters as integrated values (Wh/m^2)
242242
or as average irradiance values (W/m^2) (pvlib preferred units)
243-
label : {'right', 'left'}, default None
243+
label : {'right', 'left'}, optional
244244
Which bin edge label to label time-step with. The default is 'left' for
245245
all time steps except for '1M' which has a default of 'right'.
246246
map_variables : bool, default True
@@ -341,7 +341,7 @@ def read_cams(filename, integrated=False, label=None, map_variables=True):
341341
integrated : boolean, default False
342342
Whether to return radiation parameters as integrated values (Wh/m^2)
343343
or as average irradiance values (W/m^2) (pvlib preferred units)
344-
label : {'right', 'left}, default None
344+
label : {'right', 'left}, optional
345345
Which bin edge label to label time-step with. The default is 'left' for
346346
all time steps except for '1M' which has a default of 'right'.
347347
map_variables : bool, default True

pvlib/iotools/tmy.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ def read_tmy3(filename, coerce_year=None, map_variables=None, recolumn=None,
4040
----------
4141
filename : str
4242
A relative file path or absolute file path.
43-
coerce_year : None or int, default None
43+
coerce_year : int, optional
4444
If supplied, the year of the index will be set to `coerce_year`, except
4545
for the last index value which will be set to the *next* year so that
4646
the index increases monotonically.
47-
map_variables : bool, default None
47+
map_variables : bool, optional
4848
When True, renames columns of the DataFrame to pvlib variable names
4949
where applicable. See variable :const:`VARIABLE_MAP`.
5050
recolumn : bool (deprecated, use map_variables instead)

0 commit comments

Comments
 (0)