pysqa.wrapper.abstract.SchedulerCommands#
- class pysqa.wrapper.abstract.SchedulerCommands[source]#
Bases:
ABC- __init__()#
Methods
__init__()convert_queue_status(queue_status_output)Converts the output of the queue status command to a pandas DataFrame.
dependencies(dependency_list)Returns the list of dependencies for a job.
get_job_id_from_output(queue_submit_output)Returns the job ID from the output of the job submission command.
render_submission_template(command, ...[, ...])Generate the job submission template.
Attributes
Returns the command to delete a job from the scheduler.
Returns the command to enable job reservation on the scheduler.
Returns the command to get the status of the job queue.
Returns the command to submit a job to the scheduler.
- static convert_queue_status(queue_status_output: str) DataFrame[source]#
Converts the output of the queue status command to a pandas DataFrame.
- Parameters:
queue_status_output (str) – The output of the queue status command.
- Returns:
The queue status as a DataFrame.
- Return type:
pandas.DataFrame
- abstract property delete_job_command: list[str]#
Returns the command to delete a job from the scheduler.
- Returns:
The command to delete a job.
- Return type:
list[str]
- static dependencies(dependency_list: list[str]) list[source]#
Returns the list of dependencies for a job.
- Parameters:
dependency_list (list[str]) – The list of dependencies.
- Returns:
The list of dependencies.
- Return type:
list
- property enable_reservation_command: list[str]#
Returns the command to enable job reservation on the scheduler.
- Returns:
The command to enable job reservation.
- Return type:
list[str]
- static get_job_id_from_output(queue_submit_output: str) int[source]#
Returns the job ID from the output of the job submission command.
- Parameters:
queue_submit_output (str) – The output of the job submission command.
- Returns:
The job ID.
- Return type:
int
- abstract property get_queue_status_command: list[str]#
Returns the command to get the status of the job queue.
- Returns:
The command to get the queue status.
- Return type:
list[str]
- static render_submission_template(command: str, submission_template: str | Template, job_name: str = 'pysqa', working_directory: str = '/home/docs/checkouts/readthedocs.org/user_builds/pysqa/checkouts/latest/docs', cores: int = 1, memory_max: int | str | None = None, run_time_max: int | None = None, dependency_list: list[int] | None = None, **kwargs) str[source]#
Generate the job submission template.
- Parameters:
command (str, optional) – The command to be executed.
job_name (str, optional) – The job name. Defaults to “pysqa”.
working_directory (str, optional) – The working directory. Defaults to “.”.
cores (int, optional) – The number of cores. Defaults to 1.
memory_max (int, optional) – The maximum memory. Defaults to None.
run_time_max (int, optional) – The maximum run time. Defaults to None.
dependency_list (list[int], optional) – The list of dependency job IDs. Defaults to None.
submission_template (str) – Submission script template pysqa.wrapper.torque.template
- Returns:
The rendered job submission template.
- Return type:
str
- abstract property submit_job_command: list[str]#
Returns the command to submit a job to the scheduler.
- Returns:
The command to submit a job.
- Return type:
list[str]