devctrl.task.tasks.DebugTask#

class DebugTask(msg: str = 'None')[source]#

Bases: Task

Debug Task, prints a log message

Methods

as_dict

Convenience wrapper for dataclasses.asdict(self)

estimate_runtime_s

from_dict

Recursively construct a SettingsClass from a dictionary.

get_name

Get formatted task name with settings

get_settings_name

Return relevant settings as a formatted string for GUI display

get_type_name

Return the human-readable name of the task.

load_yaml

save_yaml

Attributes

msg

as_dict() dict#

Convenience wrapper for dataclasses.asdict(self)

classmethod from_dict(data: dict)#

Recursively construct a SettingsClass from a dictionary. If the value of a field is another SettingsClass, from_dict will be called for that field as well. Handled are: - SettingsClass - list[SettingsClass] - dict[<any>, SettingsClass] - all of the above as Optional

Raises:
  • ValueError – If data contains a value that has the wrong type for the field of cls (ONLY if the type is a subclass of SettingsClass! Other types are not enforced)

  • KeyError – If data contains a key that is not a field name of cls

get_name()#

Get formatted task name with settings

Returns:

Formatted task name including settings

get_settings_name() str[source]#

Return relevant settings as a formatted string for GUI display

Iterates through task fields and returns a string representation of non-default values that can be used for displaying the task in the GUI.

Returns:

Formatted string of settings, or empty string if no settings differ from defaults

classmethod get_type_name() str#

Return the human-readable name of the task.