Localscriptadapter
Local interface implementation.
LocalScriptAdapter
Bases: ScriptAdapter
A ScriptAdapter class for interfacing for local execution.
Source code in maestrowf/interfaces/script/localscriptadapter.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
|
__init__(**kwargs)
Initialize an instance of the LocalScriptAdapter.
The LocalScriptAdapter is the adapter that is used for workflows that will execute on the user's machine. The only configurable aspect to this adapter is the shell that scripts are executed in.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs |
A dictionary with default settings for the adapter. |
{}
|
Source code in maestrowf/interfaces/script/localscriptadapter.py
cancel_jobs(joblist)
For the given job list, cancel each job.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
joblist |
A list of job identifiers to be cancelled. |
required |
Returns:
Type | Description |
---|---|
The return code to indicate if jobs were cancelled. |
Source code in maestrowf/interfaces/script/localscriptadapter.py
check_jobs(joblist)
For the given job list, query execution status.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
joblist |
A list of job identifiers to be queried. |
required |
Returns:
Type | Description |
---|---|
The return code of the status query, and a dictionary of job identifiers to their status. |
Source code in maestrowf/interfaces/script/localscriptadapter.py
submit(step, path, cwd, job_map=None, env=None)
Execute the step locally.
If cwd is specified, the submit method will operate outside of the path specified by the 'cwd' parameter. If env is specified, the submit method will set the environment variables for submission to the specified values. The 'env' parameter should be a dictionary of environment variables.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
step |
An instance of a StudyStep. |
required | |
path |
Path to the script to be executed. |
required | |
cwd |
Path to the current working directory. |
required | |
job_map |
A map of workflow step names to their job identifiers. |
None
|
|
env |
A dict containing a modified environment for execution. |
None
|
Returns:
Type | Description |
---|---|
The return code of the submission command and job identiifer. |