From 0c71e5533cf8ebaf3f83743b5dc027088436b548 Mon Sep 17 00:00:00 2001 From: PanPip Date: Mon, 8 Mar 2021 15:38:44 +0100 Subject: [PATCH] Fix Data Importer Module code --- arbitragelab/util/data_importer.py | 6 +----- tests/test_data_importer.py | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arbitragelab/util/data_importer.py b/arbitragelab/util/data_importer.py index 83f88bb3..b759ea78 100644 --- a/arbitragelab/util/data_importer.py +++ b/arbitragelab/util/data_importer.py @@ -7,7 +7,7 @@ import pandas as pd import yfinance as yf -#import yahoo_fin.stock_info as ys +import yahoo_fin.stock_info as ys class DataImporter: """ @@ -18,10 +18,7 @@ class DataImporter: various indexes, pulling of relevant pricing data and processing said data. """ - #pylint: disable=pointless-string-statement - #These tests are breaking due to yahoo_fin issue now: https://github.com/atreadw1492/yahoo_fin/issues/36 - ''' @staticmethod def get_sp500_tickers() -> list: """ @@ -45,7 +42,6 @@ def get_dow_tickers() -> list: tickers_dow = ys.tickers_dow() return tickers_dow - ''' @staticmethod def remove_nuns(dataframe: pd.DataFrame, threshold: int = 100) -> pd.DataFrame: diff --git a/tests/test_data_importer.py b/tests/test_data_importer.py index d35463eb..7b2ac5cf 100644 --- a/tests/test_data_importer.py +++ b/tests/test_data_importer.py @@ -16,6 +16,7 @@ class TestDataImporter(unittest.TestCase): """ Tests Data Importer class. """ + # pylint: disable=pointless-string-statement def setUp(self): """ @@ -28,6 +29,8 @@ def setUp(self): self.data = pd.read_csv(data_path, parse_dates=True, index_col="Date") self.data.dropna(inplace=True) + #These tests are breaking due to yahoo_fin issue now: https://github.com/atreadw1492/yahoo_fin/issues/36 + ''' def test_ticker_collectors(self): """ Tests ticker collection collectors. @@ -35,6 +38,7 @@ def test_ticker_collectors(self): self.assertTrue(len(DataImporter.get_sp500_tickers()) > 400) self.assertTrue(len(DataImporter.get_dow_tickers()) > 20) + ''' def test_preprocessing_methods(self): """