MCPcopy Create free account
hub / github.com/boutproject/BOUT-dev / get_authors_from_git

Function get_authors_from_git

bin/update_citations.py:47–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45
46
47def get_authors_from_git():
48 output = subprocess.run(
49 ["git", "log", "--format='%aN %aE'"],
50 capture_output=True,
51 check=True,
52 text=True,
53 )
54
55 authors_string = output.stdout
56 authors_list = authors_string.split("\n")
57 authors_without_quotes = [a.strip("'") for a in authors_list]
58
59 distinct_authors = set(authors_without_quotes)
60 distinct_authors_list_without_empty_strings = [
61 a.rsplit(maxsplit=1) for a in distinct_authors if a
62 ]
63 authors_with_emails = defaultdict(list)
64 for author, email in distinct_authors_list_without_empty_strings:
65 authors_with_emails[author].append(email)
66
67 return authors_with_emails
68
69
70def parse_cff_file():

Callers 1

update_citationsFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected