Extract .last_result.json to constant

This commit is contained in:
Matthias
2020-06-28 09:27:19 +02:00
parent 59e0ca0aaa
commit 2ed808da1f
5 changed files with 32 additions and 29 deletions

View File

@@ -7,7 +7,7 @@ from arrow import Arrow
from pandas import DataFrame
from tabulate import tabulate
from freqtrade.constants import DATETIME_PRINT_FORMAT
from freqtrade.constants import DATETIME_PRINT_FORMAT, LAST_BT_RESULT_FN
from freqtrade.data.btanalysis import calculate_max_drawdown, calculate_market_change
from freqtrade.misc import file_dump_json
@@ -21,8 +21,7 @@ def store_backtest_stats(recordfilename: Path, stats: Dict[str, DataFrame]) -> N
).with_suffix(recordfilename.suffix)
file_dump_json(filename, stats)
latest_filename = Path.joinpath(recordfilename.parent,
'.last_result.json')
latest_filename = Path.joinpath(recordfilename.parent, LAST_BT_RESULT_FN)
file_dump_json(latest_filename, {'latest_backtest': str(filename.name)})