mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Improve missing data output
This commit is contained in:
parent
55efaec83d
commit
5ab61d9da4
|
@ -116,8 +116,8 @@ def ohlcv_fill_up_missing_data(dataframe: DataFrame, timeframe: str, pair: str)
|
|||
len_after = len(df)
|
||||
pct_missing = (len_after - len_before) / len_before if len_before > 0 else 0
|
||||
if len_before != len_after:
|
||||
message = (f"Missing data fillup for {pair}: before: {len_before} - after: {len_after}"
|
||||
f" - {pct_missing:.2%}")
|
||||
message = (f"Missing data fillup for {pair}, {timeframe}: "
|
||||
f"before: {len_before} - after: {len_after} - {pct_missing:.2%}")
|
||||
if pct_missing > 0.01:
|
||||
logger.info(message)
|
||||
else:
|
||||
|
|
|
@ -64,7 +64,7 @@ def test_ohlcv_fill_up_missing_data(testdatadir, caplog):
|
|||
# Column names should not change
|
||||
assert (data.columns == data2.columns).all()
|
||||
|
||||
assert log_has_re(f"Missing data fillup for UNITTEST/BTC: before: "
|
||||
assert log_has_re(f"Missing data fillup for UNITTEST/BTC, 1m: before: "
|
||||
f"{len(data)} - after: {len(data2)}.*", caplog)
|
||||
|
||||
# Test fillup actually fixes invalid backtest data
|
||||
|
@ -128,7 +128,7 @@ def test_ohlcv_fill_up_missing_data2(caplog):
|
|||
# Column names should not change
|
||||
assert (data.columns == data2.columns).all()
|
||||
|
||||
assert log_has_re(f"Missing data fillup for UNITTEST/BTC: before: "
|
||||
assert log_has_re(f"Missing data fillup for UNITTEST/BTC, {timeframe}: before: "
|
||||
f"{len(data)} - after: {len(data2)}.*", caplog)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user