json2graph.modules.utils_validations
Functions that performs validations for different functions or parameters used in the software.
Module Contents
Functions
|
Validate the input path received as argument. |
|
Validate the provided execution mode against a list of valid modes. |
- json2graph.modules.utils_validations.validate_arg_input(input_path, decode_all)
Validate the input path received as argument.
- Parameters:
input_path (str) – The path to the input file or directory.
decode_all (bool) – A flag indicating whether to decode all files in the directory.
- Return type:
None
- json2graph.modules.utils_validations.validate_execution_mode(execution_mode)
Validate the provided execution mode against a list of valid modes.
This function validates the given execution mode against a predefined list of valid modes: [“script”, “import”, “test”]. It ensures that the provided mode is one of the accepted values, and if not, raises an error indicating the invalid parameter.
- Parameters:
execution_mode (str) – The execution mode to be validated.