-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
When I try the example in the README, it fails with a corrupted time index:
import numpy as np
import pandas as pd
import pymarketstore as pymkts
data = np.array([(pd.Timestamp('2017-01-01 00:00').value / 10**9, 10.0)], dtype=[('Epoch', 'i8'), ('Ask', 'f4')])
cli = pymkts.Client()
cli.write(data, 'TEST/1Min/Tick')
d2 = cli.query(pymkts.Params('TEST', '1Min', 'Tick')).first().df()
print d2
I get the following output:
# python tests/basic_driver.py
Empty DataFrame
Columns: [Ask]
Index: []
I believe the problem is in the handling of the numpy data in the driver as compared with the handling in the API code in the marketstore server. To fix this, we should:
- develop and document the binary data interchange format
- implement a basic sanity test of the index values used in the data package - perhaps send the beginning and ending values of time index in the intended write data in the data package
- implement a system level test in CircleCI that verifies this driver's correct operation with the latest marketstore codebase
Metadata
Metadata
Assignees
Labels
No labels