Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid statistics.StatisticsError if rank finds no data (fix #196) #197

Merged
merged 5 commits into from
Jul 12, 2023

Conversation

devdanzin
Copy link
Collaborator

Only calculate mean rank and print results when some data is found by rank(), otherwise print nothing.

This could also be done in a way that prints an empty table with a total of 0, I'm open to doing it that way if it's preferable.

@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2023

Codecov Report

Merging #197 (74c3e55) into master (516a4d0) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #197   +/-   ##
=======================================
  Coverage   95.26%   95.26%           
=======================================
  Files          23       23           
  Lines        1224     1226    +2     
  Branches      275      276    +1     
=======================================
+ Hits         1166     1168    +2     
  Misses         33       33           
  Partials       25       25           
Impacted Files Coverage Δ
src/wily/commands/rank.py 96.42% <100.00%> (+0.13%) ⬆️
src/wily/commands/rank.py Outdated Show resolved Hide resolved
@tonybaloney tonybaloney merged commit 2f59f94 into tonybaloney:master Jul 12, 2023
19 checks passed
@devdanzin devdanzin deleted the avoid_rank_statisticserror branch July 12, 2023 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants