Skip to content

Commit 2261a1f

Browse files
committed
FIX: Ensure nobody is dropped from creators list
1 parent 6c5bd05 commit 2261a1f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Diff for: tools/update_zenodo.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ def decommify(name):
3131
if line
3232
)
3333

34+
existing_creators = set(creator_map.keys())
35+
3436
committers = []
3537

3638
# Stable sort:
@@ -40,11 +42,17 @@ def decommify(name):
4042
matches = process.extract(
4143
committer, creator_map.keys(), scorer=fuzz.token_sort_ratio, limit=2
4244
)
43-
if matches[0][1] <= 80:
44-
# skip unmatched names
45+
match, score = matches[0]
46+
if score <= 80:
4547
print("No entry to sort:", committer)
4648
continue
47-
committers.append(matches[0][0])
49+
existing_creators.discard(match)
50+
committers.append(match)
51+
52+
for unmatched in sorted(existing_creators):
53+
print("No matching commits:", unmatched)
54+
# Keep the entries to avoid removing people for bad matching
55+
committers.append(unmatched)
4856

4957
for last_author in CREATORS_LAST:
5058
if committers[-1] != last_author:

0 commit comments

Comments
 (0)