Module eoap_cwlwrap
EOAP CWLWrap is a command-line utility that composes a CWL Workflow
from a series of Workflow
/CommandLineTool
steps, defined according to Application package patterns based on data stage-in and stage-out behaviors commonly used in EO workflows, and packs it into a single self-contained CWL document.
EOAP CWLWrap (c) 2025
EOAP CWLWrap is licensed under Creative Commons Attribution-ShareAlike 4.0 International.
You should have received a copy of the license along with this work. If not, see https://creativecommons.org/licenses/by-sa/4.0/.
Sub-modules
Variables
URL_SCHEMA
Functions
wrap
def wrap(
workflows: Union[cwl_utils.parser.cwl_v1_0.Workflow, cwl_utils.parser.cwl_v1_1.Workflow, cwl_utils.parser.cwl_v1_2.Workflow, cwl_utils.parser.cwl_v1_0.CommandLineTool, cwl_utils.parser.cwl_v1_1.CommandLineTool, cwl_utils.parser.cwl_v1_2.CommandLineTool, cwl_utils.parser.cwl_v1_0.ExpressionTool, cwl_utils.parser.cwl_v1_1.ExpressionTool, cwl_utils.parser.cwl_v1_2.ExpressionTool, cwl_utils.parser.cwl_v1_2.Operation, List[Union[cwl_utils.parser.cwl_v1_0.Workflow, cwl_utils.parser.cwl_v1_1.Workflow, cwl_utils.parser.cwl_v1_2.Workflow, cwl_utils.parser.cwl_v1_0.CommandLineTool, cwl_utils.parser.cwl_v1_1.CommandLineTool, cwl_utils.parser.cwl_v1_2.CommandLineTool, cwl_utils.parser.cwl_v1_0.ExpressionTool, cwl_utils.parser.cwl_v1_1.ExpressionTool, cwl_utils.parser.cwl_v1_2.ExpressionTool, cwl_utils.parser.cwl_v1_2.Operation]]],
workflow_id: str,
stage_out: Union[cwl_utils.parser.cwl_v1_0.Workflow, cwl_utils.parser.cwl_v1_1.Workflow, cwl_utils.parser.cwl_v1_2.Workflow, cwl_utils.parser.cwl_v1_0.CommandLineTool, cwl_utils.parser.cwl_v1_1.CommandLineTool, cwl_utils.parser.cwl_v1_2.CommandLineTool, cwl_utils.parser.cwl_v1_0.ExpressionTool, cwl_utils.parser.cwl_v1_1.ExpressionTool, cwl_utils.parser.cwl_v1_2.ExpressionTool, cwl_utils.parser.cwl_v1_2.Operation],
directory_stage_in: Union[cwl_utils.parser.cwl_v1_0.Workflow, cwl_utils.parser.cwl_v1_1.Workflow, cwl_utils.parser.cwl_v1_2.Workflow, cwl_utils.parser.cwl_v1_0.CommandLineTool, cwl_utils.parser.cwl_v1_1.CommandLineTool, cwl_utils.parser.cwl_v1_2.CommandLineTool, cwl_utils.parser.cwl_v1_0.ExpressionTool, cwl_utils.parser.cwl_v1_1.ExpressionTool, cwl_utils.parser.cwl_v1_2.ExpressionTool, cwl_utils.parser.cwl_v1_2.Operation, NoneType] = None,
file_stage_in: Union[cwl_utils.parser.cwl_v1_0.Workflow, cwl_utils.parser.cwl_v1_1.Workflow, cwl_utils.parser.cwl_v1_2.Workflow, cwl_utils.parser.cwl_v1_0.CommandLineTool, cwl_utils.parser.cwl_v1_1.CommandLineTool, cwl_utils.parser.cwl_v1_2.CommandLineTool, cwl_utils.parser.cwl_v1_0.ExpressionTool, cwl_utils.parser.cwl_v1_1.ExpressionTool, cwl_utils.parser.cwl_v1_2.ExpressionTool, cwl_utils.parser.cwl_v1_2.Operation, NoneType] = None
) -> List[Union[cwl_utils.parser.cwl_v1_0.Workflow, cwl_utils.parser.cwl_v1_1.Workflow, cwl_utils.parser.cwl_v1_2.Workflow, cwl_utils.parser.cwl_v1_0.CommandLineTool, cwl_utils.parser.cwl_v1_1.CommandLineTool, cwl_utils.parser.cwl_v1_2.CommandLineTool, cwl_utils.parser.cwl_v1_0.ExpressionTool, cwl_utils.parser.cwl_v1_1.ExpressionTool, cwl_utils.parser.cwl_v1_2.ExpressionTool, cwl_utils.parser.cwl_v1_2.Operation]]
Composes a CWL Workflow
from a series of Workflow
/CommandLineTool
steps, defined according to Application package patterns based on data stage-in and stage-out behaviors commonly used in EO workflows, and packs it into a single self-contained CWL document.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workflows |
Process | List[Process] |
The CWL document object model (or models, if the CWl is a $graph ) |
None |
workflow_id |
str |
ID of the workflow | None |
stage_out |
Workflow |
The CWL stage-out document object model | None |
directory_stage_in |
Optional[Workflow] |
The CWL stage-in file for Directory derived types |
None |
file_stage_in |
Optional[Workflow] |
The CWL stage-in file for File derived types |
None |
Returns:
Type | Description |
---|---|
list[Workflow] |
The composed CWL $graph . |
wrap_locations
def wrap_locations(
workflows: str,
workflow_id: str,
stage_out: str,
directory_stage_in: Optional[str] = None,
file_stage_in: Optional[str] = None
) -> List[Union[cwl_utils.parser.cwl_v1_0.Workflow, cwl_utils.parser.cwl_v1_1.Workflow, cwl_utils.parser.cwl_v1_2.Workflow, cwl_utils.parser.cwl_v1_0.CommandLineTool, cwl_utils.parser.cwl_v1_1.CommandLineTool, cwl_utils.parser.cwl_v1_2.CommandLineTool, cwl_utils.parser.cwl_v1_0.ExpressionTool, cwl_utils.parser.cwl_v1_1.ExpressionTool, cwl_utils.parser.cwl_v1_2.ExpressionTool, cwl_utils.parser.cwl_v1_2.Operation]]
Composes a CWL Workflow
from a series of Workflow
/CommandLineTool
steps, defined according to Application package patterns based on data stage-in and stage-out behaviors commonly used in EO workflows, and packs it into a single self-contained CWL document.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workflows |
str |
The CWL document object model (or models, if the CWl is a $graph ) |
None |
workflow_id |
str |
ID of the workflow | None |
stage_out |
str |
The CWL stage-out document object model | None |
directory_stage_in |
Optional[str] |
The CWL stage-in file for Directory derived types |
None |
file_stage_in |
Optional[str] |
The CWL stage-in file for File derived types |
None |
Returns:
Type | Description |
---|---|
List[Process] |
The composed CWL $graph . |
wrap_raw
def wrap_raw(
workflows: Mapping[str, Any],
workflow_id: str,
stage_out: Mapping[str, Any],
directory_stage_in: Optional[Mapping[str, Any]] = None,
file_stage_in: Optional[Mapping[str, Any]] = None
) -> List[Union[cwl_utils.parser.cwl_v1_0.Workflow, cwl_utils.parser.cwl_v1_1.Workflow, cwl_utils.parser.cwl_v1_2.Workflow, cwl_utils.parser.cwl_v1_0.CommandLineTool, cwl_utils.parser.cwl_v1_1.CommandLineTool, cwl_utils.parser.cwl_v1_2.CommandLineTool, cwl_utils.parser.cwl_v1_0.ExpressionTool, cwl_utils.parser.cwl_v1_1.ExpressionTool, cwl_utils.parser.cwl_v1_2.ExpressionTool, cwl_utils.parser.cwl_v1_2.Operation]]
Composes a CWL Workflow
from a series of Workflow
/CommandLineTool
steps, defined according to Application package patterns based on data stage-in and stage-out behaviors commonly used in EO workflows, and packs it into a single self-contained CWL document.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workflows |
Mapping[str, Any] |
The CWL document object model (or models, if the CWl is a $graph ) |
None |
workflow_id |
str |
ID of the workflow | None |
stage_out |
Mapping[str, Any] |
The CWL stage-out document object model | None |
directory_stage_in |
Optional[Mapping[str, Any]] |
The CWL stage-in file for Directory derived types |
None |
file_stage_in |
Optional[Mapping[str, Any]] |
The CWL stage-in file for File derived types |
None |
Returns:
Type | Description |
---|---|
List[Process] |
The composed CWL $graph . |