renepickhardt / pickhardtpayments

python package to showcase, test and build your own version of Pickhardt Payments
Apache License 2.0
42 stars 14 forks source link

managend pickhardt_pay verbosity with two optional arguments #17 #21

Open sebulino opened 2 years ago

sebulino commented 2 years ago

currently statistical summaries are printed in pickhardt_pay in each round of payment attempts and in the end. I added two flags to pickhardt_pay method as optional arguments:

_evaluate_attempts will receive the optional argument from pickhardt_pay. My initial thought was to make the whole call of _evaluate_attempts dependent on the verbosity choice in the pickhardt_pay call. However, this would not work, as the pickhardt_pay call needs to receive the return values from _evaluate_attempts for its final summary.

All statistics are printed to console.

renepickhardt commented 2 years ago

While I think this is very much needed I was more thinking of using https://docs.python.org/3/howto/logging.html#logging-basic-tutorial. sorry should have linked this in #17

sebulino commented 2 years ago

The idea is to record the current statistics for payment rounds as well as the final one as logging.info, and any split between round-based statistics and final statistic would then be grepped at one's own discretion afterwards.