def job_table( self, recursive=True, columns=None, all_columns=True, sort_by="id", full_table=False, element_lst=None, job_name_contains='', ): """ Access the job_table Args: recursive (bool): search subprojects [True/False] - default=True columns (list): by default only the columns ['job', 'project', 'chemicalformula'] are selected, but the user can select a subset of ['id', 'status', 'chemicalformula', 'job', 'subjob', 'project', 'projectpath', 'timestart', 'timestop', 'totalcputime', 'computer', 'hamilton', 'hamversion', 'parentid', 'masterid'] all_columns (bool): Select all columns - this overwrites the columns option. sort_by (str): Sort by a specific column full_table (bool): Whether to show the entire pandas table element_lst (list): list of elements required in the chemical formular - by default None job_name_contains (str): a string which should be contained in every job_name Returns: pandas.Dataframe: Return the result as a pandas.Dataframe object """ if not isinstance(self.db, FileTable): return job_table( database=self.db, sql_query=self.sql_query, user=self.user, project_path=self.project_path, recursive=recursive, columns=columns, all_columns=all_columns, sort_by=sort_by, full_table=full_table, element_lst=element_lst, job_name_contains=job_name_contains, ) else: return self.db.job_table(project=self.project_path, recursive=recursive, columns=columns, all_columns=all_columns, sort_by=sort_by, max_colwidth=200, full_table=full_table, job_name_contains=job_name_contains)
def get_jobs_status(self, recursive=True, element_lst=None): """ Gives a overview of all jobs status. Args: recursive (bool): search subprojects [True/False] - default=True element_lst (list): list of elements required in the chemical formular - by default None Returns: prints an overview of the job status. """ df = job_table(database=self.db, sql_query=self.sql_query, user=self.user, project_path=self.project_path, recursive=recursive, all_columns=True, element_lst=element_lst) return df['status'].value_counts()
def job_table(self, recursive=True, columns=None, all_columns=True, sort_by="id", element_lst=None): """ Access the job_table Args: recursive (bool): search subprojects [True/False] - default=True columns (list): by default only the columns ['job', 'project', 'chemicalformula'] are selected, but the user can select a subset of ['id', 'status', 'chemicalformula', 'job', 'subjob', 'project', 'projectpath', 'timestart', 'timestop', 'totalcputime', 'computer', 'hamilton', 'hamversion', 'parentid', 'masterid'] all_columns (bool): Select all columns - this overwrites the columns option. sort_by (str): Sort by a specific column element_lst (list): list of elements required in the chemical formular - by default None Returns: pandas.Dataframe: Return the result as a pandas.Dataframe object """ return job_table(database=self.db, sql_query=self.sql_query, user=self.user, project_path=self.project_path, recursive=recursive, columns=columns, all_columns=all_columns, sort_by=sort_by, element_lst=element_lst)