Use better naming
This commit is contained in:
parent
1435d26996
commit
238ff6c9fe
@ -182,7 +182,7 @@
|
|||||||
"disable_dataframe_checks": false,
|
"disable_dataframe_checks": false,
|
||||||
"strategy": "SampleStrategy",
|
"strategy": "SampleStrategy",
|
||||||
"strategy_path": "user_data/strategies/",
|
"strategy_path": "user_data/strategies/",
|
||||||
"files": [],
|
"add_config_files": [],
|
||||||
"dataformat_ohlcv": "json",
|
"dataformat_ohlcv": "json",
|
||||||
"dataformat_trades": "jsongz"
|
"dataformat_trades": "jsongz"
|
||||||
}
|
}
|
||||||
|
@ -99,8 +99,8 @@ def load_from_files(files: List[str], base_path: Path = None, level: int = 0) ->
|
|||||||
file = base_path / file
|
file = base_path / file
|
||||||
|
|
||||||
config_tmp = load_config_file(str(file))
|
config_tmp = load_config_file(str(file))
|
||||||
if 'files' in config_tmp:
|
if 'add_config_files' in config_tmp:
|
||||||
config_sub = load_from_files(config_tmp['files'], file.resolve().parent, level + 1)
|
config_sub = load_from_files(config_tmp['add_config_files'], file.resolve().parent, level + 1)
|
||||||
files_loaded.extend(config_sub.get('config_files', []))
|
files_loaded.extend(config_sub.get('config_files', []))
|
||||||
deep_merge_dicts(config_sub, config_tmp)
|
deep_merge_dicts(config_sub, config_tmp)
|
||||||
|
|
||||||
|
2
tests/testdata/testconfigs/recursive.json
vendored
2
tests/testdata/testconfigs/recursive.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
// This file fails as it's loading itself over and over
|
// This file fails as it's loading itself over and over
|
||||||
"files": [
|
"add_config_files": [
|
||||||
"./recursive.json"
|
"./recursive.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
"order_book_top": 1,
|
"order_book_top": 1,
|
||||||
"price_last_balance": 0.0
|
"price_last_balance": 0.0
|
||||||
},
|
},
|
||||||
"files": [
|
"add_config_files": [
|
||||||
"./test_pricing2_conf.json"
|
"./test_pricing2_conf.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
2
tests/testdata/testconfigs/testconfig.json
vendored
2
tests/testdata/testconfigs/testconfig.json
vendored
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"files": [
|
"add_config_files": [
|
||||||
"test_base_config.json",
|
"test_base_config.json",
|
||||||
"test_pricing_conf.json"
|
"test_pricing_conf.json"
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user