1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

Improved delta values to support non-numerical values

Delta values now work for non-numerical values. Any column,
when its value differs from its ref, becomes orange.

A column that was already a "delta column" keeps its previous
behavior (dupe cells for these columns are always displayed in
orange).

Sorting behavior, when Dupes Only and Delta Values are enabled
at the same time, has also been extended to non-numerical
values, making it easy to mass-mark dupe rows with orange
values.

Documentation was updated, unit tests were added.

Fixes #213
This commit is contained in:
Virgil Dupras
2013-07-28 17:45:23 -04:00
parent 386a5f2c64
commit b11b97dd7c
15 changed files with 127 additions and 42 deletions

View File

@@ -62,15 +62,6 @@ class DupeGuru(DupeGuruBase):
def __init__(self):
DupeGuruBase.__init__(self, DupeGuruView(), '/tmp')
def _get_dupe_sort_key(self, dupe, get_group, key, delta):
r = cmp_value(dupe, key)
if delta and (key in self.result_table.DELTA_COLUMNS):
r -= cmp_value(get_group().ref, key)
return r
def _get_group_sort_key(self, group, key):
return cmp_value(group.ref, key)
def _prioritization_categories(self):
return prioritize.all_categories()