ewoksbm29.tasks.base.dahu.DahuJob#

class ewoksbm29.tasks.base.dahu.DahuJob(*args, **kwargs)[source]#

Bases: Task

Ewoks task that runs a Dahu job.

Optional inputs: - dahu_url (str): Tango URL of the Dahu device. - dahu_parameter_file (str): Dahu parameter file path (can be relative to config_directory). - extra_dahu_parameters (dict): Overwrite Dahu parameters. - config_directory (str): Directory of the Dahu parameter file and other config files. - timeout (float): Timeout waiting for the Dahu job in seconds (Default: 3600). - nobackup (bool): Save in the NOBACKUP directory (Default: False)). - dahu_job_index (int): Dahu job index for ordering results (Default: 0).

Outputs: - dahu_job_index (int): Dahu job index for ordering results. - dahu_job_id (Optional[int]): Dahu job id (None means no Dahu job was executed). - dahu_result (Optional[dict]): Dahu result (None means no Dahu job was executed).

CONFIG_NAME: str = NotImplemented#
DAHU_INPUTS_MODEL: BaseModel = NotImplemented#
DAHU_PLUGIN: str = NotImplemented#
MISSING_DATA = <MISSING_DATA>#
PROCESS_NAME: str = NotImplemented#
assert_ready_to_execute()#
cancel()#

Function called when a task is cancelled. To be implemented by the derived classes

property cancelled: bool#

Return True if the task has been cancelled by the user

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

dahu_parameters_finalize(dahu_parameters)[source]#
Parameters:

dahu_parameters (dict)

Return type:

None

dahu_parameters_initialize()[source]#
Return type:

dict

dahu_parameters_save_path(dahu_parameters)[source]#
Parameters:

dahu_parameters (BaseModel)

Return type:

Optional[str]

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_uhashes()#
get_input_value(key, default=<MISSING_DATA>)#
Parameters:

default (Any)

get_input_values()#
get_named_input_values()#
get_output_transfer_data()#

The values are either DataUri or Variable

get_output_uhashes()#
get_output_value(key, default=<MISSING_DATA>)#
Parameters:

default (Any)

get_output_values()#
get_positional_input_values()#
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_model()#
classmethod input_names()#
property input_uhashes#
property input_values#

DEPRECATED

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”

  • **kwTask 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 n_positional_inputs#
classmethod n_required_positional_inputs()#
property named_input_values#

DEPRECATED

property node_id: str | int | tuple#
property npositional_inputs#

DEPRECATED

classmethod optional_input_names()#
output_filename_from_lima_filename(lima_file_path, extension)[source]#
Parameters:
  • lima_file_path (str)

  • extension (str)

Return type:

str

output_filename_from_output_filename(output_filename, extension)[source]#
Parameters:
  • output_filename (str)

  • extension (str)

Return type:

str

property output_metadata: dict | None#
classmethod output_names()#
property output_transfer_data#

DEPRECATED

property output_uhashes#

DEPRECATED

property output_values#

DEPRECATED

property output_variables#
property outputs#
property positional_input_values#

DEPRECATED

property processed_data_subdir#
classmethod required_input_names()#
reset_state()#
run()[source]#

To be implemented by the derived classes

set_uhash_init(pre_uhash=None, instance_nonce=None)#
Parameters:
  • pre_uhash (Union[str, bytes, UniversalHash, HasUhash, None])

  • instance_nonce (Optional[Any])

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#