forked from blueoly/CrossPuppeteer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Puppeteer.py
30 lines (27 loc) · 1009 Bytes
/
Puppeteer.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
import os
import sys
import Aggregator
from SmellDetector import Constants as CONSTS, Analyzer
root = sys.argv[1]
#print("Initiating Analyzer...")
print("cdsccdssdfs")
totalRepos = len(os.listdir(root))
currentItem = 0
for item in os.listdir(root):
currentFolder = os.path.join(root, item)
#print("Anlyzing: " + currentFolder)
if not os.path.isfile(currentFolder):
Analyzer.analyze(currentFolder, item)
currentItem += 1
#print (str("{:.2f}".format(float(currentItem * 100)/float(totalRepos))) + "% analysis done.")
#print("Analyzer - Done.")
#print("Initiating metrics and smells aggregator...")
#aggregatedFile = open(root + "/" + CONSTS.AGGREGATOR_FILE, 'wt')
#aggregatedFile.write(CONSTS.CSV_HEADER)
#for item in os.listdir(root):
# currentFolder = os.path.join(root, item)
# if not os.path.isfile(currentFolder):
# Aggregator.aggregate(currentFolder, item, aggregatedFile)
#aggregatedFile.close()
#print("Metrics and smells aggregator - Done.")
print("cdsccds")