Commit 65116942 authored by Pettersson Tomas's avatar Pettersson Tomas

testing ensemble

parent daa8f013
env.cfg
env.json
statistics.txt
run.txt
**/*.pyc
\ No newline at end of file
#!/usr/bin/python
# coding: utf-8
import sys
import json
from time import sleep
from runner.model import Models
from os import walk
from traceback import print_exc
def main(method):
try:
if method == 'select':
with open('env.json') as envjson:
data = json.load(envjson)
padmwslist = data['padmws']
for padmws in padmwslist:
# update model.py to handle this contructor class Models(object):
# def __init__(self, url, usr, pwd, domains, input = 'run' ):
# self.url = url
# self.usr = usr
# self.pwd = pwd
mlist = Models(padmws['url'], padmws['usr'], padmws['pwd'], padmws['filter']['domains'], 'v3')()
mlist[selected-1](None, 300)
else:
raise ValueError('Validation method is not defined. Try using python '+'v3'+'.py select <number>')
sys.exit(0)
except Exception as error:
print_exc()
sys.exit(1)
'''
To run in terminal call with python <name>.py select <number>
'''
if __name__ == "__main__":
method = ''
if (len(sys.argv) > 1):
method = sys.argv[1]
if (len(sys.argv) > 2):
selected = int(sys.argv[2])
main(method)
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment