From d5f5cd58607230e5a49ec07931cb43b296d2bbee Mon Sep 17 00:00:00 2001 From: Prajwal Borkar <48290911+PrajwalBorkar@users.noreply.github.com> Date: Mon, 16 May 2022 20:27:07 +0530 Subject: [PATCH 1/4] Updated get_cams protocol to https #1457 --- pvlib/iotools/sodapro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/iotools/sodapro.py b/pvlib/iotools/sodapro.py index abb06da8bb..096bbd16f8 100644 --- a/pvlib/iotools/sodapro.py +++ b/pvlib/iotools/sodapro.py @@ -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, From ea5015e4c81a9981b3806fec89de78772f8cc3f6 Mon Sep 17 00:00:00 2001 From: Prajwal Borkar <48290911+PrajwalBorkar@users.noreply.github.com> Date: Mon, 16 May 2022 21:23:20 +0530 Subject: [PATCH 2/4] Updated instances of http to https. #1457 --- pvlib/tests/iotools/test_sodapro.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'}) From 973e67e3e78b61c53685ae9eec17e0c73d5a0cc8 Mon Sep 17 00:00:00 2001 From: Prajwal Borkar <48290911+PrajwalBorkar@users.noreply.github.com> Date: Tue, 17 May 2022 11:47:44 +0530 Subject: [PATCH 3/4] Updated documentation links to https --- pvlib/iotools/sodapro.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pvlib/iotools/sodapro.py b/pvlib/iotools/sodapro.py index 096bbd16f8..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] @@ -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) From eb334b34a26db588d0cc948905005bacc46b7857 Mon Sep 17 00:00:00 2001 From: Prajwal Borkar <48290911+PrajwalBorkar@users.noreply.github.com> Date: Tue, 17 May 2022 14:22:07 +0530 Subject: [PATCH 4/4] Added Contributor --- docs/sphinx/source/whatsnew/v0.9.2.rst | 1 + 1 file changed, 1 insertion(+) 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`)