Skip to content

Route color through the Outputter instead of mutating colorama globals - #369

Open
sylvesterkaczmarek wants to merge 1 commit into
nasa:developfrom
sylvesterkaczmarek:feature/issue-366
Open

sylvesterkaczmarek wants to merge 1 commit into
nasa:developfrom
sylvesterkaczmarek:feature/issue-366

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Sep 10, 2026

Copy link
Copy Markdown

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.
  • Ruff checks and formatting passed for changed Python files; git diff --check passed.
  • New regressions cover interleaved and threaded outputters, explicit ANSI input, exception cleanup, and unchanged standard streams. The five initial color-isolation regressions failed before the fix.

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

  • Unit tests added/updated and passing.
  • Integration testing with local CLI and committed fixtures.
  • CHANGELOG.md updated.
  • Documentation reviewed; no user-facing API or option change.

📚 Documentation preview 📚: https://ncompare--369.org.readthedocs.build/en/369/

@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.08%. Comparing base (c2a18b4) to head (bf42531).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #369      +/-   ##
===========================================
+ Coverage    96.95%   97.08%   +0.12%     
===========================================
  Files            9        9              
  Lines          591      583       -8     
===========================================
- Hits           573      566       -7     
+ Misses          18       17       -1     
Flag Coverage Δ
python-3.11 97.08% <100.00%> (+0.12%) ⬆️
python-3.12 97.08% <100.00%> (+0.12%) ⬆️
python-3.13 97.08% <100.00%> (+0.12%) ⬆️
python-3.14 97.05% <100.00%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant