gwpopulation_pipe.data_collection.convert_arg_to_dict

convert_arg_to_dict(arg)[source]

Convert a string argument to a dictionary. Not in-place. gwpopulation_pipe strips quotes from the regex string, so we need to add them back in, this assumes that there are no internal braces and spaces after all ‘:’ and ‘,’ delimiting entries.

Parameters:
arg: str

Arg that should be converted to a dictionary.

Returns:
arg_dict: dict

Dictionary representation of the input string.