From 536aeb6f2d060800201fdeae2625172b0ccc7217 Mon Sep 17 00:00:00 2001 From: "Adam R. Jensen" <39184289+AdamRJensen@users.noreply.github.com> Date: Tue, 12 Mar 2024 09:42:17 +0100 Subject: [PATCH 1/2] Update test_srml.py --- pvlib/tests/iotools/test_srml.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/pvlib/tests/iotools/test_srml.py b/pvlib/tests/iotools/test_srml.py index 308ea3a3a1..fb0839e15c 100644 --- a/pvlib/tests/iotools/test_srml.py +++ b/pvlib/tests/iotools/test_srml.py @@ -14,11 +14,12 @@ def test_read_srml(): srml.read_srml(srml_testfile) -@pytest.mark.skip(reason="SRML server is undergoing maintenance as of 12-2023") @pytest.mark.remote_data @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) def test_read_srml_remote(): - srml.read_srml('http://solardat.uoregon.edu/download/Archive/EUPO1801.txt') + srml.read_srml( + 'http://solardata.uoregon.edu/download/Archive/EUPO1801.txt' + ) def test_read_srml_columns_exist(): @@ -47,11 +48,10 @@ def test_read_srml_nans_exist(): assert data['dni_0_flag'].iloc[1119] == 99 -@pytest.mark.skip(reason="SRML server is undergoing maintenance as of 12-2023") @pytest.mark.parametrize('url,year,month', [ - ('http://solardat.uoregon.edu/download/Archive/EUPO1801.txt', + ('http://solardata.uoregon.edu/download/Archive/EUPO1801.txt', 2018, 1), - ('http://solardat.uoregon.edu/download/Archive/EUPO1612.txt', + ('http://solardata.uoregon.edu/download/Archive/EUPO1612.txt', 2016, 12), ]) @pytest.mark.remote_data @@ -78,30 +78,27 @@ def test__map_columns(column, expected): assert srml._map_columns(column) == expected -@pytest.mark.skip(reason="SRML server is undergoing maintenance as of 12-2023") @pytest.mark.remote_data @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) def test_get_srml(): - url = 'http://solardat.uoregon.edu/download/Archive/EUPO1801.txt' + url = 'http://solardata.uoregon.edu/download/Archive/EUPO1801.txt' file_data = srml.read_srml(url) requested, _ = srml.get_srml(station='EU', start='2018-01-01', end='2018-01-31') assert_frame_equal(file_data, requested) -@pytest.mark.skip(reason="SRML server is undergoing maintenance as of 12-2023") @fail_on_pvlib_version('0.11') @pytest.mark.remote_data @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) def test_read_srml_month_from_solardat(): - url = 'http://solardat.uoregon.edu/download/Archive/EUPO1801.txt' + url = 'http://solardata.uoregon.edu/download/Archive/EUPO1801.txt' file_data = srml.read_srml(url) with pytest.warns(pvlibDeprecationWarning, match='get_srml instead'): requested = srml.read_srml_month_from_solardat('EU', 2018, 1) assert file_data.equals(requested) -@pytest.mark.skip(reason="SRML server is undergoing maintenance as of 12-2023") @fail_on_pvlib_version('0.11') @pytest.mark.remote_data @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) @@ -117,7 +114,6 @@ def test_15_minute_dt_index(): assert (data.index[3::4].minute == 45).all() -@pytest.mark.skip(reason="SRML server is undergoing maintenance as of 12-2023") @fail_on_pvlib_version('0.11') @pytest.mark.remote_data @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) @@ -133,7 +129,6 @@ def test_hourly_dt_index(): assert (data.index.minute == 0).all() -@pytest.mark.skip(reason="SRML server is undergoing maintenance as of 12-2023") @pytest.mark.remote_data @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) def test_get_srml_hourly(): @@ -144,7 +139,6 @@ def test_get_srml_hourly(): assert_index_equal(data.index, expected_index) -@pytest.mark.skip(reason="SRML server is undergoing maintenance as of 12-2023") @pytest.mark.remote_data @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) def test_get_srml_minute(): @@ -162,7 +156,6 @@ def test_get_srml_minute(): assert meta['filenames'] == ['EUPO1801.txt'] -@pytest.mark.skip(reason="SRML server is undergoing maintenance as of 12-2023") @pytest.mark.remote_data @pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY) def test_get_srml_nonexisting_month_warning(): From c6dccb7361383d61a32a4a6169e812cecc0f81e4 Mon Sep 17 00:00:00 2001 From: "Adam R. Jensen" <39184289+AdamRJensen@users.noreply.github.com> Date: Tue, 12 Mar 2024 14:14:24 +0100 Subject: [PATCH 2/2] Update v0.10.4.rst --- docs/sphinx/source/whatsnew/v0.10.4.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/sphinx/source/whatsnew/v0.10.4.rst b/docs/sphinx/source/whatsnew/v0.10.4.rst index 216fed8b17..3118aca126 100644 --- a/docs/sphinx/source/whatsnew/v0.10.4.rst +++ b/docs/sphinx/source/whatsnew/v0.10.4.rst @@ -37,6 +37,8 @@ Bug fixes * Fixed incorrect unit conversion of precipitable water used for the Solcast iotools functions. * :py:class:`~pvlib.modelchain.ModelChain.infer_temperature_model` now raises a more useful error when the temperature model cannot be inferred (:issue:`1946`) +* The default URL for retrieving irradiance data from the SRML network was updated in + :py:func:`~pvlib.iotools.get_srml` (:pull:`1957`, :issue:`1922`) Testing ~~~~~~~