From 42b291e49575f6b4ccbc1a873b3427c2035e996d Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Tue, 20 Aug 2024 11:05:45 +0200 Subject: [PATCH] rel(24.0.1): update author crediting script --- .maint/requirements.txt | 3 +++ .maint/update_authors.py | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .maint/requirements.txt diff --git a/.maint/requirements.txt b/.maint/requirements.txt new file mode 100644 index 00000000..0fe377d2 --- /dev/null +++ b/.maint/requirements.txt @@ -0,0 +1,3 @@ +click +fuzzywuzzy +python-Levenshtein \ No newline at end of file diff --git a/.maint/update_authors.py b/.maint/update_authors.py index c16dca81..6a24712a 100755 --- a/.maint/update_authors.py +++ b/.maint/update_authors.py @@ -119,9 +119,14 @@ def get_git_lines(fname='line-contributors.txt'): lines = contrib_file.read_text().splitlines() git_line_summary_path = shutil.which('git-line-summary') + if not git_line_summary_path: + git_line_summary_path = "git summary --dedup-by-email".split(" ") + else: + git_line_summary_path = [git_line_summary_path] + if not lines and git_line_summary_path: print('Running git-line-summary on repo') - lines = sp.check_output([git_line_summary_path]).decode().splitlines() + lines = sp.check_output(git_line_summary_path).decode().splitlines() lines = [line for line in lines if 'Not Committed Yet' not in line] contrib_file.write_text('\n'.join(lines))