-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidation.py
More file actions
40 lines (32 loc) · 1.21 KB
/
validation.py
File metadata and controls
40 lines (32 loc) · 1.21 KB
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
34
35
36
37
38
39
40
'''
syntax:
python validation.py <raw> <con> <inl> <mon> <sub>
'''
import argparse
from GOValid import GOValid_func
def run_main(raw, con, inl, mon, sub):
"""run with given file names"""
# Ahmad please put (or import/call) your code here
GOValid_func(raw,con,inl,mon,sub)
def run():
"""parse file names and run"""
parser = argparse.ArgumentParser(description='Run the GOComp PSSE based validation tool on a problem instance')
parser.add_argument('raw', help='raw - complete path and file name to a RAW file')
parser.add_argument('con', help='con - complete path and file name to a CON file')
parser.add_argument('inl', help='inl - complete path and file name to a INL file')
parser.add_argument('mon', help='mon - complete path and file name to a MON file')
parser.add_argument('sub', help='sub - complete path and file name to a SUB file')
args = parser.parse_args()
try:
raw = args.raw
con = args.con
inl = args.inl
mon = args.mon
sub = args.sub
except:
print ("exception in parsing the validation command")
raise
else:
run_main(raw, con, inl, mon, sub)
if __name__ == '__main__':
run()