conversion

Module: tools.conversion

Type conversion helper functions

Function Summary

python2yaml(value) Conversion function to handle yaml specialties
extract_key_str(full_file[, keyword]) Extract the string which corresponds to the specified YAML key
replace_parameters_and_convert(...) Replace parameters of parameter_setting in node_chain_spec
replace_parameters(node_chain_spec, ...) Replace parameters in string and return this string
eval_string(s)
replace_in_list(list_, replacements)
replace_in_dict(dict_, replacements)
replace_parameters2(node_chain_spec, ...)

Functions

python2yaml()

pySPACE.tools.conversion.python2yaml(value)[source]

Conversion function to handle yaml specialties

extract_key_str()

pySPACE.tools.conversion.extract_key_str(full_file, keyword='node_chain')[source]

Extract the string which corresponds to the specified YAML key

For extraction it is assumed, that a line wise notation is used, which begins with the keyword.

replace_parameters_and_convert()

pySPACE.tools.conversion.replace_parameters_and_convert(node_chain_spec, parameter_setting)[source]

Replace parameters of parameter_setting in node_chain_spec

and return the Python object and not the YAML string.

replace_parameters()

pySPACE.tools.conversion.replace_parameters(node_chain_spec, parameter_setting)[source]

Replace parameters in string and return this string

eval_string()

pySPACE.tools.conversion.eval_string(s)[source]

replace_in_list()

pySPACE.tools.conversion.replace_in_list(list_, replacements)[source]

replace_in_dict()

pySPACE.tools.conversion.replace_in_dict(dict_, replacements)[source]

replace_parameters2()

pySPACE.tools.conversion.replace_parameters2(node_chain_spec, parameter_setting)[source]