jube2.util package¶
jube2.util package
Submodules¶
jube2.util.output module¶
ASCII and string output generators
- jube2.util.output.element_tree_tostring(element, encoding=None)[source]¶
A more encoding friendly ElementTree.tostring method
- jube2.util.output.print_loading_bar(current_cnt, all_cnt, wait_cnt=0, error_cnt=0)[source]¶
Show a simple loading animation
- jube2.util.output.text_table(entries_ext, use_header_line=False, indent=1, align_right=True, auto_linebreak=True, colw=None, style='pretty', separator=None, transpose=False)[source]¶
Create a ASCII based table. entries must contain a list of lists, use_header_line can be used to mark the first entry as title.
Return the ASCII table
jube2.util.util module¶
Utility functions, constants and classes
- class jube2.util.util.CompType(value)[source]¶
Bases:
object
Allow comparison of different datatypes
- property value¶
- class jube2.util.util.Queue[source]¶
Bases:
object
Queue based on collections.dequeue
- jube2.util.util.check_and_get_group_id()[source]¶
Read environment var JUBE_GROUP_NAME and return group id
- jube2.util.util.get_current_id(base_dir)[source]¶
Return the highest id found in directory ‘base_dir’.
- jube2.util.util.get_tree_element(node, tag_path=None, attribute_dict=None)[source]¶
Can be used instead of node.find(.//tag_path[@attrib=value])
- jube2.util.util.get_tree_elements(node, tag_path=None, attribute_dict=None)[source]¶
Can be used instead of node.findall(.//tag_path[@attrib=value])
- jube2.util.util.resolve_depend(depend_dict)[source]¶
Generate a serialization of dependent steps.
Return a list with a possible order of execution.
- jube2.util.util.safe_split(text, separator)[source]¶
Like split for non-empty separator, list with text otherwise.
- jube2.util.util.script_evaluation(cmd, script_type)[source]¶
cmd will be evaluated with given script language
- jube2.util.util.substitution(text, substitution_dict)[source]¶
Substitute templates given by parameter_dict inside of text
jube2.util.yaml_converter module¶
YAML to XML converter
- class jube2.util.yaml_converter.YAML_Converter(path, include_path=None, tags=None)[source]¶
Bases:
object
YAML to XML converter
- allowed_tags = {'/': ['benchmark', 'parameterset', 'comment', 'step', 'fileset', 'substituteset', 'analyser', 'result', 'patternset', 'selection', 'include-path', 'check_tags'], '/benchmark': ['benchmark', 'parameterset', 'fileset', 'substituteset', 'patternset', 'selection', 'include-path', 'check_tags'], 'analyse': ['file'], 'analyser': ['use', 'analyse'], 'benchmark': ['parameterset', 'comment', 'step', 'fileset', 'substituteset', 'analyser', 'result', 'patternset'], 'database': ['key'], 'fileset': ['link', 'copy', 'prepare'], 'include-path': ['path'], 'parameterset': ['parameter'], 'patternset': ['pattern'], 'result': ['use', 'table', 'syslog', 'database'], 'selection': ['not', 'only', 'tag'], 'step': ['use', 'do'], 'substituteset': ['iofile', 'sub'], 'syslog': ['key'], 'table': ['column']}¶
- static create_headtags(data, parent_node, include_pathes)[source]¶
Search for the headtags in given dictionary