hpcflow.sdk.submission.shells.base.Shell#

class hpcflow.sdk.submission.shells.base.Shell(executable=None, os_args=None)#

Bases: ABC

Class to represent a shell and templates for jobscript composition.

This class represents a combination of a shell and an OS. For example, running bash on a POSIX OS, and provides snippets that are used to compose a jobscript for that combination.

Parameters:
  • executable (str) – Which executable implements the shell.

  • os_args – Arguments to pass to the shell.

Methods

get_direct_submit_command

Get the command for submitting a non-scheduled jobscript.

get_version_info

Get shell and operating system information.

get_wait_command

Get the command to wait for a workflow.

prepare_JS_path

Prepare the jobscript path for use.

prepare_element_run_dirs

Prepare the element run directory names for use.

process_JS_header_args

Process the application invocation key in the jobscript header arguments.

process_app_invoc_executable

Perform any post-processing of an application invocation command name.

Attributes

executable

The executable to use plus any mandatory arguments.

shebang_executable

The executable to use in a shebang line.

property executable: List[str]#

The executable to use plus any mandatory arguments.

get_direct_submit_command(js_path)#

Get the command for submitting a non-scheduled jobscript.

Return type:

List[str]

abstract get_version_info(exclude_os=False)#

Get shell and operating system information.

Parameters:

exclude_os (bool | None) –

Return type:

Dict

get_wait_command(workflow_app_alias, sub_idx, deps)#

Get the command to wait for a workflow.

Parameters:
  • workflow_app_alias (str) –

  • sub_idx (int) –

  • deps (Dict) –

prepare_JS_path(js_path)#

Prepare the jobscript path for use.

Parameters:

js_path (Path) –

Return type:

str

prepare_element_run_dirs(run_dirs)#

Prepare the element run directory names for use.

Parameters:

run_dirs (List[List[Path]]) –

Return type:

List[List[str]]

process_JS_header_args(header_args)#

Process the application invocation key in the jobscript header arguments.

Parameters:

header_args (Dict) –

Return type:

Dict

static process_app_invoc_executable(app_invoc_exe)#

Perform any post-processing of an application invocation command name.

property shebang_executable: str#

The executable to use in a shebang line.