Skip to content

refactor: Replace PrettyTable with rich for table output#8

Merged
haugoug merged 1 commit intogvsoc:mainfrom
germainh512:drop-prettytable
Mar 9, 2026
Merged

refactor: Replace PrettyTable with rich for table output#8
haugoug merged 1 commit intogvsoc:mainfrom
germainh512:drop-prettytable

Conversation

@germainh512
Copy link

Summary

Drops the prettytable dependency — table output now uses rich.Table which was already a dependency (used for summary, test listing, etc.).

Changes

  • runner.py: dump_table() uses rich.Table with styled headers and no_wrap=True on test/config columns to prevent truncation
  • reporting.py: table_dump_row() uses rich's style="red" parameter for failed rows instead of embedding ANSI escape codes in cell values
  • requirements.txt: Removed prettytable

Why

  • One fewer dependency to install and maintain
  • Consistent look across all output (summary, test listing, and results table all use rich now)
  • Failed rows are properly styled (entire row turns red, not just embedded ANSI codes)

122 tests passing. Real-world testsuite (12/12) verified.

- dump_table() now uses rich.Table instead of PrettyTable
- table_dump_row() updated to use rich's style= parameter for failures
  instead of manual ANSI codes in cell values
- Removed prettytable from requirements.txt (one less dependency)
- bcolors kept for backward compat in test start/end banners
- Test name and config columns use no_wrap=True to prevent truncation

122 tests passing. Real-world testsuite (12/12) verified.
@haugoug haugoug merged commit ce35f9f into gvsoc:main Mar 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants