Skip to content

Commit

Permalink
remove data provider implementation / cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sph3rex committed Jul 2, 2019
1 parent a795969 commit 6bf7dbf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions lib/data/providers/ExchangeDataProvider.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import time
import ccxt
import pandas as pd

from typing import Dict, Tuple
from typing import Tuple
from datetime import datetime

from lib.data.providers.dates import ProviderDateFormat
Expand Down
4 changes: 2 additions & 2 deletions test/data/test_providers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

from lib.data.providers.dates import ProviderDateFormat
from lib.data.providers import StaticDataProvider, ExchangeDataProvider
from lib.data.providers import StaticDataProvider


@pytest.fixture
Expand All @@ -28,7 +28,7 @@ def test_column_map(self, csv_provider):
def test_date_sort(self, csv_provider):
ohlcv = csv_provider.historical_ohlcv()

timestamps = ohlcv['Timestamp'].values
timestamps = ohlcv['Date'].values
sorted_timestamps = sorted(timestamps.copy())

assert (timestamps == sorted_timestamps).all()
6 changes: 1 addition & 5 deletions test/test_rl_trader.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import unittest
from unittest.mock import Mock

from lib.RLTrader import RLTrader
from lib.TraderArgs import TraderArgs
from lib.data_feed.StaticDataProvider import StaticDataProvider


class TestRLTrader(unittest.TestCase):
Expand All @@ -12,11 +10,9 @@ def setUp(self):

def test_that_args_get_injected_correctly(self):
args = self.parser.parse_args(['optimize'])
data_mock = Mock(StaticDataProvider)
sut = RLTrader(data_mock, args)
sut = RLTrader(args)

self.assertEqual(sut.tensorboard_path, args.tensorboard_path)
self.assertEqual(sut.params_db_path, args.params_db_path)
self.assertEqual(sut.model_verbose, args.model_verbose)
self.assertEqual(sut.nminibatches, args.nminibatches)
self.assertEqual(sut.test_set_percentage, args.test_set_percentage)

0 comments on commit 6bf7dbf

Please sign in to comment.