ewokscore.taskwithprogress.TaskWithProgress

class ewokscore.taskwithprogress.TaskWithProgress(*args, **kw)[source]

Bases: Task

Task within a progress to display task advancement

MISSING_DATA = <MISSING_DATA>
assert_ready_to_execute()
classmethod class_nonce()
classmethod class_nonce_data()
classmethod class_registry_name()
Return type:

Optional[str]

cleanup_references()

Removes all references to the inputs. Side effect: fixes the uhash of the task and outputs

property done

Completed (with or without exception)

property exception
execute(force_rerun=False, raise_on_error=True, cleanup_references=False)
Parameters:
  • force_rerun (Optional[bool]) –

  • raise_on_error (Optional[bool]) –

  • cleanup_references (Optional[bool]) –

property failed

Completed with exception

fix_uhash()

Fix the uhash when it is derived from the uhash data.

get_input_value(key, default=<MISSING_DATA>)
get_output_value(key, default=<MISSING_DATA>)
classmethod get_subclass(registry_name, _second_attempt=False)

Retrieving a derived class

classmethod get_subclass_names()
Return type:

List[str]

classmethod get_subclasses()
get_uhash_init(serialize=False)
classmethod input_names()
property input_uhashes
property input_values
property input_variables
property inputs
instance_nonce()
classmethod instantiate(registry_name, **kw)

Factory method for instantiating a derived class.

Parameters:
  • registry_name (str) – for example “tasklib.tasks.MyTask” or “MyTask”

  • **kw

    Task constructor arguments

  • registry_name

Returns Task:

property is_ready_to_execute
property job_id: str | None
property label
property missing_inputs
property missing_outputs
property named_input_values
property node_id
property npositional_inputs
classmethod optional_input_names()
property output_metadata: dict | None
classmethod output_names()
property output_transfer_data

The values are either DataUri or Variable

property output_uhashes
property output_values
property output_variables
property outputs
property positional_input_values
property progress: int | None

Task advancement. If a task progress is not provided then return None

classmethod required_input_names()
run()

To be implemented by the derived classes

set_uhash_init(pre_uhash=None, instance_nonce=None)
Parameters:
property succeeded

Completed without exception and with output values

property uhash: UniversalHash | None
uhash_randomize()
undo_fix_uhash()
undo_randomize()
property workflow_id: str | None