dqa.tasks.tasks.Task#

class dqa.tasks.tasks.Task(input_name: str | List[str] | None = None, output_name: str | List[str] | None = None, input_machine: str | List[str] | None = None, output_machine: str | List[str] | None = None, input_dataset: str | List[str] | None = None, output_dataset: str | List[str] | None = None, input_metadata: bool = False, output_metadata: bool = False, logging_level: int = 0)#

Base class for the tasks. In general, a task can modify a dataset dictionary in an arbitrary way and return a new dataset dictionary. By overriding the methods, the data modification can occur on multiple different levels within the data structure.

Parameters:
  • input_name (str or list of strings, default=None) – The names of the input data rows the task should be applied to. Passing a string is equivalent to passing a list with one entry (like the other parameters). If None, then the task will be applied to all data rows.

  • output_name (str or list of strings, default=None) – The names of the output data rows. If None, then this is set equal to input_name.

  • input_machine (str or list of strings, default=None) – The names of the input machines the task should be applied to. If None, it will be applied to all machines.

  • output_machine (str or list of strings, default=None) – The names of the output machines. If None it is set equal to input_machine.

  • input_dataset (str or list of strings, default=None) – Names of the input data sets. Behavior analogous to the previous parameters.

  • output_dataset (str or list of strings, default=None) – Names of the output data sets. Behavior analogous to the previous parameters.

  • input_metadata (bool, default=False) – Indicates if the input data rows should be taken from the ‘metadata’ dictionary in the measurements. Otherwise they are taken from the ‘data’ dictionary.

  • output_metadata (bool, default=False) – Indicates if the output data should be written to the ‘metadata’ dictionary in the measurements. Otherwise it is written to the ‘data’ dictionary.

Methods

finish()

Can perform actions that are required to clean up after the task has finished, e.g. close network connections etc.

in_out_default

input_output_dataset

input_output_machine

input_output_mode

input_output_name

log

modify_data_row

modify_dataset

modify_dataset_dict

modify_machine

modify_measurement

set_logging_level

transfer_metadata