Ejemplo n.º 1
0
projects = RW.readProject('projects')
items = []

if os.path.isdir(pathToPages):
    shutil.rmtree(pathToPages)
try:
    os.mkdir(pathToPages)
except OSError:
    print("Could not make directory")

noOfProjects, noOfCommits, noOfRefactorings, noOfTypeChanges, noOfCommitsException = 0, 0, 0, 0, 0

for p in projects:
    noOfProjects += 1
    commits = RW.readCommit('commits_' + p.name)
    l = str(len(commits))
    d = dict(name=p.name,
             Url=p.url,
             totalCommits=p.totalCommits,
             CommitsAnalyzed=l,
             LinkToCommits=p.name + ".html")
    items.append(d)
    commitSummary = []
    for cmt in commits:
        noOfCommits += 1
        r = sum(list(map(lambda r: r.occurences, cmt.refactorings)))
        refactorings = []
        dependencies = []
        added = []
        removed = []