tra-superscript/tra.py

96 lines
1.8 KiB
Python
Raw Normal View History

Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
import json
import superscript as su
import threading
__author__ = (
"Arthur Lu <learthurgo@gmail.com>",
)
match_ = False
metric_ = False
pit_ = False
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
match_enable = True
metric_enable = True
pit_enable = True
config = {}
def main():
global match_
global metric_
global pit_
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
global match_enable
global metric_enable
global pit_enable
global config
config = su.load_config("config.json")
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
task = threading.Thread(name = "match", target = match)
task.start()
task = threading.Thread(name = "match", target = metric)
task.start()
task = threading.Thread(name = "pit", target = pit)
task.start()
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
def match():
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
match_ = True
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
apikey = config["key"]["database"]
competition = config["competition"]
tests = config["statistics"]["match"]
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
data = su.load_match(apikey, competition)
su.matchloop(apikey, competition, data, tests)
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
match_ = False
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
if match_enable == True and match_ == False:
task = threading.Thread(name = "match", target = match)
task.start()
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
def metric():
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
metric_ = True
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
apikey = config["key"]["database"]
tbakey = config["key"]["tba"]
competition = config["competition"]
metric = config["statistics"]["metric"]
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
timestamp = su.get_previous_time(apikey)
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
su.metricloop(tbakey, apikey, competition, timestamp, metric)
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
metric_ = False
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
if metric_enable == True and metric_ == False:
task = threading.Thread(name = "match", target = metric)
task.start()
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
def pit():
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
pit_ = True
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
apikey = config["key"]["database"]
competition = config["competition"]
tests = config["statistics"]["pit"]
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
data = su.load_pit(apikey, competition)
su.pitloop(apikey, competition, data, tests)
pit_ = False
if pit_enable == True and pit_ == False:
task = threading.Thread(name = "pit", target = pit)
task.start()
Merge service-dev changes with master (#24) * added config.json removed old config files Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.000 Signed-off-by: Arthur <learthurgo@gmail.com> * changed data.py Signed-off-by: Arthur <learthurgo@gmail.com> * changes to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * removed cells from visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * more changes to visualize_pit.py Signed-off-by: Arthur <learthurgo@gmail.com> * added analysis-master/metrics/__pycache__ to git ignore moved pit configs in config.json to the borrom superscript.py v 0.0.6.001 Signed-off-by: Arthur <learthurgo@gmail.com> * removed old database key Signed-off-by: Arthur <learthurgo@gmail.com> * adjusted config files Signed-off-by: Arthur <learthurgo@gmail.com> * Delete config-pop.json * fixed .gitignore Signed-off-by: Arthur <learthurgo@gmail.com> * analysis.py 1.2.1.003 added team kv pair to config.json Signed-off-by: Arthur <learthurgo@gmail.com> * superscript.py v 0.0.6.002 Signed-off-by: Arthur <learthurgo@gmail.com> * finished app.py API made minute changes to parentheses use in various packages Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * bug fixes in app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * made changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * deleted a __pycache__ folder from metrics Signed-off-by: Arthur Lu <learthurgo@gmail.com> * more changes to .gitignore Signed-off-by: Arthur Lu <learthurgo@gmail.com> * additions to app.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed app.py to api.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed extranneous files Signed-off-by: Arthur Lu <learthurgo@gmail.com> * renamed api.py to tra.py removed rest api calls from tra.py * renamed api.py to tra.py removed rest api calls from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * removed flask import from tra.py Signed-off-by: Arthur Lu <learthurgo@gmail.com> * changes to devcontainer.json Signed-off-by: Arthur Lu <learthurgo@gmail.com> * fixed unit tests to be correct removed some tests regressions because of potential function overflow removed trueskill unit test because of slight deviation chance Signed-off-by: Arthur Lu <learthurgo@gmail.com>
2020-05-20 13:52:38 +00:00
task = threading.Thread(name = "main", target=main)
task.start()