TST: adds test bundle to builtins to make it easier to rebuild when the asset db changes

This commit is contained in:
Joe Jevnik
2016-07-26 13:34:58 -04:00
parent f4456719b0
commit 54be3858ba
3 changed files with 26 additions and 1 deletions
+3
View File
@@ -348,6 +348,9 @@ def bundles():
"""List all of the available data bundles.
"""
for bundle in sorted(bundles_module.bundles.keys()):
if bundle.startswith('.'):
# hide the test data
continue
try:
ingestions = sorted(
(str(bundles_module.from_bundle_ingest_dirname(ing))
+22
View File
@@ -6,6 +6,7 @@ from pandas_datareader.data import DataReader
import requests
from zipline.utils.cli import maybe_show_progress
from .core import register
def _cachpath(symbol, type_):
@@ -169,3 +170,24 @@ def yahoo_equities(symbols, start=None, end=None):
adjustment_writer.write(splits=splits, dividends=dividends)
return ingest
# bundle used when creating test data
register(
'.test',
yahoo_equities(
(
'AMD',
'CERN',
'COST',
'DELL',
'GPS',
'INTC',
'MMM',
'AAPL',
'MSFT',
),
pd.Timestamp('2004-01-02', tz='utc'),
pd.Timestamp('2015-01-01', tz='utc'),
),
)
+1 -1
View File
@@ -19,7 +19,7 @@ def hidden(path):
path : str
A filepath.
"""
return path.startswith('.')
return os.path.split(path)[1].startswith('.')
def ensure_directory(path):