For some revisions, like wily's own 9519747, rank finds no data to report. However, in rank() it still tries to calculate the mean for no data, resulting in:
statistics.StatisticsError: mean requires at least one data point
To Reproduce
checkout wily's repo
wily build
wily rank -r 9519747
See traceback ending like above.
Expected behavior
No exception raised and either print nothing, or print an empty table listing a total of 0. Printing nothing is what wily diff does when there are no results. No users should be impacted by not printing, as it just didn't work before.
Screenshots
Printing an empty table with a total of zero looks like this:
╒════════╤═════════════════════════╕
│ File │ Maintainability Index │
╞════════╪═════════════════════════╡
│ Total │ 0 │
╘════════╧═════════════════════════╛
Desktop (please complete the following information):
For some revisions, like wily's own
9519747
, rank finds no data to report. However, inrank()
it still tries to calculate the mean for no data, resulting in:statistics.StatisticsError: mean requires at least one data point
To Reproduce
wily build
wily rank -r 9519747
Expected behavior No exception raised and either print nothing, or print an empty table listing a total of 0. Printing nothing is what
wily diff
does when there are no results. No users should be impacted by not printing, as it just didn't work before.Screenshots Printing an empty table with a total of zero looks like this:
Desktop (please complete the following information):
I'll submit a PR for the "prints nothing" option.