forked from wesm/vbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
33 lines (24 loc) · 897 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from datetime import datetime
import gitbench.git as git
reload(git)
# repo_path = '/home/wesm/code/pandas'
# repo = git.GitRepo(repo_path)
# hists = repo.messages
# def churn_graph(repo):
# omit_paths = [path for path in churn.major_axis
# if not path.endswith('.pyx') or not path.endswith('.py')]
# omit_shas = [sha for sha in churn.minor_axis
# if 'LF' in hists[sha]]
# omit_shas.append('dcf3490')
# by_date = repo.get_churn(omit_shas=omit_shas, omit_paths=omit_paths)
# by_date = by_date.drop([datetime(2011, 6, 10)])
# # clean out days where I touched Cython
# by_date = by_date[by_date < 5000]
# return by_date
REPO_PATH = '/home/wesm/code/pandas'
TMP_DIR = '/home/wesm/tmp/gb_pandas'
BUILD = """
python setup.py build_ext --inplace
"""
repo = git.GitRepo(REPO_PATH)
burp = git.BenchRepo(REPO_PATH, TMP_DIR, BUILD)