@@ -74,7 +74,7 @@ def test_get_nsrdb_psm4_conus_singleyear(nrel_api_key):
7474 year = '2023' ,
7575 leap_day = False ,
7676 map_variables = False ,
77- interval = 30 )
77+ time_step = 30 )
7878 expected = pd .read_csv (YEAR_TEST_DATA )
7979 assert_psm4_equal (data , metadata , expected )
8080
@@ -85,7 +85,7 @@ def test_get_nsrdb_psm4_conus_5min(nrel_api_key):
8585 """test get_nsrdb_psm4_conus for 5-minute data"""
8686 data , metadata = psm4 .get_nsrdb_psm4_conus (LATITUDE , LONGITUDE ,
8787 nrel_api_key , PVLIB_EMAIL ,
88- year = '2023' , interval = 5 ,
88+ year = '2023' , time_step = 5 ,
8989 leap_day = False ,
9090 map_variables = False )
9191 assert len (data ) == 525600 / 5
@@ -100,13 +100,13 @@ def test_get_nsrdb_psm4_aggregated_check_leap_day(nrel_api_key):
100100 """test get_nsrdb_psm4_aggregated for leap day"""
101101 data_2012 , _ = psm4 .get_nsrdb_psm4_aggregated (LATITUDE , LONGITUDE ,
102102 nrel_api_key , PVLIB_EMAIL ,
103- year = "2012" , interval = 60 ,
103+ year = "2012" , time_step = 60 ,
104104 leap_day = True ,
105105 map_variables = False )
106106 assert len (data_2012 ) == (8760 + 24 )
107107
108108
109- @pytest .mark .parametrize ('latitude, longitude, api_key, year, interval ' ,
109+ @pytest .mark .parametrize ('latitude, longitude, api_key, year, time_step ' ,
110110 [(LATITUDE , LONGITUDE , 'BAD' , '2023' , 60 ),
111111 (51 , - 5 , nrel_api_key , '2023' , 60 ),
112112 (LATITUDE , LONGITUDE , nrel_api_key , 'bad' , 60 ),
@@ -115,20 +115,20 @@ def test_get_nsrdb_psm4_aggregated_check_leap_day(nrel_api_key):
115115@pytest .mark .remote_data
116116@pytest .mark .flaky (reruns = RERUNS , reruns_delay = RERUNS_DELAY )
117117def test_get_nsrdb_psm4_aggregated_errors (
118- latitude , longitude , api_key , year , interval
118+ latitude , longitude , api_key , year , time_step
119119):
120120 """Test get_nsrdb_psm4_aggregated() for multiple erroneous input scenarios.
121121
122122 These scenarios include:
123123 * Bad API key -> HTTP 403 forbidden because api_key is rejected
124124 * Bad latitude/longitude -> Coordinates were not found in the NSRDB.
125125 * Bad name -> Name is not one of the available options.
126- * Bad interval , single year -> Intervals can only be 30 or 60 minutes
126+ * Bad time_step , single year -> time_step can only be 30 or 60 minutes
127127 """
128128 with pytest .raises (HTTPError ) as excinfo :
129129 psm4 .get_nsrdb_psm4_aggregated (latitude , longitude , api_key ,
130130 PVLIB_EMAIL , year = year ,
131- interval = interval , leap_day = False ,
131+ time_step = time_step , leap_day = False ,
132132 map_variables = False )
133133 # ensure the HTTPError caught isn't due to overuse of the API key
134134 assert "OVER_RATE_LIMIT" not in str (excinfo .value )
@@ -177,7 +177,7 @@ def test_get_nsrdb_psm4_aggregated_attribute_mapping(nrel_api_key):
177177 reverse mapped to psm4 names"""
178178 data , meta = psm4 .get_nsrdb_psm4_aggregated (
179179 LATITUDE , LONGITUDE , nrel_api_key , PVLIB_EMAIL , year = '2019' ,
180- interval = 60 , attributes = ['ghi' , 'wind_speed' ], leap_day = False ,
180+ time_step = 60 , attributes = ['ghi' , 'wind_speed' ], leap_day = False ,
181181 map_variables = True )
182182 # Check that columns are in the correct order (GH1647)
183183 expected_columns = [
0 commit comments