mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-27 11:20:45 +08:00
TST: adds test bundle to builtins to make it easier to rebuild when the asset db changes
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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'),
|
||||
),
|
||||
)
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user