MCPcopy Create free account
hub / github.com/Persper/code-analytics / draw_stats

Function draw_stats

tools/excel_charts/draw_charts.py:83–105  ·  view source on GitHub ↗
(workbook)

Source from the content-addressed store, hash-verified

81
82
83def draw_stats(workbook):
84 stats_sheet = excel.sheet(workbook, 'Stats')
85 if not stats_sheet:
86 stats_sheet = workbook.create_sheet('Stats')
87
88 data_col = 2 # the starting distance data column
89 for ws in workbook.worksheets:
90 if ws.title == 'Stats':
91 continue
92
93 alphas, stats = calc_stats(ws)
94
95 # Sets or checks the alpha column.
96 if data_col == 2:
97 excel.fillout(stats_sheet, (1, 1), alphas)
98 else:
99 a = excel.fillin(stats_sheet, (1, 1), len(alphas), 1)
100 assert a == alphas
101
102 # Sets the distance column(s) for the current worksheet.
103 excel.fillout(stats_sheet, (1, data_col), stats)
104
105 data_col += len(stats[0])
106
107
108def main():

Callers 1

mainFunction · 0.85

Calls 1

calc_statsFunction · 0.85

Tested by

no test coverage detected