Workflow
Workflow
Define ordered stages without executing their tasks.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Nonempty workflow name used in the run manifest. |
'workflow'
|
Example
Note
All tasks in one stage finish before the next stage starts. No automatic task retry or resume is provided. Use a fresh workspace for each run.
Methods:
| Name | Description |
|---|---|
add |
Append a named stage after all existing stages. |
outputs |
Select artifacts by glob, relative to the job workspace. |
Attributes:
| Name | Type | Description |
|---|---|---|
stages |
tuple[_Stage, ...]
|
Ordered stage definitions as an immutable tuple; inspect, do not modify. |
output_patterns |
tuple[str, ...]
|
Workspace-relative artifact glob patterns selected by |
Attributes
stages
property
Ordered stage definitions as an immutable tuple; inspect, do not modify.
output_patterns
property
Workspace-relative artifact glob patterns selected by outputs().
Methods:
add
Append a named stage after all existing stages.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Unique directory-safe stage name. |
required |
tasks
|
Sequence[Task]
|
Nonempty sequence of Python, Command, or OpenSees tasks. |
required |
parallel
|
bool
|
Start all tasks together rather than sequentially. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
workflow |
Workflow
|
This workflow, for chained calls. |
Raises:
| Type | Description |
|---|---|
ValueError
|
Stage/task names are invalid or duplicated, or tasks is empty. |
TypeError
|
A task type or the parallel flag is invalid. |
Note
A parallel stage must fit its combined core reservations inside the execution capacity. Dependencies belong in separate ordered stages.
outputs
Select artifacts by glob, relative to the job workspace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*patterns
|
str
|
Relative glob patterns without parent traversal or backslashes. |
()
|
Returns:
| Name | Type | Description |
|---|---|---|
workflow |
Workflow
|
This workflow, for chained calls. |
Raises:
| Type | Description |
|---|---|
ValueError
|
A pattern can escape the workspace or is empty. |