:py:mod:`eelib.utils.validation` ================================ .. py:module:: eelib.utils.validation .. autoapi-nested-parse:: Provide a dictionary of type and value validation rules and validate given parameters or print a readable string of the given set of rules. | Author: elenia@TUBS | Copyright 2024 elenia | This file is part of eELib, which is free software under the terms of the GNU GPL Version 3. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: eelib.utils.validation.validate_init_parameters eelib.utils.validation.format_valid_parameters_dictionary .. py:function:: validate_init_parameters(model_class: object, input_param_dict: dict) Validate the type and value of a list of parameters according to a provided dictionary. :param model_class: a class representing a component. This should contain a method get_valid_parameters() that returns a dictionary. :type model_class: object :param input_param_dict: a dictionary of parameter name value pairs to be assessed and validated. :type input_param_dict: dict :raises TypeError: Invalid parameter input types :raises ValueError: Invalid parameter input values .. py:function:: format_valid_parameters_dictionary(valid_parameters: dict) -> str Take the valid parameters dict and transform it into a readable string format to display it. :param valid_parameters: a dictionary representing valid parameter types and values :type valid_parameters: dict :returns: Message string with the collected errors from input validation :rtype: str