44
55from pvlib .iotools import psm4
66from ..conftest import (
7- TESTS_DATA_DIR , RERUNS , RERUNS_DELAY , assert_index_equal , nrel_api_key
7+ TESTS_DATA_DIR , RERUNS , RERUNS_DELAY , assert_index_equal , nlr_api_key
88)
99import numpy as np
1010import pandas as pd
@@ -54,10 +54,10 @@ def assert_psm4_equal(data, metadata, expected):
5454
5555@pytest .mark .remote_data
5656@pytest .mark .flaky (reruns = RERUNS , reruns_delay = RERUNS_DELAY )
57- def test_get_nsrdb_psm4_tmy (nrel_api_key ):
57+ def test_get_nsrdb_psm4_tmy (nlr_api_key ):
5858 """test get_nsrdb_psm4_tmy with a TMY"""
5959 data , metadata = psm4 .get_nsrdb_psm4_tmy (LATITUDE , LONGITUDE ,
60- nrel_api_key , PVLIB_EMAIL ,
60+ nlr_api_key , PVLIB_EMAIL ,
6161 year = 'tmy-2023' ,
6262 leap_day = False ,
6363 map_variables = False )
@@ -67,10 +67,10 @@ def test_get_nsrdb_psm4_tmy(nrel_api_key):
6767
6868@pytest .mark .remote_data
6969@pytest .mark .flaky (reruns = RERUNS , reruns_delay = RERUNS_DELAY )
70- def test_get_nsrdb_psm4_full_disc (nrel_api_key ):
70+ def test_get_nsrdb_psm4_full_disc (nlr_api_key ):
7171 """test get_nsrdb_psm4_full_disc with a single year"""
7272 data , metadata = psm4 .get_nsrdb_psm4_full_disc (LATITUDE , LONGITUDE ,
73- nrel_api_key , PVLIB_EMAIL ,
73+ nlr_api_key , PVLIB_EMAIL ,
7474 year = '2023' ,
7575 leap_day = False ,
7676 map_variables = False )
@@ -80,10 +80,10 @@ def test_get_nsrdb_psm4_full_disc(nrel_api_key):
8080
8181@pytest .mark .remote_data
8282@pytest .mark .flaky (reruns = RERUNS , reruns_delay = RERUNS_DELAY )
83- def test_get_nsrdb_psm4_conus_singleyear (nrel_api_key ):
83+ def test_get_nsrdb_psm4_conus_singleyear (nlr_api_key ):
8484 """test get_nsrdb_psm4_conus with a single year"""
8585 data , metadata = psm4 .get_nsrdb_psm4_aggregated (LATITUDE , LONGITUDE ,
86- nrel_api_key ,
86+ nlr_api_key ,
8787 PVLIB_EMAIL ,
8888 year = '2023' ,
8989 leap_day = False ,
@@ -95,10 +95,10 @@ def test_get_nsrdb_psm4_conus_singleyear(nrel_api_key):
9595
9696@pytest .mark .remote_data
9797@pytest .mark .flaky (reruns = RERUNS , reruns_delay = RERUNS_DELAY )
98- def test_get_nsrdb_psm4_conus_5min (nrel_api_key ):
98+ def test_get_nsrdb_psm4_conus_5min (nlr_api_key ):
9999 """test get_nsrdb_psm4_conus for 5-minute data"""
100100 data , metadata = psm4 .get_nsrdb_psm4_conus (LATITUDE , LONGITUDE ,
101- nrel_api_key , PVLIB_EMAIL ,
101+ nlr_api_key , PVLIB_EMAIL ,
102102 year = '2023' , time_step = 5 ,
103103 leap_day = False ,
104104 map_variables = False )
@@ -110,10 +110,10 @@ def test_get_nsrdb_psm4_conus_5min(nrel_api_key):
110110
111111@pytest .mark .remote_data
112112@pytest .mark .flaky (reruns = RERUNS , reruns_delay = RERUNS_DELAY )
113- def test_get_nsrdb_psm4_aggregated_check_leap_day (nrel_api_key ):
113+ def test_get_nsrdb_psm4_aggregated_check_leap_day (nlr_api_key ):
114114 """test get_nsrdb_psm4_aggregated for leap day"""
115115 data_2012 , _ = psm4 .get_nsrdb_psm4_aggregated (LATITUDE , LONGITUDE ,
116- nrel_api_key , PVLIB_EMAIL ,
116+ nlr_api_key , PVLIB_EMAIL ,
117117 year = "2012" , time_step = 60 ,
118118 leap_day = True ,
119119 map_variables = False )
@@ -122,9 +122,9 @@ def test_get_nsrdb_psm4_aggregated_check_leap_day(nrel_api_key):
122122
123123@pytest .mark .parametrize ('latitude, longitude, api_key, year, time_step' ,
124124 [(LATITUDE , LONGITUDE , 'BAD' , '2023' , 60 ),
125- (51 , - 5 , nrel_api_key , '2023' , 60 ),
126- (LATITUDE , LONGITUDE , nrel_api_key , 'bad' , 60 ),
127- (LATITUDE , LONGITUDE , nrel_api_key , '2023' , 15 ),
125+ (51 , - 5 , nlr_api_key , '2023' , 60 ),
126+ (LATITUDE , LONGITUDE , nlr_api_key , 'bad' , 60 ),
127+ (LATITUDE , LONGITUDE , nlr_api_key , '2023' , 15 ),
128128 ])
129129@pytest .mark .remote_data
130130@pytest .mark .flaky (reruns = RERUNS , reruns_delay = RERUNS_DELAY )
@@ -187,11 +187,11 @@ def test_read_nsrdb_psm4_map_variables():
187187
188188@pytest .mark .remote_data
189189@pytest .mark .flaky (reruns = RERUNS , reruns_delay = RERUNS_DELAY )
190- def test_get_nsrdb_psm4_aggregated_parameter_mapping (nrel_api_key ):
190+ def test_get_nsrdb_psm4_aggregated_parameter_mapping (nlr_api_key ):
191191 """Test that pvlib names can be passed in as parameters and get correctly
192192 reverse mapped to psm4 names"""
193193 data , meta = psm4 .get_nsrdb_psm4_aggregated (
194- LATITUDE , LONGITUDE , nrel_api_key , PVLIB_EMAIL , year = '2019' ,
194+ LATITUDE , LONGITUDE , nlr_api_key , PVLIB_EMAIL , year = '2019' ,
195195 time_step = 60 , parameters = ['ghi' , 'wind_speed' ], leap_day = False ,
196196 map_variables = True )
197197 # Check that columns are in the correct order (GH1647)
0 commit comments