-
Notifications
You must be signed in to change notification settings - Fork 285
Improve sorting of data in reports #817
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
Conversation
The option --show-branch now sets the new option --sort-branches.
If sorting by line or branch coverage same values are additional sorted by filename.
38db0ea
to
1454334
Compare
5ca93c3
to
17a7ebd
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #817 +/- ##
==========================================
+ Coverage 95.61% 95.63% +0.02%
==========================================
Files 44 44
Lines 4306 4328 +22
Branches 841 844 +3
==========================================
+ Hits 4117 4139 +22
Misses 111 111
Partials 78 78
☔ View full report in Codecov by Sentry. |
3ee6906
to
a8e6336
Compare
a8e6336
to
697eead
Compare
Patches version: 697eead, branch: With With |
But this is expected because the file name is used as default sorting column.
Is it possible that you also used I think renaming the option to |
123d53c
to
96b73a0
Compare
96b73a0
to
c9a360e
Compare
4fc0444
to
d43a3a7
Compare
d43a3a7
to
d299750
Compare
@ligurio What do you think? Can this be merged or is a change needed? |
This doesn't work for me at all.
Other used options:
Let me remind a goal in the original issue: sort uncovered lines (or branches) by descending order. I have tried all options in different combinations and all of them are not suitable for me and doesn't help to reach a goal. You decided to introduce new options and this makes usage more complicated for users. Take a look a usage with sorting options, it is not trivial to get all of them, some of them are mutual exclusive:
I suggest removing options for separate sorting by branches/lines/functions etc. and left only option sort-by-ascending that will sort by ascending all columns and enable sorting by descending by default. |
In the command line you've the option The default sort order for Both of your screenshots have the same option mentioned and since you'r having the option If you use |
The option is only used for text report. All other formats need to use --sort-branches instead of --branches to sort output by branches.
Default is sorting files with casefold.
29445c9
to
d6e67a9
Compare
But which column shall than be the sorted one? We need following options:
|
@ligurio Any notes from you? |
- Sort file names alpha numerical and with casefold (see https://docs.python.org/3.11/library/stdtypes.html?highlight=str%20casefold#str.casefold) (`file_10.c` comes after `file_0.c`). - Always sort at the end by filename if line or branch coverage is identical for a file. - Add option --sort-branches to sort by branches instead of lines, this is the default if option --txt-branches is used. - Add option --sort-reverse to reverse the sort order.
file_10.c
comes afterfile_0.c
).--sort-branches
to sort by branches instead of lines, this is the default if--branch
is used.--sort-decreasing
to start with the files with lower coverage values.Closes #810