mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Use build_args for download script
This commit is contained in:
parent
27798c1683
commit
ba7a0dde06
|
@ -351,7 +351,7 @@ ARGS_EDGE = ARGS_COMMON_OPTIMIZE + ["stoploss_range"]
|
|||
|
||||
ARGS_LIST_EXCHANGE = ["print_one_column"]
|
||||
|
||||
ARGS_DOWNLOADER = ["pairs", "pairs_file", "days", "exchange", "timeframes", "erase"]
|
||||
ARGS_DOWNLOADER = ARGS_COMMON + ["pairs", "pairs_file", "days", "exchange", "timeframes", "erase"]
|
||||
|
||||
ARGS_PLOT_DATAFRAME = (ARGS_COMMON + ARGS_STRATEGY +
|
||||
["pairs", "indicators1", "indicators2", "plot_limit", "db_url", "trade_source",
|
||||
|
|
|
@ -3,7 +3,7 @@ import argparse
|
|||
|
||||
import pytest
|
||||
|
||||
from freqtrade.arguments import Arguments, TimeRange, check_int_positive
|
||||
from freqtrade.arguments import Arguments, TimeRange, check_int_positive, ARGS_DOWNLOADER
|
||||
|
||||
|
||||
# Parse common command-line-arguments. Used for all tools
|
||||
|
@ -178,8 +178,8 @@ def test_download_data_options() -> None:
|
|||
'--exchange', 'binance'
|
||||
]
|
||||
arguments = Arguments(args, '')
|
||||
arguments.common_options()
|
||||
arguments.download_data_options()
|
||||
arguments.build_args(ARGS_DOWNLOADER)
|
||||
|
||||
args = arguments.parse_args()
|
||||
assert args.pairs_file == 'file_with_pairs'
|
||||
assert args.datadir == 'datadir/folder'
|
||||
|
|
|
@ -8,7 +8,7 @@ import sys
|
|||
from pathlib import Path
|
||||
from typing import Any, Dict, List
|
||||
|
||||
from freqtrade.arguments import Arguments, TimeRange
|
||||
from freqtrade.arguments import Arguments, TimeRange, ARGS_DOWNLOADER
|
||||
from freqtrade.configuration import Configuration
|
||||
from freqtrade.data.history import download_pair_history
|
||||
from freqtrade.exchange import Exchange
|
||||
|
@ -21,8 +21,7 @@ logger = logging.getLogger('download_backtest_data')
|
|||
DEFAULT_DL_PATH = 'user_data/data'
|
||||
|
||||
arguments = Arguments(sys.argv[1:], 'Download backtest data')
|
||||
arguments.common_options()
|
||||
arguments.download_data_options()
|
||||
arguments.build_args(ARGS_DOWNLOADER)
|
||||
|
||||
# Do not read the default config if config is not specified
|
||||
# in the command line options explicitely
|
||||
|
|
Loading…
Reference in New Issue
Block a user