Small fixes while tsting
This commit is contained in:
parent
14b43b504b
commit
73ac98da80
@ -176,6 +176,7 @@ class Configuration(object):
|
||||
elif 'user_data_dir' not in config:
|
||||
# Default to cwd/user_data (legacy option ...)
|
||||
config.update({'user_data_dir': str(Path.cwd() / "user_data")})
|
||||
|
||||
# reset to user_data_dir so this contains the absolute path.
|
||||
config['user_data_dir'] = create_userdata_dir(config['user_data_dir'])
|
||||
logger.info('Using user-data directory: %s ...', config['user_data_dir'])
|
||||
|
@ -20,8 +20,8 @@ def create_datadir(config: Dict[str, Any], datadir: Optional[str] = None) -> str
|
||||
return str(folder)
|
||||
|
||||
|
||||
def create_userdata_dir(directory: str) -> str:
|
||||
sub_dirs = ["backtest_results", "data", "hyperopts", "plots", "strategies", ]
|
||||
def create_userdata_dir(directory: str) -> Path:
|
||||
sub_dirs = ["backtest_results", "data", "hyperopts", "plot", "strategies", ]
|
||||
folder = Path(directory)
|
||||
if not folder.is_dir():
|
||||
folder.mkdir(parents=True)
|
||||
@ -32,5 +32,4 @@ def create_userdata_dir(directory: str) -> str:
|
||||
subfolder = folder / f
|
||||
if not subfolder.is_dir():
|
||||
subfolder.mkdir(parents=False)
|
||||
# TODO: convert this to return Path
|
||||
return folder
|
||||
|
Loading…
Reference in New Issue
Block a user