refactor(status): replace colorama/tabulate with Rich#335
Merged
Conversation
…d semantic_validator.py - Replace manual ANSI escape codes and tabulate table rendering with Rich library (Panel, Table, Text, Console) in status.py (~323 → 255 lines) - Replace colorama/tabulate in semantic_validator._log_all_errors() with Rich - Remove colorama and tabulate from project dependencies; add rich>=13.0 - Update test_status_presentation.py: remove colorama dependency, add _render() helper, update assertions to check Text.plain/.style and rendered ANSI codes - Keep _ORANGE and _DIM as named constants (now Rich color name strings) Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
…d, separator before totals, Code/NA inside impl table Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
…arators, Code/NA and Tests/SVCs as 2-cell boxes Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
- Replace colorama/tabulate svc table with two side-by-side Rich tables: Total Tests (Passed/Failed/Skipped) and Total SVCs (missing tests/MVRs) - Center IMPLEMENTATIONS header above In Code / Not in Code tables using two-pass render+measure approach - Make IMPLEMENTATIONS, In Code, Not in Code headers plain white (not colored green/red based on completion) - Use legend as table caption (centered automatically by Rich) - Add empty line before IMPLEMENTATIONS section Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Member
Author
|
@Jonas-Werne FYI. With this in place we should be able to work on #311 now. Shall we call the current output verbose and add the SVC things you mentioned? Comment in #311. |
- black reformatted status.py - removed unused Text and _ORANGE imports from test file - deleted PLAN_CODE_SMELLS.md (all items resolved) Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
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.
Summary
colorama) andtabulatetable rendering instatus.pywith the Rich library (Table,Text,Columns,Console)colorama/tabulateinsemantic_validator._log_all_errors()with Richcoloramaandtabulatefrom project dependencies; addsrich>=13.0status.pyreduced from 323 → 212 linesLayout
DOUBLE_EDGEbox, row separators, legend as centered captionTest plan
hatch run dev:pytest tests/unit/reqstool/commands/status/ -v— 19 tests passhatch run dev:pytest tests/unit --tb=short— all unit tests passhatch run dev:flake8 src/reqstool/commands/status/status.py— cleanhatch run dev:black src/reqstool/commands/status/status.py— cleanms-001andreqstool-demofixtures