Closed donaldcampbelljr closed 3 months ago
In ~ June 2023, we decided to take values as they were being reported by pipestat, run them through a result_formatting function, append them to a list and then return that list: Major Commit https://github.com/pepkit/pipestat/commit/acf3a545c1fccd012a5ac12e50b79224129417e7
Built-in results formatter (but the user can pass others if they like): https://github.com/pepkit/pipestat/blob/1fe44eb33b353f9b2ea927cd58f604c39e53db54/pipestat/helpers.py#L134-L152
Ok, if you think this is the best way.
I think the return value of the report function should not be a list of strings. It should be some recognition about what was reported that is machine-understandable. There could be a separate function to take that programmatic output and produce a formatted string if that's what someone wants.
generally you want a function to return something that can be used more universally, unless the whole point of the function is just to format a string.
Originally posted by @nsheff in https://github.com/pepkit/pipestat/issues/158#issuecomment-2037611997