Skip to content

Commit

Permalink
Merge 769bc8e into a1eb9b8
Browse files Browse the repository at this point in the history
  • Loading branch information
willianpaixao authored Jan 11, 2020
2 parents a1eb9b8 + 769bc8e commit aee5410
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zipline/data/bundles/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from contextlib2 import ExitStack
import click
from logbook import Logger
import pandas as pd
from trading_calendars import get_calendar
from toolz import curry, complement, take
Expand All @@ -28,6 +29,8 @@
import zipline.utils.paths as pth
from zipline.utils.preprocess import preprocess

log = Logger(__name__)


def asset_db_path(bundle_name, timestr, environ=None, db_version=None):
return pth.data_path(
Expand Down Expand Up @@ -432,6 +435,7 @@ def ingest(name,
raise ValueError('Need to ingest a bundle that creates '
'writers in order to downgrade the assets'
' db.')
log.info("Ingesting {}.", name)
bundle.ingest(
environ,
asset_db_writer,
Expand Down Expand Up @@ -605,6 +609,7 @@ def should_clean(name):
cleaned = set()
for run in all_runs:
if should_clean(run):
log.info("Cleaning {}.", run)
path = pth.data_path([name, run], environ=environ)
shutil.rmtree(path)
cleaned.add(path)
Expand Down

0 comments on commit aee5410

Please sign in to comment.