The current routines for catching input parameters is not very robust. If given a default, the routine will attempt to cast all inputs as the type of the default. Issues arise when the default is NoneType
, whereby the user is trusted to supply correct input. It may be better to pass both an expected type, while allowing the default to remain NoneType
if that is a valid option.
The catch_list
routine is also finicky, particularly for lists of lists. This routine should be able to throw an error if the given list (and sublists) is not the correct size. Assigning defaults should also be improved.
Additionally, if the parameter has no default and is not provided by the user, then it throws an KeyError
. This is easy enough to recognize and correct, but it would be more helpful to have a routine that explains the issue in plain language with specific steps to correct the issue.
The routine for catching inlet/outlet parameters can also be improved/eliminated.