Skip to content

Commit cd51370

Browse files
committed
[tools] Try to fix bloat check when comment has empty cell
The bloat check has been failing for months now because gh_report.py script seems to assume that the first row in a comment to the analyzed PR has no empty cells, and for the cc32xx platform, which happens to finish the build as the first one, a row with a blank section name is added. I don't know what is the reason of the blank section, but the script should not give up just because of one invalid entry as we miss important code size increase warnings. Also, replace deprecated DataFrame.append with concat().
1 parent bb3ce44 commit cd51370

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

scripts/tools/memory/gh_report.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,8 @@ def merge(df: pd.DataFrame, comment) -> pd.DataFrame:
375375
cols, rows = memdf.util.markdown.read_hierified(body)
376376
break
377377
logging.debug('REC: read %d rows', len(rows))
378-
df = df.append(pd.DataFrame(data=rows, columns=cols).astype(df.dtypes))
378+
df = pd.concat([df, pd.DataFrame(data=rows, columns=cols).astype(df.dtypes)],
379+
ignore_index=True)
379380
return df.sort_values(
380381
by=['platform', 'target', 'config', 'section']).drop_duplicates()
381382

scripts/tools/memory/memdf/util/markdown.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def read_hierified(f):
3434
for i in range(0, len(header)):
3535
column = columns[i + 1].strip()
3636
if not column:
37-
column = rows[-1][i]
37+
column = rows[-1][i] if rows else '(blank)'
3838
row.append(column)
3939
rows.append(tuple(row))
4040

0 commit comments

Comments
 (0)