pgfinder.utils
Utilities
Module Contents
Functions
|
Ensure path is Path object. |
|
Update the configuration with any arguments |
|
Recursively convert any floats in a dictionary to Decimal. |
Attributes
- pgfinder.utils.LOGGER
- pgfinder.utils.convert_path(path: str | pathlib.Path) pathlib.Path [source]
Ensure path is Path object.
- Parameters:
path (Union[str, Path]) – Path to be converted.
- Returns:
pathlib Path
- Return type:
Path
- pgfinder.utils.update_config(config: dict, args: dict | argparse.Namespace) Dict [source]
Update the configuration with any arguments
- Parameters:
config (dict) – Dictionary of configuration (typically read from YAML file specified with ‘-c/–config <filename>’)
args (Namespace) – Command line arguments
- Returns:
Dictionary updated with command arguments.
- Return type:
Dict