mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
generate_filename should be private
This commit is contained in:
parent
a0a22f62e0
commit
18a4d6972d
|
@ -11,7 +11,7 @@ from freqtrade.types import BacktestResultType
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def generate_filename(recordfilename: Path, appendix: str, suffix: str) -> Path:
|
||||
def _generate_filename(recordfilename: Path, appendix: str, suffix: str) -> Path:
|
||||
"""
|
||||
Generates a filename based on the provided parameters.
|
||||
:param recordfilename: Path object, which can either be a filename or a directory.
|
||||
|
@ -38,7 +38,7 @@ def store_backtest_stats(
|
|||
:param stats: Dataframe containing the backtesting statistics
|
||||
:param dtappendix: Datetime to use for the filename
|
||||
"""
|
||||
filename = generate_filename(recordfilename, dtappendix, '.json')
|
||||
filename = _generate_filename(recordfilename, dtappendix, '.json')
|
||||
|
||||
# Store metadata separately.
|
||||
file_dump_json(get_backtest_metadata_filename(filename), stats['metadata'])
|
||||
|
@ -69,7 +69,7 @@ def _store_backtest_analysis_data(
|
|||
:param dtappendix: Datetime to use for the filename
|
||||
:param name: Name to use for the file, e.g. signals, rejected
|
||||
"""
|
||||
filename = generate_filename(recordfilename, f"{dtappendix}_{name}", '.pkl')
|
||||
filename = _generate_filename(recordfilename, f"{dtappendix}_{name}", '.pkl')
|
||||
|
||||
file_dump_joblib(filename, data)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user