tardis.utilities.utils module

tardis.utilities.utils.cmd_option_formatter(options: tardis.utilities.attributedict.AttributeDict, prefix: str, separator: str) str[source]
tardis.utilities.utils.convert_to(value: Any, convert_to_type: Callable[[Any], tardis.utilities.utils.T], default: Any = <object object>) tardis.utilities.utils.T[source]
tardis.utilities.utils.csv_parser()[source]

Parses CSV formatted input

Parameters
  • input_csv (str) – CSV formatted input

  • fieldnames ([List, Tuple]) – corresponding field names

  • delimiter (str) – delimiter between entries

  • replacements (dict) – fields to be replaced

  • skipinitialspace (bool) – ignore whitespace immediately following the delimiter

  • skiptrailingspace (bool) – ignore whitespace at the end of each csv row

tardis.utilities.utils.htcondor_cmd_option_formatter(options: tardis.utilities.attributedict.AttributeDict) str[source]
tardis.utilities.utils.machine_meta_data_translation(machine_meta_data: tardis.utilities.attributedict.AttributeDict, meta_data_translation_mapping: tardis.utilities.attributedict.AttributeDict)[source]

Helper function to translate units of the machine_meta_data to match the units required by the overlay batch system

Parameters
  • machine_meta_data – Machine Meta Data (Cores, Memory, Disk)

  • meta_data_translation_mapping – Map used for the translation of meta data, contains conversion factors

Returns

Converted meta data with units expected by the OBS

Return type

dict

tardis.utilities.utils.submit_cmd_option_formatter(options: tardis.utilities.attributedict.AttributeDict) str[source]