Module eoap_cwlwrap.types
Variables
URL_SCHEMA
URL_TYPE
Functions
get_assignable_type
def get_assignable_type(
actual: Any,
expected: Any
) -> Any
is_array_type
def is_array_type(
typ: Any
) -> bool
Detects if the actual type can be assignable to array type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
typ |
Any |
Any CWL type | None |
Returns:
| Type | Description |
|---|---|
bool |
True, if the input type can be assignable to the array type, False otherwise. |
is_directory_compatible_type
def is_directory_compatible_type(
typ: Any
) -> bool
Detects if the actual type can be assignable to Directory type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
typ |
Any |
Any CWL type | None |
Returns:
| Type | Description |
|---|---|
bool |
True, if the input type can be assignable to the Directory type, False otherwise. |
is_directory_or_file_compatible_type
def is_directory_or_file_compatible_type(
typ: Any
) -> bool
Detects if the actual type can be assignable to Directory or File types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
typ |
Any |
Any CWL type | None |
Returns:
| Type | Description |
|---|---|
bool |
True, if the input type can be assignable to the Directory or File types, False otherwise. |
is_file_compatible_type
def is_file_compatible_type(
typ: Any
) -> bool
Detects if the actual type can be assignable to File type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
typ |
Any |
Any CWL type | None |
Returns:
| Type | Description |
|---|---|
bool |
True, if the input type can be assignable to the File type, False otherwise. |
is_nullable
def is_nullable(
typ: Any
) -> bool
Detects if the input type can be nullable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
typ |
Any |
Any CWL type | None |
Returns:
| Type | Description |
|---|---|
bool |
True, if the input type can be nullable, False otherwise. |
is_type_assignable_to
def is_type_assignable_to(
actual: Any,
expected: Any
) -> bool
Detects if the actual type can be assignable to the expected type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
actual |
Any |
Any CWL type | None |
actual |
expected |
Any CWL type | None |
Returns:
| Type | Description |
|---|---|
bool |
True, if the actual type can be assignable to the expected type, False otherwise. |
is_uri_compatible_type
def is_uri_compatible_type(
typ: Any
) -> bool
Detects if the actual type can be assignable to https://raw.githubusercontent.com/eoap/schemas/refs/heads/main/string_format.yaml#URI type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
typ |
Any |
Any CWL type | None |
Returns:
| Type | Description |
|---|---|
bool |
True, if the input type can be assignable to https://raw.githubusercontent.com/eoap/schemas/refs/heads/main/string_format.yaml#URI type, False otherwise. |
replace_directory_with_url
def replace_directory_with_url(
typ: Any
) -> Any
Deep replaces the Directory type in the source type with the https://raw.githubusercontent.com/eoap/schemas/refs/heads/main/string_format.yaml#URI type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
typ |
Any |
Any CWL type | None |
Returns:
| Type | Description |
|---|---|
Any |
The new type. |
replace_type_with_url
def replace_type_with_url(
source: Any,
to_be_replaced: Any
) -> Any
Deep replaces any CWL type in the source type with the https://raw.githubusercontent.com/eoap/schemas/refs/heads/main/string_format.yaml#URI type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source |
Any |
Any CWL type | None |
to_be_replaced |
Any |
The CWL type that has to be replaced | None |
Returns:
| Type | Description |
|---|---|
Any |
The new type. |
type_to_string
def type_to_string(
typ: Any
) -> str
Serializes a CWL type to a human-readable string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
typ |
Any |
Any CWL type | None |
Returns:
| Type | Description |
|---|---|
str |
The human-readable string representing the input CWL type. |
validate_directory_stage_in
def validate_directory_stage_in(
directory_stage_in: 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
)
Checks if a CWL stage-in document is a URI-compatible input and Directory-compatible output Process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
directory_stage_in |
Process |
Any CWL Process |
None |
Returns:
| Type | Description |
|---|---|
None |
none. |
validate_file_stage_in
def validate_file_stage_in(
file_stage_in: 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
)
Checks if a CWL stage-in document is a URI-compatible input and File-compatible output Process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_stage_in |
Process |
Any CWL Process |
None |
Returns:
| Type | Description |
|---|---|
None |
none. |
validate_stage_out
def validate_stage_out(
stage_out: 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
)
Checks if a CWL stage-out document is a Directory-compatible input and URI-compatible output Process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stage_out |
Process |
Any CWL Process |
None |
Returns:
| Type | Description |
|---|---|
None |
none. |