It works
This commit is contained in:
@@ -9,7 +9,7 @@ from typing import Optional, Dict
|
|||||||
|
|
||||||
import typer
|
import typer
|
||||||
from rich.console import Console
|
from rich.console import Console
|
||||||
from rich.progress import Progress, SpinnerColumn, TextColumn
|
from rich.progress import Progress, SpinnerColumn, TextColumn, TimeElapsedColumn
|
||||||
from rich.table import Table
|
from rich.table import Table
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@@ -172,10 +172,10 @@ def generate(
|
|||||||
console.print(f"[green]OK[/green] Backend initialized: {backend_id}")
|
console.print(f"[green]OK[/green] Backend initialized: {backend_id}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
import traceback
|
import traceback
|
||||||
console.print(f"[red]Error initializing backend: {repr(e)}[/red]")
|
console.print(f"[red]Error initializing backend: {repr(e)}[/red]")
|
||||||
console.print(traceback.format_exc())
|
console.print(traceback.format_exc())
|
||||||
console.print(f"[yellow]Elapsed: {format_duration(time.time() - start_time)}[/yellow]")
|
console.print(f"[yellow]Elapsed: {format_duration(time.time() - start_time)}[/yellow]")
|
||||||
raise typer.Exit(1)
|
raise typer.Exit(1)
|
||||||
|
|
||||||
# Generate shots
|
# Generate shots
|
||||||
generated_shots = []
|
generated_shots = []
|
||||||
@@ -186,8 +186,10 @@ def generate(
|
|||||||
with Progress(
|
with Progress(
|
||||||
SpinnerColumn(),
|
SpinnerColumn(),
|
||||||
TextColumn("[progress.description]{task.description}"),
|
TextColumn("[progress.description]{task.description}"),
|
||||||
|
TimeElapsedColumn(),
|
||||||
console=console
|
console=console
|
||||||
) as progress:
|
) as progress:
|
||||||
|
progress.add_task("Elapsed", total=None)
|
||||||
|
|
||||||
for shot in storyboard_data.shots:
|
for shot in storyboard_data.shots:
|
||||||
task_id = progress.add_task(f"Shot {shot.id}", total=None)
|
task_id = progress.add_task(f"Shot {shot.id}", total=None)
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ class TestGenerateCommand:
|
|||||||
])
|
])
|
||||||
assert result.exit_code == 0
|
assert result.exit_code == 0
|
||||||
assert "Dry run complete" in result.output
|
assert "Dry run complete" in result.output
|
||||||
|
assert "Elapsed:" in result.output
|
||||||
|
|
||||||
def test_generate_nonexistent_storyboard(self):
|
def test_generate_nonexistent_storyboard(self):
|
||||||
"""Test generate with non-existent storyboard."""
|
"""Test generate with non-existent storyboard."""
|
||||||
|
|||||||
Reference in New Issue
Block a user