diff --git a/docs/sphinx/source/whatsnew/v0.9.2.rst b/docs/sphinx/source/whatsnew/v0.9.2.rst index 594fd81d04..05b7ed58ab 100644 --- a/docs/sphinx/source/whatsnew/v0.9.2.rst +++ b/docs/sphinx/source/whatsnew/v0.9.2.rst @@ -39,3 +39,4 @@ Contributors ~~~~~~~~~~~~ * Naman Priyadarshi (:ghuser:`Naman-Priyadarshi`) * Chencheng Luo (:ghuser:`roger-lcc`) +* Prajwal Borkar (:ghuser:`PrajwalBorkar`) diff --git a/pvlib/iotools/sodapro.py b/pvlib/iotools/sodapro.py index abb06da8bb..a5d3e1efd1 100644 --- a/pvlib/iotools/sodapro.py +++ b/pvlib/iotools/sodapro.py @@ -153,11 +153,11 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear', References ---------- .. [1] `CAMS Radiation Service Info - `_ + `_ .. [2] `CAMS McClear Service Info - `_ + `_ .. [3] `CAMS McClear Automatic Access - `_ + `_ """ try: time_step_str = TIME_STEPS_MAP[time_step] @@ -185,7 +185,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear', email = email.replace('@', '%2540') # Format email address identifier = 'get_{}'.format(identifier.lower()) # Format identifier str - base_url = f"http://{server}/service/wps" + base_url = f"https://{server}/service/wps" data_inputs_dict = { 'latitude': latitude, @@ -263,9 +263,9 @@ def parse_cams(fbuf, integrated=False, label=None, map_variables=True): References ---------- .. [1] `CAMS Radiation Service Info - `_ + `_ .. [2] `CAMS McClear Service Info - `_ + `_ """ metadata = {} # Initial lines starting with # contain metadata @@ -366,9 +366,9 @@ def read_cams(filename, integrated=False, label=None, map_variables=True): References ---------- .. [1] `CAMS Radiation Service Info - `_ + `_ .. [2] `CAMS McClear Service Info - `_ + `_ """ with open(str(filename), 'r') as fbuf: content = parse_cams(fbuf, integrated, label, map_variables) diff --git a/pvlib/tests/iotools/test_sodapro.py b/pvlib/tests/iotools/test_sodapro.py index 10f9a1e8c9..24e5ebbfcf 100644 --- a/pvlib/tests/iotools/test_sodapro.py +++ b/pvlib/tests/iotools/test_sodapro.py @@ -209,7 +209,7 @@ def test_get_cams(requests_mock, testfile, index, columns, values, dtypes, mock_response = test_file.read() # Specify the full URI of a specific example, this ensures that all of the # inputs are passing on correctly - url_test_cams = f'http://www.soda-is.com/service/wps?DataInputs=latitude=55.7906;longitude=12.5251;altitude=80;date_begin=2020-01-01;date_end=2020-05-04;time_ref=UT;summarization=P01M;username=pvlib-admin%2540googlegroups.com;verbose=false&Service=WPS&Request=Execute&Identifier=get_{identifier}&version=1.0.0&RawDataOutput=irradiation' # noqa: E501 + url_test_cams = f'https://www.soda-is.com/service/wps?DataInputs=latitude=55.7906;longitude=12.5251;altitude=80;date_begin=2020-01-01;date_end=2020-05-04;time_ref=UT;summarization=P01M;username=pvlib-admin%2540googlegroups.com;verbose=false&Service=WPS&Request=Execute&Identifier=get_{identifier}&version=1.0.0&RawDataOutput=irradiation' # noqa: E501 requests_mock.get(url_test_cams, text=mock_response, headers={'Content-Type': 'application/csv'}) @@ -254,7 +254,7 @@ def test_get_cams_bad_request(requests_mock): Please, register yourself at www.soda-pro.com """ - url_cams_bad_request = 'http://pro.soda-is.com/service/wps?DataInputs=latitude=55.7906;longitude=12.5251;altitude=-999;date_begin=2020-01-01;date_end=2020-05-04;time_ref=TST;summarization=PT01H;username=test%2540test.com;verbose=false&Service=WPS&Request=Execute&Identifier=get_mcclear&version=1.0.0&RawDataOutput=irradiation' # noqa: E501 + url_cams_bad_request = 'https://pro.soda-is.com/service/wps?DataInputs=latitude=55.7906;longitude=12.5251;altitude=-999;date_begin=2020-01-01;date_end=2020-05-04;time_ref=TST;summarization=PT01H;username=test%2540test.com;verbose=false&Service=WPS&Request=Execute&Identifier=get_mcclear&version=1.0.0&RawDataOutput=irradiation' # noqa: E501 requests_mock.get(url_cams_bad_request, text=mock_response_bad, headers={'Content-Type': 'application/xml'})