pyiron_base.database.jobtable module

The Jobtable module provides a set of top level functions to interact with the database.

pyiron_base.database.jobtable.get_child_ids(database, sql_query, user, project_path, job_specifier, status=None)

Get the childs for a specific job

Parameters:
  • database (DatabaseAccess) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • job_specifier (str) – name of the master job or the master jobs job ID

  • status (str) – filter childs which match a specific status - None by default

Returns:

list of child IDs

Return type:

list

pyiron_base.database.jobtable.get_job_id(database, sql_query, user, project_path, job_specifier)

get the job_id for job named job_name in the local project path from database

Parameters:
  • database (DatabaseAccess) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • job_specifier (str) – name of the job or job ID

Returns:

job ID of the job

Return type:

int

pyiron_base.database.jobtable.get_job_status(database, sql_query, user, project_path, job_specifier)

Get the status of a particular job

Parameters:
  • database (DatabaseAccess) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • job_specifier (str) – name of the job or job ID

Returns:

job status can be one of the following [‘initialized’, ‘appended’, ‘created’, ‘submitted’, ‘running’,

’aborted’, ‘collect’, ‘suspended’, ‘refresh’, ‘busy’, ‘finished’]

Return type:

str

pyiron_base.database.jobtable.get_job_working_directory(database, sql_query, user, project_path, job_specifier)

Get the working directory of a particular job

Parameters:
  • database (DatabaseAccess) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • job_specifier (str) – name of the job or job ID

Returns:

working directory as absolute path

Return type:

str

pyiron_base.database.jobtable.set_job_status(database, sql_query, user, project_path, job_specifier, status)

Set the status of a particular job

Parameters:
  • database (DatabaseAccess/ FileTable) – Database object

  • sql_query (str) – SQL query to enter a more specific request

  • user (str) – username of the user whoes user space should be searched

  • project_path (str) – root_path - this is in contrast to the project_path in GenericPath

  • job_specifier (str) – name of the job or job ID

  • status (str) – job status can be one of the following [‘initialized’, ‘appended’, ‘created’, ‘submitted’, ‘running’, ‘aborted’, ‘collect’, ‘suspended’, ‘refresh’, ‘busy’, ‘finished’]