-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
32 lines (22 loc) · 1.27 KB
/
app.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
from code_parser.testCodeParser import test_code_parser
import csv
def process_csv_and_load_files(csv_file_path):
"""Iterate over each entry in the CSV and load test and main files."""
with open(csv_file_path, mode='r') as csv_file:
reader = csv.DictReader(csv_file)
total_columns = 9074
completed_columns = 0
for row in reader:
test_file_url = row['raw_test']
# main_file_url = row['raw_actual']
test_case = row['testCase']
id = row['id']
isEagerTest = row['EagerTest']
isMysteryGuest = row['MysteryGuest']
isResourceOptimism = row['ResourceOptimism']
isRedundent = row['TestRedundancy']
print(f"\nProcessing ID: {id}")
test_code_parser(test_file_url, test_case, isEagerTest, isMysteryGuest, isResourceOptimism, isRedundent)
completed_columns += 1
print(f"Completed {completed_columns} of {total_columns} columns. {round((completed_columns/total_columns)*100, 2)}%")
process_csv_and_load_files('clean.csv')