def export_data(args): template_id = None if args.template_id is not None: template_id = int(args.template_id) exporter=Exporter(args, link_export_flag, steps) if args.start_date is not None and args.end_date is not None \ and args.time_step is not None: exporter.get_time_index(start_time=args.start_date, end_time=args.end_date, time_step=args.time_step) elif args.time_axis is not None: exporter.get_time_index(time_axis=args.time_axis) else: raise HydraPluginError('Time axis not specified.') exporter.export_network() exporter.save_file() return exporter.net
def export_data(args): template_id = None if args.template_id is not None: template_id = int(args.template_id) exporter = Exporter(args, link_export_flag, steps) if args.start_date is not None and args.end_date is not None \ and args.time_step is not None: exporter.get_time_index(start_time=args.start_date, end_time=args.end_date, time_step=args.time_step) elif args.time_axis is not None: exporter.get_time_index(time_axis=args.time_axis) else: raise HydraPluginError('Time axis not specified.') exporter.export_network() exporter.save_file() return exporter.net