Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Side by Side Diff: infra/tools/antibody/__main__.py

Issue 1235373004: Added script to generate stats on a git checkout (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@new_antibody_db_schema
Patch Set: Rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « infra/tools/antibody/ANTIBODY_DB_schema_setup.sql ('k') | infra/tools/antibody/antibody.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Antibody is meant to audit reviews for the Chromium project. 5 """Antibody is meant to audit reviews for the Chromium project.
6 6
7 Example invocation: [TBD] 7 Example invocation: [TBD]
8 ./run.py infra.tools.antibody <arguments> 8 ./run.py infra.tools.antibody <arguments>
9 """ 9 """
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 for review_url in git_commits_with_review_urls: 58 for review_url in git_commits_with_review_urls:
59 # cannot get access into chromereview.googleplex.com 59 # cannot get access into chromereview.googleplex.com
60 if 'chromereviews.googleplex' not in review_url: 60 if 'chromereviews.googleplex' not in review_url:
61 code_review_parse.add_rietveld_data_to_review(review_url, cc) 61 code_review_parse.add_rietveld_data_to_review(review_url, cc)
62 code_review_parse.add_rietveld_data_to_review_people(review_url, cc) 62 code_review_parse.add_rietveld_data_to_review_people(review_url, cc)
63 csql.commit(connection) 63 csql.commit(connection)
64 if args.write_html or args.run_antibody: 64 if args.write_html or args.run_antibody:
65 if not os.path.exists(args.output_dir_path): 65 if not os.path.exists(args.output_dir_path):
66 os.makedirs(args.output_dir_path) 66 os.makedirs(args.output_dir_path)
67 suspicious_commits = code_review_parse.get_tbr_no_lgtm(cc) 67 suspicious_commits = code_review_parse.get_tbr_no_lgtm(cc)
68 antibody.generate_stats_files(cc, args.output_dir_path)
68 gitiles_prefix = antibody.get_gitiles_prefix(checkout) 69 gitiles_prefix = antibody.get_gitiles_prefix(checkout)
69 if not gitiles_prefix: 70 if not gitiles_prefix:
70 gitiles_prefix = '' 71 gitiles_prefix = ''
71 antibody.get_tbr_by_user(suspicious_commits, gitiles_prefix, 72 antibody.get_tbr_by_user(suspicious_commits, gitiles_prefix,
72 args.output_dir_path) 73 args.output_dir_path)
73 antibody.generate_antibody_ui(suspicious_commits, gitiles_prefix, 74 antibody.generate_antibody_ui(suspicious_commits, gitiles_prefix,
74 args.output_dir_path) 75 args.output_dir_path)
75 76
76 csql.close(connection, cc) 77 csql.close(connection, cc)
77 78
78 79
79 if __name__ == '__main__': 80 if __name__ == '__main__':
80 sys.exit(main(sys.argv[1:])) 81 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « infra/tools/antibody/ANTIBODY_DB_schema_setup.sql ('k') | infra/tools/antibody/antibody.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698