jube.util package¶
jube.util package
Submodules¶
jube.util.output module¶
ASCII and string output generators
- jube.util.output.element_tree_tostring(element, encoding=None)[source]¶
A more encoding friendly ElementTree.tostring method
- jube.util.output.print_loading_bar(current_cnt, all_cnt, wait_cnt=0, error_cnt=0)[source]¶
Show a simple loading animation
- jube.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
jube.util.util module¶
Utility functions, constants and classes
- class jube.util.util.CompType(value)[source]¶
Bases:
object
Allow comparison of different datatypes
- property value¶
- class jube.util.util.Queue[source]¶
Bases:
object
Queue based on collections.dequeue
- jube.util.util.check_and_get_benchmark_outpath()[source]¶
Read environment var JUBE_BENCHMARK_OUTPATH and return outpath
- jube.util.util.check_and_get_group_id()[source]¶
Read environment var JUBE_GROUP_NAME and return group id
- jube.util.util.check_and_get_verbose_level()[source]¶
Read environment var JUBE_VERBOSE and return verbose level
- jube.util.util.convert_type(name, value_type, value, stop=True)[source]¶
Convert value to given type
- jube.util.util.get_current_id(base_dir)[source]¶
Return the highest id found in directory ‘base_dir’.
- jube.util.util.get_tree_element(node, tag_path=None, attribute_dict=None)[source]¶
Can be used instead of node.find(.//tag_path[@attrib=value])
- jube.util.util.get_tree_elements(node, tag_path=None, attribute_dict=None)[source]¶
Can be used instead of node.findall(.//tag_path[@attrib=value])
- jube.util.util.resolve_depend(depend_dict)[source]¶
Generate a serialization of dependent steps.
Return a list with a possible order of execution.
- jube.util.util.safe_split(text, separator)[source]¶
Like split for non-empty separator, list with text otherwise.
- jube.util.util.script_evaluation(cmd, script_type)[source]¶
cmd will be evaluated with given script language
- jube.util.util.substitution(text, substitution_dict)[source]¶
Substitute templates given by parameter_dict inside of text
jube.util.yaml_converter module¶
YAML to XML converter
- class jube.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', 'tags'], '/benchmark': ['benchmark', 'parameterset', 'fileset', 'substituteset', 'patternset', 'selection', 'include-path', 'check_tags', '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'], 'tags': ['check_tags', 'tag']}¶
- static create_headtags(data, parent_node, include_pathes)[source]¶
Search for the headtags in given dictionary