Skip to content

Commit 02cf2e2

Browse files
committed
Change server parameter to url in get_cams
1 parent f33be83 commit 02cf2e2

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

pvlib/iotools/sodapro.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import warnings
1010
from pvlib import tools
1111

12-
from pvlib._deprecation import deprecated
12+
from pvlib._deprecation import deprecated, renamed_kwarg_warning
1313

1414
URL = 'api.soda-solardata.com'
1515

@@ -45,10 +45,15 @@
4545
'0 year 1 month 0 day 0 h 0 min 0 s': '1M'}
4646

4747

48+
@renamed_kwarg_warning(
49+
since='0.13.0',
50+
old_param_name='server',
51+
new_param_name='url',
52+
removal="0.14.0")
4853
def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
4954
altitude=None, time_step='1h', time_ref='UT', verbose=False,
5055
integrated=False, label=None, map_variables=True,
51-
server=URL, timeout=30):
56+
url=URL, timeout=30):
5257
"""Retrieve irradiance and clear-sky time series from CAMS.
5358
5459
Time-series of radiation and/or clear-sky global, beam, and
@@ -98,7 +103,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
98103
map_variables: bool, default: True
99104
When true, renames columns of the DataFrame to pvlib variable names
100105
where applicable. See variable :const:`VARIABLE_MAP`.
101-
server: str, default: :const:`pvlib.iotools.sodapro.URL`
106+
url: str, default: :const:`pvlib.iotools.sodapro.URL`
102107
Base url of the SoDa Pro CAMS Radiation API.
103108
timeout : int, default: 30
104109
Time in seconds to wait for server response before timeout
@@ -199,7 +204,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
199204
email = email.replace('@', '%2540') # Format email address
200205
identifier = 'get_{}'.format(identifier.lower()) # Format identifier str
201206

202-
base_url = f"https://{server}/service/wps"
207+
base_url = f"https://{url}/service/wps"
203208

204209
data_inputs_dict = {
205210
'latitude': latitude,

0 commit comments

Comments
 (0)