@@ -1023,7 +1023,36 @@ def write_county_vre_hourly_profiles(inputs_case, reeds_path):
10231023 # tries to get environment variable from github, if it's not found it defaults to False
10241024 github_test = os .getenv ("GITHUB_COUNTY_TEST" , False )
10251025
1026- if 'github.nrel.gov' in remote_url :
1026+ if ('github.com' in remote_url ) and github_test :
1027+ sc_path = row ['sc_path' ]
1028+ print (f'Copying county-level hourly profiles for { row ["tech" ]} { row ["access_case" ]} ' )
1029+
1030+ shutil .copy (
1031+ os .path .join (reeds_path ,'tests' ,'data' ,'county' ,f'{ row ["tech" ]} .h5' ),
1032+ os .path .join (
1033+ reeds_path ,'inputs' ,'variability' ,'multi_year' ,
1034+ f'{ row ["tech" ]} -{ access_case } _county.h5' )
1035+ )
1036+ # Update the file version information
1037+ condition = (
1038+ (file_version_new ['tech' ] == row ['tech' ])
1039+ & (file_version_new ['access_case' ] == row ['access_case' ])
1040+ )
1041+
1042+ if condition .any ():
1043+ file_version_new .loc [condition , 'file version' ] = sc_path .split ("/" )[- 1 ]
1044+ else :
1045+ newrow = pd .DataFrame (
1046+ data = {
1047+ 'tech' : [row ['tech' ]],
1048+ 'access_case' : [row ['access_case' ]],
1049+ 'file version' : [sc_path .split ("/" )[- 1 ]]
1050+ }
1051+ )
1052+ file_version_new = pd .concat ([file_version_new , newrow ])
1053+ file_version_updates += 1
1054+
1055+ elif 'github.nrel.gov' in remote_url :
10271056 sc_path = row ['sc_path' ]
10281057 print (f'Copying county-level hourly profiles for { row ["tech" ]} { row ["access_case" ]} ' )
10291058
0 commit comments