def query_download(routes, self, query_id): '''Download compressed query output. Args: self (App): ProbeDesigner.App instance. query_id (string): query folder name. ''' routes.mkZipDir(self) ipath = os.path.join(self.static_path, 'query', routes.zipDirName) fName = f'{query_id}.zip' outname = f'query.{fName}' if not os.path.isfile(os.path.join(ipath, fName)): routes.zipQuery(self, query_id) return (bot.static_file(fName, ipath, download=outname))
def candidate_set_download(routes, self, query_id, candidate_id): '''Download compressed candidate output. Args: self (App): ProbeDesigner.App instance. query_id (string): query folder name. candidate_id (string): candidate folder name. ''' routes.mkZipDir(self) ipath = os.path.join(self.static_path, 'query', routes.zipDirName) fName = f'{query_id}.probe_set_{candidate_id}.zip' outname = f'query.{fName}' if not os.path.isfile(os.path.join(ipath, fName)): routes.zipCandidateSet(self, query_id, candidate_id) return bot.static_file(fName, ipath, download=outname)
def candidate_download(routes, self, query_id, candidate_id): """Download compressed candidate output. Args: self (App): ProbeDesigner.App instance. query_id (string): query folder name. candidate_id (string): candidate folder name. """ routes.mkZipDir(self) ipath = os.path.join(self.static_path, "query", routes.zipDirName) fName = f"{query_id}.candidate_{candidate_id}.zip" outname = f"query.{fName}" if not os.path.isfile(os.path.join(ipath, fName)): routes.zipCandidate(self, query_id, candidate_id) return bot.static_file(fName, ipath, download=outname)