Skip to content

Commit 85a7c63

Browse files
committed
Remove colon after default
1 parent e3304ad commit 85a7c63

File tree

5 files changed

+87
-185
lines changed

5 files changed

+87
-185
lines changed

pvlib/iotools/bsrn.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def get_bsrn(station, start, end, username, password,
8484
username for accessing the BSRN FTP server
8585
password: str
8686
password for accessing the BSRN FTP server
87-
logical_records: list or tuple, default: ('0100',)
87+
logical_records : list or tuple, default ('0100',)
8888
List of the logical records (LR) to parse. Options include: '0100',
8989
'0300', and '0500'.
9090
save_path: str or path-like, optional
@@ -225,7 +225,7 @@ def parse_bsrn(fbuf, logical_records=('0100',)):
225225
----------
226226
fbuf: file-like buffer
227227
Buffer of a BSRN station-to-archive data file
228-
logical_records: list or tuple, default: ('0100',)
228+
logical_records : list or tuple, default ('0100',)
229229
List of the logical records (LR) to parse. Options include: '0100',
230230
'0300', and '0500'.
231231
@@ -383,7 +383,7 @@ def read_bsrn(filename, logical_records=('0100',)):
383383
----------
384384
filename: str or path-like
385385
Name or path of a BSRN station-to-archive data file
386-
logical_records: list or tuple, default: ('0100',)
386+
logical_records : list or tuple, default ('0100',)
387387
List of the logical records (LR) to parse. Options include: '0100',
388388
'0300', and '0500'.
389389

pvlib/iotools/crn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def read_crn(filename, map_variables=True):
6868
----------
6969
filename: str, path object, or file-like
7070
filepath or url to read for the fixed-width file.
71-
map_variables: boolean, default: True
71+
map_variables : boolean, default True
7272
When true, renames columns of the Dataframe to pvlib variable names
7373
where applicable. See variable :const:`VARIABLE_MAP`.
7474

pvlib/iotools/pvgis.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,24 @@ def get_pvgis_hourly(latitude, longitude, start=None, end=None,
5959
6060
Parameters
6161
----------
62-
latitude: float
62+
latitude : float
6363
In decimal degrees, between -90 and 90, north is positive (ISO 19115)
64-
longitude: float
64+
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, default None
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, default None
7070
Last year of the radiation time series. Defaults to last year
7171
available.
72-
raddatabase: str, default: None
72+
raddatabase : str, default None
7373
Name of radiation database. Options depend on location, see [3]_.
74-
components: bool, default: True
74+
components : bool, default True
7575
Output solar radiation components (beam, diffuse, and reflected).
7676
Otherwise only global irradiance is returned.
77-
surface_tilt: float, default: 0
77+
surface_tilt : float, default 0
7878
Tilt angle from horizontal plane. Ignored for two-axis tracking.
79-
surface_azimuth: float, default: 180
79+
surface_azimuth : float, default 180
8080
Orientation (azimuth angle) of the (fixed) plane. Counter-clockwise
8181
from north (north=0, south=180). This is offset 180 degrees from
8282
the convention used by PVGIS. Ignored for tracking systems.
@@ -85,45 +85,45 @@ def get_pvgis_hourly(latitude, longitude, start=None, end=None,
8585
The `surface_azimuth` parameter now follows the pvlib convention, which
8686
is counterclockwise from north. However, the convention used by the
8787
PVGIS website and pvlib<=0.9.5 is offset by 180 degrees.
88-
usehorizon: bool, default: True
88+
usehorizon : bool, default True
8989
Include effects of horizon
90-
userhorizon: list of float, default: None
90+
userhorizon : list of float, default None
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]_
95-
pvcalculation: bool, default: False
95+
pvcalculation : bool, default False
9696
Return estimate of hourly PV production.
97-
peakpower: float, default: None
97+
peakpower : float, default None
9898
Nominal power of PV system in kW. Required if pvcalculation=True.
99-
pvtechchoice: {'crystSi', 'CIS', 'CdTe', 'Unknown'}, default: 'crystSi'
99+
pvtechchoice : {'crystSi', 'CIS', 'CdTe', 'Unknown'}, default 'crystSi'
100100
PV technology.
101-
mountingplace: {'free', 'building'}, default: free
101+
mountingplace : {'free', 'building'}, default free
102102
Type of mounting for PV system. Options of 'free' for free-standing
103103
and 'building' for building-integrated.
104-
loss: float, default: 0
104+
loss : float, default 0
105105
Sum of PV system losses in percent. Required if pvcalculation=True
106-
trackingtype: {0, 1, 2, 3, 4, 5}, default: 0
106+
trackingtype : {0, 1, 2, 3, 4, 5}, default 0
107107
Type of suntracking. 0=fixed, 1=single horizontal axis aligned
108108
north-south, 2=two-axis tracking, 3=vertical axis tracking, 4=single
109109
horizontal axis aligned east-west, 5=single inclined axis aligned
110110
north-south.
111-
optimal_surface_tilt: bool, default: False
111+
optimal_surface_tilt : bool, default False
112112
Calculate the optimum tilt angle. Ignored for two-axis tracking
113-
optimalangles: bool, default: False
113+
optimalangles : bool, default False
114114
Calculate the optimum tilt and azimuth angles. Ignored for two-axis
115115
tracking.
116-
outputformat: str, default: 'json'
116+
outputformat : str, default 'json'
117117
Must be in ``['json', 'csv']``. See PVGIS hourly data
118118
documentation [2]_ for more info.
119-
url: str, default: :const:`pvlib.iotools.pvgis.URL`
119+
url : str, default :const:`pvlib.iotools.pvgis.URL`
120120
Base url of PVGIS API. ``seriescalc`` is appended to get hourly data
121121
endpoint. Note, a specific PVGIS version can be specified, e.g.,
122122
https://re.jrc.ec.europa.eu/api/v5_2/
123-
map_variables: bool, default: True
123+
map_variables : bool, default True
124124
When true, renames columns of the Dataframe to pvlib variable names
125125
where applicable. See variable :const:`VARIABLE_MAP`.
126-
timeout: int, default: 30
126+
timeout : int, default 30
127127
Time in seconds to wait for server response before timeout
128128
129129
Returns
@@ -217,9 +217,9 @@ def get_pvgis_hourly(latitude, longitude, start=None, end=None,
217217
if raddatabase is not None:
218218
params['raddatabase'] = raddatabase
219219
if start is not None:
220-
params['startyear'] = start if isinstance(start, int) else pd.to_datetime(start).year # noqa: E501
220+
params['startyear'] = start if isinstance(start, int) else start.year
221221
if end is not None:
222-
params['endyear'] = end if isinstance(end, int) else pd.to_datetime(end).year # noqa: E501
222+
params['endyear'] = end if isinstance(end, int) else end.year
223223
if peakpower is not None:
224224
params['peakpower'] = peakpower
225225

@@ -315,7 +315,7 @@ def read_pvgis_hourly(filename, pvgis_format=None, map_variables=True):
315315
``pvgis_format`` is ``None`` then the file extension will be used to
316316
determine the PVGIS format to parse. If ``filename`` is a buffer, then
317317
``pvgis_format`` is required and must be in ``['csv', 'json']``.
318-
map_variables: bool, default True
318+
map_variables : bool, default True
319319
When true, renames columns of the DataFrame to pvlib variable names
320320
where applicable. See variable :const:`VARIABLE_MAP`.
321321
@@ -391,8 +391,8 @@ def read_pvgis_hourly(filename, pvgis_format=None, map_variables=True):
391391

392392

393393
def get_pvgis_tmy(latitude, longitude, outputformat='json', usehorizon=True,
394-
userhorizon=None, startyear=None, endyear=None,
395-
map_variables=True, url=URL, timeout=30):
394+
userhorizon=None, startyear=None, endyear=None, url=URL,
395+
map_variables=True, timeout=30):
396396
"""
397397
Get TMY data from PVGIS.
398398
@@ -418,11 +418,11 @@ def get_pvgis_tmy(latitude, longitude, outputformat='json', usehorizon=True,
418418
first year to calculate TMY
419419
endyear : int, default None
420420
last year to calculate TMY, must be at least 10 years from first year
421-
map_variables: bool, default True
421+
url : str, default :const:`pvlib.iotools.pvgis.URL`
422+
base url of PVGIS API, append ``tmy`` to get TMY endpoint
423+
map_variables : bool, default True
422424
When true, renames columns of the Dataframe to pvlib variable names
423425
where applicable. See variable :const:`VARIABLE_MAP`.
424-
url : str, default: :const:`pvlib.iotools.pvgis.URL`
425-
base url of PVGIS API, append ``tmy`` to get TMY endpoint
426426
timeout : int, default 30
427427
time in seconds to wait for server response before timeout
428428
@@ -581,7 +581,7 @@ def read_pvgis_tmy(filename, pvgis_format=None, map_variables=True):
581581
``outputformat='basic'``, please set ``pvgis_format`` to ``'basic'``.
582582
If ``filename`` is a buffer, then ``pvgis_format`` is required and must
583583
be in ``['csv', 'epw', 'json', 'basic']``.
584-
map_variables: bool, default True
584+
map_variables : bool, default True
585585
When true, renames columns of the Dataframe to pvlib variable names
586586
where applicable. See variable :const:`VARIABLE_MAP`.
587587
@@ -678,7 +678,7 @@ def get_pvgis_horizon(latitude, longitude, url=URL, **kwargs):
678678
Latitude in degrees north
679679
longitude : float
680680
Longitude in degrees east
681-
url: str, default: :const:`pvlib.iotools.pvgis.URL`
681+
url : str, default :const:`pvlib.iotools.pvgis.URL`
682682
Base URL for PVGIS
683683
kwargs:
684684
Passed to requests.get

pvlib/iotools/sodapro.py

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
4747
altitude=None, time_step='1h', time_ref='UT', verbose=False,
4848
integrated=False, label=None, map_variables=True,
4949
server=URL, timeout=30):
50-
"""Retrieve irradiance and clear-sky time series from CAMS.
51-
52-
Time-series of radiation and/or clear-sky global, beam, and
50+
"""
51+
Retrieve time-series of radiation and/or clear-sky global, beam, and
5352
diffuse radiation from CAMS (see [1]_). Data is retrieved from SoDa [2]_.
5453
5554
Time coverage: 2004-01-01 to two days ago
@@ -62,48 +61,48 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
6261
6362
Parameters
6463
----------
65-
latitude: float
64+
latitude : float
6665
in decimal degrees, between -90 and 90, north is positive (ISO 19115)
6766
longitude : float
6867
in decimal degrees, between -180 and 180, east is positive (ISO 19115)
69-
start: datetime-like
68+
start : datetime like
7069
First day of the requested period
71-
end: datetime-like
70+
end : datetime like
7271
Last day of the requested period
73-
email: str
72+
email : str
7473
Email address linked to a SoDa account
75-
identifier: {'mcclear', 'cams_radiation'}
74+
identifier : {'mcclear', 'cams_radiation'}
7675
Specify whether to retrieve CAMS Radiation or McClear parameters
77-
altitude: float, optional
76+
altitude : float, optional
7877
Altitude in meters. If None, then the altitude is determined from the
7978
NASA SRTM database
80-
time_step: str, {'1min', '15min', '1h', '1d', '1M'}, default: '1h'
79+
time_step : str, {'1min', '15min', '1h', '1d', '1M'}, default '1h'
8180
Time step of the time series, either 1 minute, 15 minute, hourly,
8281
daily, or monthly.
83-
time_ref: str, {'UT', 'TST'}, default: 'UT'
82+
time_ref : str, {'UT', 'TST'}, default 'UT'
8483
'UT' (universal time) or 'TST' (True Solar Time)
85-
verbose: boolean, default: False
84+
verbose : boolean, default False
8685
Verbose mode outputs additional parameters (aerosols). Only available
8786
for 1 minute and universal time. See [1]_ for parameter description.
88-
integrated: boolean, default False
87+
integrated : boolean, default False
8988
Whether to return radiation parameters as integrated values (Wh/m^2)
9089
or as average irradiance values (W/m^2) (pvlib preferred units)
91-
label: {'right', 'left'}, default: None
90+
label : {'right', 'left'}, default None
9291
Which bin edge label to label time-step with. The default is 'left' for
9392
all time steps except for '1M' which has a default of 'right'.
94-
map_variables: bool, default: True
93+
map_variables : bool, default True
9594
When true, renames columns of the DataFrame to pvlib variable names
9695
where applicable. See variable :const:`VARIABLE_MAP`.
97-
server: str, default: :const:`pvlib.iotools.sodapro.URL`
96+
server : str, default :const:`pvlib.iotools.sodapro.URL`
9897
Base url of the SoDa Pro CAMS Radiation API.
99-
timeout : int, default: 30
98+
timeout : int, default 30
10099
Time in seconds to wait for server response before timeout
101100
102101
Returns
103102
-------
104-
data: pandas.DataFrame
103+
data : pandas.DataFrame
105104
Timeseries data, see Notes for columns
106-
metadata: dict
105+
metadata : dict
107106
Metadata of the requested time-series
108107
109108
Notes
@@ -178,8 +177,8 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
178177
altitude = -999
179178

180179
# Start and end date should be in the format: yyyy-mm-dd
181-
start = pd.to_datetime(start).strftime('%Y-%m-%d')
182-
end = pd.to_datetime(end).strftime('%Y-%m-%d')
180+
start = start.strftime('%Y-%m-%d')
181+
end = end.strftime('%Y-%m-%d')
183182

184183
email = email.replace('@', '%2540') # Format email address
185184
identifier = 'get_{}'.format(identifier.lower()) # Format identifier str
@@ -236,23 +235,23 @@ def parse_cams(fbuf, integrated=False, label=None, map_variables=True):
236235
237236
Parameters
238237
----------
239-
fbuf: file-like object
238+
fbuf : file-like object
240239
File-like object containing data to read.
241-
integrated: boolean, default False
240+
integrated : boolean, default False
242241
Whether to return radiation parameters as integrated values (Wh/m^2)
243242
or as average irradiance values (W/m^2) (pvlib preferred units)
244-
label: {'right', 'left'}, default: None
243+
label : {'right', 'left'}, default None
245244
Which bin edge label to label time-step with. The default is 'left' for
246245
all time steps except for '1M' which has a default of 'right'.
247-
map_variables: bool, default: True
246+
map_variables : bool, default True
248247
When true, renames columns of the Dataframe to pvlib variable names
249248
where applicable. See variable :const:`VARIABLE_MAP`.
250249
251250
Returns
252251
-------
253-
data: pandas.DataFrame
252+
data : pandas.DataFrame
254253
Timeseries data from CAMS Radiation or McClear
255-
metadata: dict
254+
metadata : dict
256255
Metadata available in the file.
257256
258257
See Also
@@ -337,24 +336,24 @@ def read_cams(filename, integrated=False, label=None, map_variables=True):
337336
338337
Parameters
339338
----------
340-
filename: str
339+
filename : str
341340
Filename of a file containing data to read.
342-
integrated: boolean, default False
341+
integrated : boolean, default False
343342
Whether to return radiation parameters as integrated values (Wh/m^2)
344343
or as average irradiance values (W/m^2) (pvlib preferred units)
345-
label: {'right', 'left}, default: None
344+
label : {'right', 'left}, default None
346345
Which bin edge label to label time-step with. The default is 'left' for
347346
all time steps except for '1M' which has a default of 'right'.
348-
map_variables: bool, default: True
347+
map_variables : bool, default True
349348
When true, renames columns of the Dataframe to pvlib variable names
350349
where applicable. See variable :const:`VARIABLE_MAP`.
351350
352351
Returns
353352
-------
354-
data: pandas.DataFrame
353+
data : pandas.DataFrame
355354
Timeseries data from CAMS Radiation or McClear.
356355
See :func:`pvlib.iotools.get_cams` for fields.
357-
metadata: dict
356+
metadata : dict
358357
Metadata available in the file.
359358
360359
See Also

0 commit comments

Comments
 (0)