-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrunner.py
More file actions
32 lines (24 loc) · 738 Bytes
/
runner.py
File metadata and controls
32 lines (24 loc) · 738 Bytes
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
import sys, parseInput, parseOutput, program, zeroScore, melOne, phreddOne, quentinV1
from os import listdir
processors = {
'default': program,
'zeroScore': zeroScore,
'melOne': melOne,
'phreddOne': phreddOne,
'quentinV1': quentinV1
}
choice = 'default'
if len(sys.argv) > 1:
choice = sys.argv[1]
if len(sys.argv) > 2:
files = [sys.argv[2]]
else:
inputPath = "input/"
files = [inputPath + str(x) for x in listdir(inputPath)]
process = processors[choice]
inputs = parseInput.getParsedInputs(files)
outputs = {}
for name, input in inputs.items():
print('Processing ' + name + ' with processor ' + choice + '...')
outputs[name] = process.getOutput(input)
parseOutput.parseOutputs(outputs)