Skip to content

Commit

Permalink
Fix Data Importer Module code
Browse files Browse the repository at this point in the history
  • Loading branch information
PanPip committed Mar 8, 2021
1 parent 96738dd commit 0c71e55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 1 addition & 5 deletions arbitragelab/util/data_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand All @@ -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:
"""
Expand All @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions tests/test_data_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class TestDataImporter(unittest.TestCase):
"""
Tests Data Importer class.
"""
# pylint: disable=pointless-string-statement

def setUp(self):
"""
Expand All @@ -28,13 +29,16 @@ 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.
"""
self.assertTrue(len(DataImporter.get_sp500_tickers()) > 400)
self.assertTrue(len(DataImporter.get_dow_tickers()) > 20)
'''

def test_preprocessing_methods(self):
"""
Expand Down

0 comments on commit 0c71e55

Please sign in to comment.