Improve test by having multistrat.meta file available

This commit is contained in:
Matthias
2022-04-13 06:55:47 +02:00
parent 4ac54a76af
commit f89b64c972
5 changed files with 20 additions and 6 deletions

View File

@@ -168,7 +168,7 @@ def load_and_merge_backtest_result(strategy_name: str, filename: Path, results:
def _get_backtest_files(dirname: Path) -> List[Path]:
return reversed(sorted(dirname.glob('backtest-result-*-[0-9][0-9].json')))
return list(reversed(sorted(dirname.glob('backtest-result-*-[0-9][0-9].json'))))
def get_backtest_resultlist(dirname: Path):

View File

@@ -1,7 +1,7 @@
import asyncio
import logging
from copy import deepcopy
from typing import List
from typing import Any, Dict, List
from fastapi import APIRouter, BackgroundTasks, Depends
@@ -215,7 +215,7 @@ def api_backtest_history(config=Depends(get_config), ws_mode=Depends(is_webserve
def api_backtest_history_result(filename: str, strategy: str, config=Depends(get_config), ws_mode=Depends(is_webserver_mode)):
# Get backtest result history, read from metadata files
fn = config['user_data_dir'] / 'backtest_results' / filename
results = {
results: Dict[str, Any] = {
'metadata': {},
'strategy': {},
'strategy_comparison': [],

View File

@@ -35,7 +35,8 @@ logger = logging.getLogger(__name__)
# 1.13: forcebuy supports stake_amount
# versions 2.xx -> futures/short branch
# 2.14: Add entry/exit orders to trade response
API_VERSION = 2.14
# 2.15: Add backtest history endpoints
API_VERSION = 2.15
# Public API, requires no auth.
router_public = APIRouter()