Repository navigation
Route color through the Outputter instead of mutating colorama globals - #369
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #369 +/- ##
===========================================
+ Coverage 96.95% 97.08% +0.12%
===========================================
Files 9 9
Lines 592 584 -8
===========================================
- Hits 574 567 -7
+ Misses 18 17 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
danielfromearth
left a comment
There was a problem hiding this comment.
Thanks for this great contribution! This looks good for #366. Two Outputters with opposite no_color do conflict on develop, and don't here.
61 passed, and the txt/CSV/xlsx outputs are byte-identical. The only difference I saw when verifying is three redundant trailing \x1b[0m, from the bare print(total_diff_count) in console.py that used to pick up colorama's global autoreset by accident. The count line seems cleaner without them.
Two small comments but otherwise looks good. Note that I haven't tested on Windows.
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
|
Addressed both review comments in signed commit c3b1fed: added the changelog attribution/removed the extra blank line, and expanded the per-write comment to explain why sys.stdout is intentionally re-read for capsys/redirect_stdout. Full suite passes via uv run pytest. |
|
Verified the current head against both requested review points: the changelog entry includes the contributor attribution with no extra blank line, and the per-write AnsiToWin32 comment explains the capsys/redirect_stdout requirement. The branch is current with |
|
@danielfromearth Both requested changes are present on current head c3b1fed: changelog attribution/spacing is corrected and the per-write sys.stdout comment documents the capsys/redirect_stdout requirement. The focused printing tests previously pass 10/10, all review threads are resolved, and there are no current failing or pending checks. Could you re-review the current head? |
|
Thanks @sylvesterkaczmarek! |
Closes #366.
Description
Keep colors and ANSI width compensation on each
Outputter, route section headings through that palette, and remove global colorama mutation. Use a per-write console wrapper so terminal conversion and redirected-output stripping do not replace the caller's standard streams.Local test steps
pytest: 60 passed, 1 authenticated integration test deselected.git diff --checkpassed.Overview of integration done
Existing CLI pseudo-terminal and alignment tests, text/CSV/Excel golden-file tests, and the offline ATL06 comparison passed unchanged. Live Earthdata and Windows-console testing were not run.
PR Acceptance Checklist
CHANGELOG.mdupdated.📚 Documentation preview 📚: https://ncompare--369.org.readthedocs.build/en/369/