Rename argument from dl_path to datadir

This commit is contained in:
Matthias 2019-08-29 11:36:32 +02:00
parent c1c49183b5
commit 9584629f50
3 changed files with 5 additions and 6 deletions

View File

@ -374,7 +374,7 @@ def download_trades_history(datadir: Optional[Path],
def refresh_backtest_trades_data(exchange: Exchange, pairs: List[str], timeframes: List[str],
dl_path: Path, timerange: TimeRange,
datadir: Path, timerange: TimeRange,
erase=False) -> List[str]:
"""
Refresh stored trades data .
@ -389,14 +389,14 @@ def refresh_backtest_trades_data(exchange: Exchange, pairs: List[str], timeframe
continue
# for ticker_interval in timeframes:
dl_file = pair_trades_filename(dl_path, pair)
dl_file = pair_trades_filename(datadir, pair)
if erase and dl_file.exists():
logger.info(
f'Deleting existing data for pair {pair}.')
dl_file.unlink()
logger.info(f'Downloading trades for pair {pair}.')
download_trades_history(datadir=dl_path, exchange=exchange,
download_trades_history(datadir=datadir, exchange=exchange,
pair=pair,
timerange=timerange)
return pairs_not_available

View File

@ -997,8 +997,7 @@ class Exchange:
raise OperationalException(e) from e
def build_ohlcv(self, trades: List[Dict], timeframe: str, since: int = None,
limit: int = None) -> str:
# TODO: fix return value
limit: int = None) -> List:
"""
Build ohlcv data from trade list.
trade-list has to be in the ccxt format, which is a list of dicts containing at least:

View File

@ -97,7 +97,7 @@ def start_download_data(args: Dict[str, Any]) -> None:
else:
pairs_not_available = refresh_backtest_trades_data(
exchange, pairs=config["pairs"], timeframes=config["timeframes"],
dl_path=Path(config['datadir']), timerange=timerange, erase=config.get("erase"))
datadir=Path(config['datadir']), timerange=timerange, erase=config.get("erase"))
except KeyboardInterrupt:
sys.exit("SIGINT received, aborting ...")