mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-11 11:16:15 +08:00
Unit tested ingestion of bundle chunks. This may not be stable yet.
This commit is contained in:
@@ -71,27 +71,22 @@ class ExchangeBundleTestCase:
|
||||
pass
|
||||
|
||||
def test_merge_ctables(self):
|
||||
exchange_name = 'bitfinex'
|
||||
exchange_name = 'poloniex'
|
||||
data_frequency = 'minute'
|
||||
|
||||
root = '/Users/fredfortier/.catalyst/data/exchanges/bitfinex/temp_bundles'
|
||||
path = '00/02/000284.bcolz'
|
||||
|
||||
august = '{}/{}'.format(
|
||||
root, 'poloniex-minute-btc_usdt-2017-8'
|
||||
)
|
||||
exchange = get_exchange(exchange_name)
|
||||
asset = exchange.get_asset('btc_usd')
|
||||
asset = exchange.get_asset('btc_usdt')
|
||||
|
||||
start = pd.to_datetime('2017-09-01', utc=True)
|
||||
end = pd.to_datetime('2017-09-06', utc=True)
|
||||
|
||||
exchange_bundle = ExchangeBundle(exchange)
|
||||
|
||||
writer = exchange_bundle.get_writer(start, end, data_frequency)
|
||||
exchange_bundle.ingest_ctable(
|
||||
asset=asset,
|
||||
data_frequency='minute',
|
||||
path=august
|
||||
data_frequency=data_frequency,
|
||||
period='2017-9',
|
||||
writer=writer
|
||||
)
|
||||
|
||||
september = '{}/{}/{}'.format(
|
||||
root, 'poloniex-minute-btc_usdt-2017-9', path
|
||||
)
|
||||
zseptember = bcolz.open(september, mode='a')
|
||||
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user