9.2.5. CLI Functions

Provide functions for CLI parser.

junifer.cli.parser.parse_elements(element, config)

Parse elements from cli.

Parameters:
elementtuple of str

The element(s) to operate on.

configdict

The configuration to operate using.

Returns:
list or None

The element(s) as list or None.

Raises:
ValueError

If no element is found either in the command-line options or the configuration file.

Warns:
RuntimeWarning

If elements are specified both via the command-line options and the configuration file.

junifer.cli.parser.parse_yaml(filepath)

Parse YAML.

Parameters:
filepathstr or pathlib.Path

The filepath to read from.

Returns:
dict

The contents represented as dictionary.