ertk.config.get_arg_mapping

ertk.config.get_arg_mapping(s: Path | str) Dict[str, str]

Given a mapping on the command-line, returns a dict representing that mapping. Mapping can be a string or a more complex YAML file.

The string form of the mapping is:

key:value[,key:value]+

Parameters:
s: PathLike or str

String representing the mapping or path to YAML containing mapping. If a string, it cannot contain spaces or shell symbols (unless escaped).

Returns:
dict

A dictionary mapping keys to values from the string.