pcvs.converter.yaml_converter module
- pcvs.converter.yaml_converter.check_if_key_matches(key, value, ref_array)[source]
list all matches for the current key in the new YAML description.
- Return type:
- pcvs.converter.yaml_converter.compute_new_key(k, v, m)[source]
replace in ‘k’ any pattern found in ‘m’. ‘k’ is a string with placeholders, while ‘m’ is a match result with groups named after placeholders. This function will also expand the placeholder if ‘call:’ token is used to execute python code on the fly (complex transformation)
- Return type:
- pcvs.converter.yaml_converter.flatten(dd, prefix='')[source]
make the n-depth dict ‘dd’ a “flat” version, where the successive keys are chained in a tuple. for instance: {‘a’: {‘b’: {‘c’: value}}} –> {(‘a’, ‘b’, ‘c’): value}
- Return type:
- pcvs.converter.yaml_converter.print_version(ctx, param, value)[source]
print converter version number, tied to PCVS version number
- Return type:
- pcvs.converter.yaml_converter.process(data, ref_array=None, warn_if_missing=True)[source]
Process YAML dict ‘data’ and return a transformed dict
- Return type:
- pcvs.converter.yaml_converter.process_modifiers(data)[source]
applies rules in-place for the data dict. Rules are present in the desc_dict[‘first’] sub-dict.
- pcvs.converter.yaml_converter.replace_placeholder(tmp, refs)[source]
The given TMP should be a dict, where keys contain placeholders, wrapped with “<>”. Each placeholder will be replaced (i.e. key will be changed) by the associated value in refs.
- Return type: