MCPcopy Index your code
hub / github.com/numpy/numpy / get_authors

Function get_authors

tools/changelog.py:56–81  ·  view source on GitHub ↗
(revision_range)

Source from the content-addressed store, hash-verified

54
55
56def get_authors(revision_range):
57 lst_release, cur_release = [r.strip() for r in revision_range.split('..')]
58 authors_pat = r'^.*\t(.*)$'
59
60 # authors and co-authors in current and previous releases.
61 grp1 = '--group=author'
62 grp2 = '--group=trailer:co-authored-by'
63 cur = this_repo.git.shortlog('-s', grp1, grp2, revision_range)
64 pre = this_repo.git.shortlog('-s', grp1, grp2, lst_release)
65 authors_cur = set(re.findall(authors_pat, cur, re.M))
66 authors_pre = set(re.findall(authors_pat, pre, re.M))
67
68 # Ignore the bot Homu.
69 authors_cur.discard('Homu')
70 authors_pre.discard('Homu')
71
72 # Ignore the bot dependabot-preview
73 authors_cur.discard('dependabot-preview')
74 authors_pre.discard('dependabot-preview')
75
76 # Append '+' to new authors.
77 authors_new = [s + ' +' for s in authors_cur - authors_pre]
78 authors_old = list(authors_cur & authors_pre)
79 authors = authors_new + authors_old
80 authors.sort()
81 return authors
82
83
84def get_pull_requests(repo, revision_range):

Callers 1

mainFunction · 0.85

Calls 3

stripMethod · 0.80
splitMethod · 0.80
sortMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…