From 6364746d7ab445c2a1164850a5fe3795d3e9688a Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Thu, 12 Aug 2021 21:58:41 +0000 Subject: [PATCH] consolidated dataset/data imports --- src/cli/processing.py | 3 +-- src/cli/superscript-socket.py | 4 +--- src/cli/superscript.py | 7 +++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/cli/processing.py b/src/cli/processing.py index dd5ee2f..901522e 100644 --- a/src/cli/processing.py +++ b/src/cli/processing.py @@ -1,8 +1,7 @@ import numpy as np from tra_analysis import Analysis as an -from dataset import push_metric, load_metric -from data import pull_new_tba_matches +from data import pull_new_tba_matches, push_metric, load_metric import signal diff --git a/src/cli/superscript-socket.py b/src/cli/superscript-socket.py index 14a96a3..0df6922 100644 --- a/src/cli/superscript-socket.py +++ b/src/cli/superscript-socket.py @@ -1,7 +1,6 @@ # testing purposes only, not to be used or run import json -import multiprocessing import os import math from multiprocessing import Pool @@ -10,10 +9,9 @@ import warnings import sys import asyncio import websockets -import lockfile from interface import splash, log, ERR, INF, stdout, stderr -from dataset import get_previous_time, set_current_time, load_match, push_match, load_metric, push_metric, load_pit, push_pit +from data import get_previous_time, set_current_time, load_match, push_match, load_metric, push_metric, load_pit, push_pit from processing import matchloop, metricloop, pitloop config_path = "config.json" diff --git a/src/cli/superscript.py b/src/cli/superscript.py index 2fe295a..01d2397 100644 --- a/src/cli/superscript.py +++ b/src/cli/superscript.py @@ -130,16 +130,15 @@ __all__ = [ # imports: import json -import multiprocessing import os import math -from multiprocessing import Pool +from multiprocessing import Pool, freeze_support import time import warnings import sys from interface import splash, log, ERR, INF, stdout, stderr -from dataset import get_previous_time, set_current_time, load_match, push_match, load_metric, push_metric, load_pit, push_pit +from data import get_previous_time, set_current_time, load_match, push_match, load_metric, push_metric, load_pit, push_pit from processing import matchloop, metricloop, pitloop config_path = "config.json" @@ -396,5 +395,5 @@ def save_config(path, config_vector): if __name__ == "__main__": if sys.platform.startswith("win"): - multiprocessing.freeze_support() + freeze_support() main() \ No newline at end of file