queenbee.io.inputs.dag module

Queenbee input types for a DAG.

class queenbee.io.inputs.dag.DAGArrayInput(*, type: ConstrainedStrValue = 'DAGArrayInput', annotations: Dict[str, Any] = None, name: str, description: str = None, default: List = None, alias: List[Union[DAGGenericInputAlias, DAGStringInputAlias, DAGIntegerInputAlias, DAGNumberInputAlias, DAGBooleanInputAlias, DAGFolderInputAlias, DAGFileInputAlias, DAGPathInputAlias, DAGArrayInputAlias, DAGJSONObjectInputAlias, DAGLinkedInputAlias]] = None, required: bool = False, spec: Dict = None, items_type: ItemType = ItemType.String)[source]

Bases: DAGGenericInput

A JSON array input.

You can add additional validation by defining a JSONSchema specification.

See http://json-schema.org/understanding-json-schema/reference/array.html for more information.

default: List
items_type: ItemType
classmethod replace_none_value(v)[source]
type: ConstrainedStrValue
validate_spec(value)[source]

Validate an input value against specification.

Use this for validating workflow inputs against a recipe.

class queenbee.io.inputs.dag.DAGBooleanInput(*, type: ConstrainedStrValue = 'DAGBooleanInput', annotations: Dict[str, Any] = None, name: str, description: str = None, default: bool = None, alias: List[Union[DAGGenericInputAlias, DAGStringInputAlias, DAGIntegerInputAlias, DAGNumberInputAlias, DAGBooleanInputAlias, DAGFolderInputAlias, DAGFileInputAlias, DAGPathInputAlias, DAGArrayInputAlias, DAGJSONObjectInputAlias, DAGLinkedInputAlias]] = None, required: bool = False, spec: Dict = None)[source]

Bases: DAGGenericInput

The boolean type matches only two special values: True and False.

Note that values that evaluate to true or false, such as 1 and 0, are not accepted.

You can add additional validation by defining a JSONSchema specification.

See http://json-schema.org/understanding-json-schema/reference/boolean.html for more information.

default: bool
type: ConstrainedStrValue
validate_spec(value)[source]

Validate an input value against specification.

Use this for validating workflow inputs against a recipe.

class queenbee.io.inputs.dag.DAGFileInput(*, type: ConstrainedStrValue = 'DAGFileInput', annotations: Dict[str, Any] = None, name: str, description: str = None, default: Union[HTTP, S3, ProjectFolder] = None, alias: List[Union[DAGGenericInputAlias, DAGStringInputAlias, DAGIntegerInputAlias, DAGNumberInputAlias, DAGBooleanInputAlias, DAGFolderInputAlias, DAGFileInputAlias, DAGPathInputAlias, DAGArrayInputAlias, DAGJSONObjectInputAlias, DAGLinkedInputAlias]] = None, required: bool = False, spec: Dict = None, extensions: List[str] = None)[source]

Bases: DAGFolderInput

A file input.

File is a special string input. Unlike other string inputs, a file will be copied from its location to execution folder when a workflow is executed.

You can add additional validation by defining a JSONSchema specification.

See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information.

# a file with maximum 50 characters with an ``epw`` extension.

"schema": {
    "type": "string",
    "maxLength": 50,
    "pattern": "(?i)(^.*\.epw$)"
}
extensions: List[str]
type: ConstrainedStrValue
validate_spec(value)[source]

Validate an input value against specification.

Use this for validating workflow inputs against a recipe.

class queenbee.io.inputs.dag.DAGFolderInput(*, type: ConstrainedStrValue = 'DAGFolderInput', annotations: Dict[str, Any] = None, name: str, description: str = None, default: Union[HTTP, S3, ProjectFolder] = None, alias: List[Union[DAGGenericInputAlias, DAGStringInputAlias, DAGIntegerInputAlias, DAGNumberInputAlias, DAGBooleanInputAlias, DAGFolderInputAlias, DAGFileInputAlias, DAGPathInputAlias, DAGArrayInputAlias, DAGJSONObjectInputAlias, DAGLinkedInputAlias]] = None, required: bool = False, spec: Dict = None)[source]

