@@ -516,9 +516,13 @@ def show_linter_violations(
516
516
pass
517
517
518
518
519
- def make_progress_bar (message : str , console : t .Optional [RichConsole ] = None ) -> Progress :
519
+ def make_progress_bar (
520
+ message : str ,
521
+ console : t .Optional [RichConsole ] = None ,
522
+ justify : t .Literal ["default" , "left" , "center" , "right" , "full" ] = "right" ,
523
+ ) -> Progress :
520
524
return Progress (
521
- TextColumn (f"[bold blue]{ message } " , justify = "right" ),
525
+ TextColumn (f"[bold blue]{ message } " , justify = justify ),
522
526
BarColumn (bar_width = PROGRESS_BAR_WIDTH ),
523
527
"[progress.percentage]{task.percentage:>3.1f}%" ,
524
528
"•" ,
@@ -696,7 +700,7 @@ def update_snapshot_evaluation_progress(
696
700
)
697
701
698
702
self .evaluation_progress_live .console .print (
699
- f"{ GREEN_CHECK_MARK } { batch } { display_name } { annotation } { duration } "
703
+ f"{ batch } { display_name } { annotation } { duration } "
700
704
)
701
705
702
706
self .evaluation_total_progress .update (
@@ -749,7 +753,7 @@ def update_creation_progress(self, snapshot: SnapshotInfoLike) -> None:
749
753
if self .creation_progress is not None and self .creation_task is not None :
750
754
if self .verbosity >= Verbosity .VERBOSE :
751
755
self .creation_progress .live .console .print (
752
- f"{ GREEN_CHECK_MARK } { snapshot .display_name (self .environment_naming_info , self .default_catalog if self .verbosity < Verbosity .VERY_VERBOSE else None , dialect = self .dialect ).ljust (self .PROGRESS_BAR_COLUMN_WIDTHS ['name' ])} [green]created[/green]"
756
+ f"{ snapshot .display_name (self .environment_naming_info , self .default_catalog if self .verbosity < Verbosity .VERY_VERBOSE else None , dialect = self .dialect ).ljust (self .PROGRESS_BAR_COLUMN_WIDTHS ['name' ])} [green]created[/green]"
753
757
)
754
758
self .creation_progress .update (self .creation_task , refresh = True , advance = 1 )
755
759
@@ -799,16 +803,8 @@ def start_promotion_progress(
799
803
) -> None :
800
804
"""Indicates that a new snapshot promotion progress has begun."""
801
805
if self .promotion_progress is None :
802
- self .promotion_progress = Progress (
803
- TextColumn (
804
- "[bold blue]Updating virtual layer " , # space to align with other progress bars
805
- justify = "right" ,
806
- ),
807
- BarColumn (bar_width = PROGRESS_BAR_WIDTH ),
808
- "[progress.percentage]{task.percentage:>3.1f}%" ,
809
- "•" ,
810
- TimeElapsedColumn (),
811
- console = self .console ,
806
+ self .promotion_progress = make_progress_bar (
807
+ "Updating virtual layer " , self .console , justify = "left"
812
808
)
813
809
814
810
self .promotion_progress .start ()
@@ -824,10 +820,9 @@ def update_promotion_progress(self, snapshot: SnapshotInfoLike, promoted: bool)
824
820
"""Update the snapshot promotion progress."""
825
821
if self .promotion_progress is not None and self .promotion_task is not None :
826
822
if self .verbosity >= Verbosity .VERBOSE :
827
- check_mark = f"{ GREEN_CHECK_MARK } " if promoted else " "
828
823
action_str = "[green]promoted[/green]" if promoted else "[yellow]demoted[/yellow]"
829
824
self .promotion_progress .live .console .print (
830
- f"{ check_mark } { snapshot .display_name (self .environment_naming_info , self .default_catalog if self .verbosity < Verbosity .VERY_VERBOSE else None , dialect = self .dialect ).ljust (self .PROGRESS_BAR_COLUMN_WIDTHS ['name' ])} { action_str } "
825
+ f"{ snapshot .display_name (self .environment_naming_info , self .default_catalog if self .verbosity < Verbosity .VERY_VERBOSE else None , dialect = self .dialect ).ljust (self .PROGRESS_BAR_COLUMN_WIDTHS ['name' ])} { action_str } "
831
826
)
832
827
self .promotion_progress .update (self .promotion_task , refresh = True , advance = 1 )
833
828
@@ -2759,8 +2754,8 @@ def _format_evaluation_model_interval(snapshot: Snapshot, interval: Interval) ->
2759
2754
def _justify_evaluation_model_info (
2760
2755
text : str ,
2761
2756
length : int ,
2762
- justify_direction : str = "left" ,
2763
- dots_side : str = "left" ,
2757
+ justify_direction : t . Literal [ "left" , "right" ] = "left" ,
2758
+ dots_side : t . Literal [ "left" , "right" ] = "left" ,
2764
2759
prefix : str = "" ,
2765
2760
suffix : str = "" ,
2766
2761
) -> str :
0 commit comments