Skip to content

Commit 7ebfaea

Browse files
committed
Incorporate feedback
1 parent 2a08f0f commit 7ebfaea

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

sqlmesh/core/console.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,10 +1150,13 @@ def update_signal_progress(
11501150

11511151
# Color coding to help detect partial interval ranges quickly
11521152
if ready_intervals == check_intervals:
1153+
msg = "All ready"
11531154
color = "green"
11541155
elif ready_intervals:
1156+
msg = "Some ready"
11551157
color = "yellow"
11561158
else:
1159+
msg = "None ready"
11571160
color = "red"
11581161

11591162
if self.verbosity < Verbosity.VERY_VERBOSE:
@@ -1168,20 +1171,20 @@ def update_signal_progress(
11681171
formatted_ready_intervals.append(f"... and {num_ready_intervals - 3} more")
11691172

11701173
check = ", ".join(formatted_check_intervals)
1171-
tree.add(f"check: {check}")
1174+
tree.add(f"Check: {check}")
11721175

11731176
ready = ", ".join(formatted_ready_intervals)
1174-
tree.add(f"[{color}]ready: {ready}[/{color}]")
1177+
tree.add(f"[{color}]{msg}: {ready}[/{color}]")
11751178
else:
1176-
check_tree = Tree("check")
1179+
check_tree = Tree("Check")
11771180
tree.add(check_tree)
11781181
for interval in formatted_check_intervals:
11791182
check_tree.add(interval)
11801183

1181-
ready_tree = Tree(f"[{color}]ready[/{color}]")
1184+
ready_tree = Tree(f"[{color}]{msg}[/{color}]")
11821185
tree.add(ready_tree)
11831186
for interval in formatted_ready_intervals:
1184-
ready_tree.add(interval)
1187+
ready_tree.add(f"[{color}]{interval}[/{color}]")
11851188

11861189
if self.signal_status_tree is not None:
11871190
self.signal_status_tree.add(tree)

tests/cli/test_cli.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2141,12 +2141,12 @@ def none_ready(batch):
21412141

21422142
assert "Checking signals for sqlmesh_example.model_with_signals" in result.output
21432143
assert "[1/1] only_first_two_ready" in result.output
2144-
assert "check: 2022-12-28 - 2022-12-31" in result.output
2145-
assert "ready: 2022-12-28 - 2022-12-29" in result.output
2144+
assert "Check: 2022-12-28 - 2022-12-31" in result.output
2145+
assert "Some ready: 2022-12-28 - 2022-12-29" in result.output
21462146

21472147
assert "Checking signals for sqlmesh_example.model_with_unready" in result.output
21482148
assert "[1/1] none_ready" in result.output
2149-
assert "ready: no intervals" in result.output
2149+
assert "None ready: no intervals" in result.output
21502150

21512151
# Test 2: Run command with start and end dates
21522152
result = runner.invoke(
@@ -2165,13 +2165,13 @@ def none_ready(batch):
21652165

21662166
assert "Checking signals for sqlmesh_example.model_with_signals" in result.output
21672167
assert "[1/1] only_first_two_ready" in result.output
2168-
assert "check: 2022-12-30 - 2022-12-31" in result.output
2169-
assert "ready: 2022-12-30 - 2022-12-31" in result.output
2168+
assert "Check: 2022-12-30 - 2022-12-31" in result.output
2169+
assert "All ready: 2022-12-30 - 2022-12-31" in result.output
21702170

21712171
assert "Checking signals for sqlmesh_example.model_with_unready" in result.output
21722172
assert "[1/1] none_ready" in result.output
2173-
assert "check: 2022-12-29 - 2022-12-31" in result.output
2174-
assert "ready: no intervals" in result.output
2173+
assert "Check: 2022-12-29 - 2022-12-31" in result.output
2174+
assert "None ready: no intervals" in result.output
21752175

21762176
# Only one model was executed
21772177
assert "100.0% • 1/1 • 0:00:00" in result.output

0 commit comments

Comments
 (0)