import os from runner import calibration, scenario specs_path = os.path.join('test', 'test_data', 'et-1-specs.xlsx') csv_path = os.path.join('test', 'test_data', 'et-1-country-inputs.csv') result_path = os.path.join('test', 'test_data') scenario(specs_path, csv_path, result_path, result_path)
specs = pd.read_excel(specs_path, index_col=0) if choice == 1: messagebox.showinfo('OnSSET', 'Open the file containing separated countries') csv_path = filedialog.askopenfilename() messagebox.showinfo( 'OnSSET', 'Browse to result folder and name the calibrated file') calibrated_csv_path = filedialog.asksaveasfilename() calibrated_csv_path = calibrated_csv_path + '.csv' messagebox.showinfo( 'OnSSET', 'Browse to result folder and name the calibrated specs file') specs_path_calib = filedialog.asksaveasfilename() specs_path_calib = specs_path_calib + '.xlsx' calibration(specs_path, csv_path, specs_path_calib, calibrated_csv_path) elif choice == 2: messagebox.showinfo('OnSSET', 'Open the csv file with calibrated GIS data') calibrated_csv_path = filedialog.askopenfilename() messagebox.showinfo('OnSSET', 'Browse to RESULTS folder to save outputs') results_folder = filedialog.askdirectory() messagebox.showinfo( 'OnSSET', 'Browse to SUMMARIES folder and name the scenario to save outputs') summary_folder = filedialog.askdirectory() scenario(specs_path, calibrated_csv_path, results_folder, summary_folder)