Bases: DAGGenericInput

A folder input.

Folder is a special string input. Unlike other string inputs, a folder will be copied from its location to execution folder when a workflow is executed.

You can add additional validation by defining a JSONSchema specification.

See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information.

"schema": {
    "type": "string",
    "maxLength": 50,
}
classmethod check_alias_required(v)[source]

Overwrite check_alias_required for artifacts.

This will allow None input for aliases for optional artifacts.

classmethod check_required(v)[source]

Overwrite check_required for artifacts to allow optional artifacts.

default: Union[HTTP, S3, ProjectFolder]
property is_artifact
property is_optional

A boolean that indicates if an artifact is optional.

type: ConstrainedStrValue
validate_spec(value)[source]

Validate an input value against specification.

Use this for validating workflow inputs against a recipe.

class queenbee.io.inputs.dag.DAGGenericInput(*, type: ConstrainedStrValue = 'DAGGenericInput', annotations: Dict[str, Any] = None, name: str, description: str = None, default: str = None, alias: List[Union[DAGGenericInputAlias, DAGStringInputAlias, DAGIntegerInputAlias, DAGNumberInputAlias, DAGBooleanInputAlias, DAGFolderInputAlias, DAGFileInputAlias, DAGPathInputAlias, DAGArrayInputAlias, DAGJSONObjectInputAlias, DAGLinkedInputAlias]] = None, required: bool = False, spec: Dict = None)[source]

Bases: GenericInput

Base class for DAG inputs.

This class adds a handler to input to handle the process of loading the input from different graphical interfaces.

alias: List[Union[DAGGenericInputAlias, DAGStringInputAlias, DAGIntegerInputAlias, DAGNumberInputAlias, DAGBooleanInputAlias, DAGFolderInputAlias, DAGFileInputAlias, DAGPathInputAlias, DAGArrayInputAlias, DAGJSONObjectInputAlias, DAGLinkedInputAlias]]
classmethod check_alias_required(v)[source]
classmethod check_required(v, values)[source]

Ensure required is set to True when default value is not provided.

default: str
required: bool
spec: Dict
type: ConstrainedStrValue
classmethod validate_default_refs(v, values)[source]

Validate referenced variables in the command

classmethod validate_default_value(v, values)[source]

Validate default value against spec if provided.

validate_spec(value)[source]

Validate an input value against specification.

Use this for validating workflow inputs against a recipe.

class queenbee.io.inputs.dag.DAGIntegerInput(*, type: ConstrainedStrValue = 'DAGIntegerInput', annotations: Dict[str, Any] = None, name: str, description: str = None, default: int = None, alias: List[Union[DAGGenericInputAlias, DAGStringInputAlias, DAGIntegerInputAlias, DAGNumberInputAlias, DAGBooleanInputAlias, DAGFolderInputAlias, DAGFileInputAlias, DAGPathInputAlias, DAGArrayInputAlias, DAGJSONObjectInputAlias, DAGLinkedInputAlias]] = None, required: bool = False, spec: Dict = None)[source]

Bases: DAGGenericInput

An integer input.

You can add additional validation by defining a JSONSchema specification.

See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information.

default: int
type: ConstrainedStrValue
validate_spec(value)[source]

Validate an input value against specification.

Use this for validating workflow inputs against a recipe.

class queenbee.io.inputs.dag.DAGJSONObjectInput(*, type: ConstrainedStrValue = 'DAGJSONObjectInput', annotations: Dict[str, Any] = None, name: str, description: str = None, default: Dict = None, alias: List[Union[DAGGenericInputAlias, DAGStringInputAlias, DAGIntegerInputAlias, DAGNumberInputAlias, DAGBooleanInputAlias, DAGFolderInputAlias, DAGFileInputAlias, DAGPathInputAlias, DAGArrayInputAlias, DAGJSONObjectInputAlias, DAGLinkedInputAlias]] = None, required: bool = False, spec: Dict = None)[source]

