@@ -185,7 +185,8 @@ def do_main():
185185 dest = "output_path" ,
186186 type = str ,
187187 required = True ,
188- help = "The path to where the generated scenario CSV file should be written" )
188+ help = "The path to where the generated scenario CSV file should be written "
189+ "including the filename. For example: /tmp/my_scenario.csv" )
189190 args = parser .parse_args ()
190191 LOGGER .info ("Generating scenario..." )
191192 # Load the latest dataset from Oxford, for the fixed list of countries and regions
@@ -208,14 +209,9 @@ def do_main():
208209 LOGGER .info (f"{ nb_regions } regions" )
209210 LOGGER .info (f"{ nb_rows } rows in generated file, which corresponds to { nb_days } days" )
210211 # Save
211- today = datetime .utcnow ().strftime ('%Y%m%d_%H%M%S' )
212- sd = 20200101 # IP file always contains data since inception
213- ed = args .end_date .replace ('-' , "" )
214- output_dir = args .output_path
215- file_name = f"{ today } _{ sd } _{ ed } _ips.csv"
216- full_file_name = os .path .join (output_dir , file_name )
217- LOGGER .info (f"Saving to: { full_file_name } " )
218- scenario_df .to_csv (full_file_name , index = False )
212+ output_path = args .output_path
213+ LOGGER .info (f"Saving to: { output_path } " )
214+ scenario_df .to_csv (output_path , index = False )
219215 LOGGER .info (f"Done!" )
220216
221217
0 commit comments