From 4a904a0106e821da0ceb3ef000c0bd17ff8d2127 Mon Sep 17 00:00:00 2001 From: Frederic Fortier Date: Fri, 29 Dec 2017 18:43:22 -0500 Subject: [PATCH] BLD: house keeping --- catalyst/exchange/exchange_data_portal.py | 6 ------ catalyst/exchange/live_graph_clock.py | 1 + catalyst/exchange/utils/live_chart_utils.py | 5 +++-- catalyst/exchange/utils/serialization_utils.py | 3 +-- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/catalyst/exchange/exchange_data_portal.py b/catalyst/exchange/exchange_data_portal.py index aaa38a5f..261f9b42 100644 --- a/catalyst/exchange/exchange_data_portal.py +++ b/catalyst/exchange/exchange_data_portal.py @@ -20,12 +20,6 @@ log = Logger('DataPortalExchange', level=LOG_LEVEL) class DataPortalExchangeBase(DataPortal): def __init__(self, *args, **kwargs): - - # TODO: put somewhere accessible by each algo - self.retry_get_history_window = 5 - self.retry_get_spot_value = 5 - self.retry_delay = 5 - self.attempts = dict( get_spot_value_attempts=5, get_history_window_attempts=5, diff --git a/catalyst/exchange/live_graph_clock.py b/catalyst/exchange/live_graph_clock.py index 8fea4de5..40ad9c24 100644 --- a/catalyst/exchange/live_graph_clock.py +++ b/catalyst/exchange/live_graph_clock.py @@ -4,6 +4,7 @@ from catalyst.gens.sim_engine import ( SESSION_START ) from logbook import Logger + from catalyst.constants import LOG_LEVEL from catalyst.exchange.utils.stats_utils import prepare_stats diff --git a/catalyst/exchange/utils/live_chart_utils.py b/catalyst/exchange/utils/live_chart_utils.py index 036fa67a..11988cbc 100644 --- a/catalyst/exchange/utils/live_chart_utils.py +++ b/catalyst/exchange/utils/live_chart_utils.py @@ -1,8 +1,9 @@ -from catalyst.exchange.exchange_errors import \ - MismatchingBaseCurrenciesExchanges import matplotlib.dates as mdates import pandas as pd +from catalyst.exchange.exchange_errors import \ + MismatchingBaseCurrenciesExchanges + fmt = mdates.DateFormatter('%Y-%m-%d %H:%M') diff --git a/catalyst/exchange/utils/serialization_utils.py b/catalyst/exchange/utils/serialization_utils.py index 67f12ad5..4b098a02 100644 --- a/catalyst/exchange/utils/serialization_utils.py +++ b/catalyst/exchange/utils/serialization_utils.py @@ -1,9 +1,8 @@ import json +import re from json import JSONEncoder import pandas as pd -import re - from six import string_types from catalyst.constants import DATE_TIME_FORMAT