pgfinder.utils ============== .. py:module:: pgfinder.utils .. autoapi-nested-parse:: Utilities .. !! processed by numpydoc !! Attributes ---------- .. autoapisummary:: pgfinder.utils.LOGGER Functions --------- .. autoapisummary:: pgfinder.utils.convert_path pgfinder.utils.update_config pgfinder.utils.dict_to_decimal Module Contents --------------- .. py:data:: LOGGER .. py:function:: convert_path(path: Union[str, pathlib.Path]) -> pathlib.Path Ensure path is Path object. :param path: Path to be converted. :type path: Union[str, Path] :returns: pathlib Path :rtype: Path .. !! processed by numpydoc !! .. py:function:: update_config(config: dict, args: Union[dict, argparse.Namespace]) -> Dict Update the configuration with any arguments :param config: Dictionary of configuration (typically read from YAML file specified with '-c/--config ') :type config: dict :param args: Command line arguments :type args: Namespace :returns: Dictionary updated with command arguments. :rtype: Dict .. !! processed by numpydoc !! .. py:function:: dict_to_decimal(dictionary: dict) -> dict Recursively convert any floats in a dictionary to Decimal. :param dictionary: Dictionary to be converted. :type dictionary: dict :returns: Dictionary with floats converted to Decimal :rtype: dict .. !! processed by numpydoc !!