Fix _add_excel_table: gate warnings behind verbose, ensure workbook-wide unique table names#129
Merged
prosenjitdhole merged 3 commits intoprosenj_cli_hq_eval_report_phase_3from Mar 6, 2026
Conversation
… names Co-authored-by: prosenjitdhole <239307697+prosenjitdhole@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Excel report generation based on review feedback
Fix _add_excel_table: gate warnings behind verbose, ensure workbook-wide unique table names
Mar 6, 2026
2680937
into
prosenj_cli_hq_eval_report_phase_3
1 check failed
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the HW Queue Excel report generator’s table creation behavior by collecting table-creation failures as warnings (instead of printing unconditionally) and ensuring Excel table names are unique across the entire workbook after sanitization.
Changes:
- Add an optional
warningscollector parameter to_add_excel_tableand stop unconditional printing on exceptions. - In
_apply_formatting, collect table warnings and only print them whenverbose=True. - Ensure workbook-wide unique table names by tracking used names and suffixing on collisions while respecting Excel’s 255-character limit.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_add_excel_tablewas unconditionally printing on exception (ignoringverbose) and table names were generated per-sheet without collision detection, risking duplicate names after sanitization.Changes
Structured warning collection: Added
warnings: Optional[List[str]]parameter to_add_excel_table. Exceptions now append to the caller-supplied list instead of printing directly.Verbose-gated output:
_apply_formattingcollects table warnings in a local list and only emits them whenverbose=True.Workbook-wide name uniqueness:
_apply_formattingtracks assigned names in aSet[str]and appends_1,_2, … on collision, truncating the base name to stay within Excel's 255-character limit.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.