OWRank: sort NaNs last; fix sort indicator#2618
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2618 +/- ##
=========================================
+ Coverage 74.99% 75% +<.01%
=========================================
Files 331 331
Lines 58076 58104 +28
=========================================
+ Hits 43555 43581 +26
- Misses 14521 14523 +2 |
|
This looks good. Would you care to check this error, too? orange/orange3/Orange/widgets/settings.py:380: UserWarning: Could not read defaults for widget <class 'Orange.widgets.data.owrank.OWRank'> 'headerState' |
|
Still some comments.
|
|
Fixed.
Sure it's possible. But one may wish to split scores by variable type, or to keep discrete variables with the number of values within a certain threshold. My vote is against. |
| self.ranksModel.wrap(model_array.tolist()) | ||
| self.ranksModel.setHorizontalHeaderLabels(('#',) + labels) | ||
| self.ranksView.setColumnWidth(0, 30) | ||
| self.ranksView.setColumnWidth(0, 40) |
There was a problem hiding this comment.
Yes, but now it looks annoyingly wide. 😆 I'm such a brat. I'll merge this as it is a great solution! 👌
|
Ok, I said I would merge this, but codecov is complaining... |

Issue
Fixes #2617
Description of changes
Always sort NaNs last. Implemented by exposing reimplementable
AbstractSortTableModel._argsortData(). Also fix header indicator by sorting viaview.horizontalHeader().setSortIdicator()instead of its model.Includes