From 0eb9e07711021e980406b8af8e953979fd222957 Mon Sep 17 00:00:00 2001 From: Dev Singh Date: Fri, 6 Mar 2020 11:14:10 -0600 Subject: [PATCH] testing --- data analysis/superscript.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/data analysis/superscript.py b/data analysis/superscript.py index b17009aa..18d95ed6 100644 --- a/data analysis/superscript.py +++ b/data analysis/superscript.py @@ -176,16 +176,12 @@ def simplestats(data, test): if(test == "regression_sigmoidal"): return an.regression(list(range(len(data))), data, ['sig']) -def push_to_database(apikey, competition, results, metrics, pit): +def push_to_database(apikey, competition, results, pit): for team in results: d.push_team_tests_data(apikey, competition, team, results[team]) - for team in metrics: - - d.push_team_metrics_data(apikey, competition, team, metrics[team]) - for variable in pit: d.push_team_pit_data(apikey, competition, variable, pit[variable]) @@ -279,6 +275,14 @@ def metricsloop(tbakey, apikey, competition, timestamp): # listener based metric blu[team]["gl2"]["rd"] = blu[team]["gl2"]["rd"] + blu_gl2_delta["rd"] blu[team]["gl2"]["vol"] = blu[team]["gl2"]["vol"] + blu_gl2_delta["vol"] + temp_vector = {} + temp_vector.update(red) + temp_vector.update(blu) + + for team in temp_vector: + + d.push_team_metrics_data(apikey, competition, team, temp_vector[team]) + """ not functional for now red_trueskill = [] blu_trueskill = [] @@ -305,11 +309,6 @@ def metricsloop(tbakey, apikey, competition, timestamp): # listener based metric """ - return_vector.update(red) - return_vector.update(blu) - - return return_vector - def load_metrics(apikey, competition, match, group_name): group = {} @@ -334,7 +333,7 @@ def load_metrics(apikey, competition, match, group_name): elo = metrics["elo"] gl2 = metrics["gl2"] - ts = metrics["trueskill"] + ts = metrics["ts"] group[team] = {"elo": elo, "gl2": gl2, "ts": ts}