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

Sort html report in descending order of work needed #246

Open
nedbat opened this issue Jun 30, 2013 · 1 comment
Open

Sort html report in descending order of work needed #246

nedbat opened this issue Jun 30, 2013 · 1 comment
Labels
enhancement New feature or request html

Comments

@nedbat
Copy link
Owner

nedbat commented Jun 30, 2013

Originally reported by Jonas Kölker (Bitbucket: jonaskoelker, GitHub: jonaskoelker)


99% of what I use python-coverage for is something like this:

  1. Run my test suite and generate a report
  2. Look at the report to see which module needs more work (~= is least covered)

I suspect this use case is very common. When you click on a table header, it's fair to assume that your gaze is somewhere very close to the table header. If the next thing you want to see appears right next to the table header, you save the extra step of either scrolling to the bottom of the page or clicking again. That means the default sort orders would need to be:

  • missing: largest to smallest
  • partial: largest to smallest:
  • coverage: smallest to largest
  • excluded: largest to smallest (not exactly "work needed", but perhaps "suspicious")
  • statements: largest to smallest, just for symmetry with missing and excluded
  • branches: largest to smallest, just for symmetry with partial

(TL;DR: coverage ascending, the rest descending)

At least in 3.4, everything is sorted ascendingly, so everything except for coverage should be inverted. Of course, if you add column sorters to the bottom of the table and want to optimize the gaze proximity of the last action and the next action---column sorter and work-needy row(s)---you want the bottom defaults to be the inverse of the top defaults.


@nedbat nedbat added minor enhancement New feature or request html labels Jun 23, 2018
@nedbat nedbat removed the 3.4 label Aug 17, 2018
@nedbat nedbat removed the minor label Jan 18, 2020
@ProsperousHeart
Copy link
Contributor

This seems like it may be related to #141 and #116 ... have any of these been addressed already since they are so much older @nedbat ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request html
Projects
None yet
Development

No branches or pull requests

2 participants