Skip to content

Commit 54ced6e

Browse files
committed
Incorporate feedback
1 parent 1ec74ba commit 54ced6e

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

sqlmesh/core/console.py

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

11451145
# Color coding to help detect partial interval ranges quickly
11461146
if ready_intervals == check_intervals:
1147+
msg = "All ready"
11471148
color = "green"
11481149
elif ready_intervals:
1150+
msg = "Some ready"
11491151
color = "yellow"
11501152
else:
1153+
msg = "None ready"
11511154
color = "red"
11521155

11531156
if self.verbosity < Verbosity.VERY_VERBOSE:
@@ -1162,20 +1165,20 @@ def update_signal_progress(
11621165
formatted_ready_intervals.append(f"... and {num_ready_intervals - 3} more")
11631166

11641167
check = ", ".join(formatted_check_intervals)
1165-
tree.add(f"check: {check}")
1168+
tree.add(f"Check: {check}")
11661169

11671170
ready = ", ".join(formatted_ready_intervals)
1168-
tree.add(f"[{color}]ready: {ready}[/{color}]")
1171+
tree.add(f"[{color}]{msg}: {ready}[/{color}]")
11691172
else:
1170-
check_tree = Tree("check")
1173+
check_tree = Tree("Check")
11711174
tree.add(check_tree)
11721175
for interval in formatted_check_intervals:
11731176
check_tree.add(interval)
11741177

1175-
ready_tree = Tree(f"[{color}]ready[/{color}]")
1178+
ready_tree = Tree(f"[{color}]{msg}[/{color}]")
11761179
tree.add(ready_tree)
11771180
for interval in formatted_ready_intervals:
1178-
ready_tree.add(interval)
1181+
ready_tree.add(f"[{color}]{interval}[/{color}]")
11791182

11801183
if self.signal_status_tree is not None:
11811184
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)