Option C Tools
Loading...
Searching...
No Matches
progress Namespace Reference

Classes

class  ProgressTracker
class  Dashboard

Variables

int _BAR_WIDTH = 20

Detailed Description

Purpose
-------
Provide reusable progress display for long-running OCT commands.

Responsibilities
----------------
- ProgressTracker: scrolling task checklist with per-task progress bar.
- Dashboard: fixed-size terminal display with in-place line updates and a
  background timer thread that refreshes the footer every second.
- Auto-detect TTY vs pipe; Dashboard prints final state on non-TTY.
- Thread-safe for concurrent callers (e.g. linter ThreadPoolExecutor).

Diagnostics
-----------
Domain: OCT-CORE
Levels:
    L3 — task lifecycle events
    L4 — tick and render calls

Contracts
---------
- ProgressTracker outputs to the provided stream (default: stderr).
- Dashboard outputs to the provided stream (default: stdout).
- quiet=True suppresses all output (for --json modes).
- Dashboard.finish() prints final line state on non-TTY streams.

Variable Documentation

◆ _BAR_WIDTH

int progress._BAR_WIDTH = 20
protected

Definition at line 42 of file progress.py.