Bases: DAGGenericInput

A JSON object input.

JSON objects are similar to Python dictionaries.

You can add additional validation by defining a JSONSchema specification.

See http://json-schema.org/understanding-json-schema/reference/object.html for more information.

default: Dict
classmethod replace_none_value(v)[source]
type: ConstrainedStrValue
validate_spec(value)[source]

Validate an input value against specification.

Use this for validating workflow inputs against a recipe.

class queenbee.io.inputs.dag.DAGNumberInput(*, type: ConstrainedStrValue = 'DAGNumberInput', annotations: Dict[str, Any] = None, name: str, description: str = None, default: float = None, alias: List[Union[DAGGenericInputAlias, DAGStringInputAlias, DAGIntegerInputAlias, DAGNumberInputAlias, DAGBooleanInputAlias, DAGFolderInputAlias, DAGFileInputAlias, DAGPathInputAlias, DAGArrayInputAlias, DAGJSONObjectInputAlias, DAGLinkedInputAlias]] = None, required: bool = False, spec: Dict = None)[source]

Bases: DAGGenericInput

A number input.

You can add additional validation by defining a JSONSchema specification.

See http://json-schema.org/understanding-json-schema/reference/numeric.html#numeric for more information.

default: float
type: ConstrainedStrValue
validate_spec(value)[source]

Validate an input value against specification.

Use this for validating workflow inputs against a recipe.

class queenbee.io.inputs.dag.DAGPathInput(*, type: ConstrainedStrValue = 'DAGPathInput', annotations: Dict[str, Any] = None, name: str, description: str = None, default: Union[HTTP, S3, ProjectFolder] = None, alias: List[Union[DAGGenericInputAlias, DAGStringInputAlias, DAGIntegerInputAlias, DAGNumberInputAlias, DAGBooleanInputAlias, DAGFolderInputAlias, DAGFileInputAlias, DAGPathInputAlias, DAGArrayInputAlias, DAGJSONObjectInputAlias, DAGLinkedInputAlias]] = None, required: bool = False, spec: Dict = None, extensions: List[str] = None)[source]

Bases: DAGFolderInput

A file or a folder input.

Use this input only in cases that the input can be either a file or folder. For file or folder-only inputs see File and Folder.

Path is a special string input. Unlike other string inputs, a path will be copied from its location to execution folder when a workflow is executed.

You can add additional validation by defining a JSONSchema specification.

See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information.

# a file with maximum 50 characters with an ``epw`` extension.

"schema": {
    "type": "string",
    "maxLength": 50,
    "pattern": "(?i)(^.*\.epw$)"
}
extensions: List[str]
type: ConstrainedStrValue
validate_spec(value)[source]

Validate an input value against specification.

Use this for validating workflow inputs against a recipe.

class queenbee.io.inputs.dag.DAGStringInput(*, type: ConstrainedStrValue = 'DAGStringInput', annotations: Dict[str, Any] = None, name: str, description: str = None, default: str = None, alias: List[Union[DAGGenericInputAlias, DAGStringInputAlias, DAGIntegerInputAlias, DAGNumberInputAlias, DAGBooleanInputAlias, DAGFolderInputAlias, DAGFileInputAlias, DAGPathInputAlias, DAGArrayInputAlias, DAGJSONObjectInputAlias, DAGLinkedInputAlias]] = None, required: bool = False, spec: Dict = None)[source]

Bases: DAGGenericInput

A String input.

You can add additional validation by defining a JSONSchema specification.

See http://json-schema.org/understanding-json-schema/reference/string.html#string for more information.

"schema": {
    "type": "string",
    "maxLength": 50,
    "pattern": "(?i)(^.*\.epw$)"
}
default: str
type: ConstrainedStrValue
validate_spec(value)[source]

Validate an input value against specification.

Use this for validating workflow inputs against a recipe.