mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-22 12:40:30 +08:00
MAINT: Add equity to naming of bar data classes.
In preparation of adding futures, add equity to the names of both the classes and methods for writing bcolz data. Futures data will use a different minutes per day with a separate reader. This change will allow both equity and futures fixtures to be side by side. Also, break out the method which generates the dataframes and trading days member into fixtures (`EquityMinuteBarData` and `EquityDailyBarData`) on which the `*BarReader` fixture depends. This fixture is separated out to enable reader/writers in different formats to use the same data setup. (There is internal code which needs to write minute and daily bar data in a database format.)
This commit is contained in:
@@ -121,7 +121,7 @@ class TestAPIShim(WithDataPortal, WithSimParams, ZiplineTestCase):
|
||||
sids = ASSET_FINDER_EQUITY_SIDS = 1, 2, 3
|
||||
|
||||
@classmethod
|
||||
def make_minute_bar_data(cls):
|
||||
def make_equity_minute_bar_data(cls):
|
||||
for sid in cls.sids:
|
||||
yield sid, create_minute_df_for_asset(
|
||||
cls.trading_schedule,
|
||||
@@ -130,7 +130,7 @@ class TestAPIShim(WithDataPortal, WithSimParams, ZiplineTestCase):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def make_daily_bar_data(cls):
|
||||
def make_equity_daily_bar_data(cls):
|
||||
for sid in cls.sids:
|
||||
yield sid, create_daily_df_for_asset(
|
||||
cls.trading_schedule,
|
||||
@@ -149,7 +149,7 @@ class TestAPIShim(WithDataPortal, WithSimParams, ZiplineTestCase):
|
||||
])
|
||||
|
||||
@classmethod
|
||||
def make_adjustment_writer_daily_bar_reader(cls):
|
||||
def make_adjustment_writer_equity_daily_bar_reader(cls):
|
||||
return MockDailyBarReader()
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user