Skip to content

Commit 81cf1ac

Browse files
committed
fixes
1 parent aae59cd commit 81cf1ac

File tree

4 files changed

+26
-28
lines changed

4 files changed

+26
-28
lines changed

scripts/bootstrap.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def check_infrahub_ready(max_retries: int = 30, sleep_time: int = 2) -> bool:
9191
" [bold]docker ps[/bold]",
9292
title="Connection Error",
9393
border_style="red",
94-
box=box.ROUNDED
94+
box=box.SIMPLE
9595
))
9696
return False
9797

@@ -120,8 +120,6 @@ def run_command(command: str, description: str, step: str, color: str = "cyan",
120120

121121
def wait_for_repository_sync(seconds: int = 120) -> None:
122122
"""Wait for repository synchronization with progress bar."""
123-
console.print() # Add blank line for spacing
124-
125123
with Progress(
126124
SpinnerColumn(spinner_name="dots12", style="bold bright_yellow"),
127125
TextColumn("[progress.description]{task.description}", style="bold white"),
@@ -139,7 +137,7 @@ def wait_for_repository_sync(seconds: int = 120) -> None:
139137
TimeRemainingColumn(),
140138
console=console,
141139
) as progress:
142-
task = progress.add_task(f"⏳ Waiting for repository sync ({seconds}s)", total=seconds)
140+
task = progress.add_task("[7/7] 🔄 Waiting for repository sync", total=seconds)
143141

144142
for _ in range(seconds):
145143
time.sleep(1)
@@ -161,7 +159,7 @@ def main(branch: str = "main") -> int:
161159
" [green]•[/green] Security data\n"
162160
" [bright_magenta]•[/bright_magenta] Demo repository",
163161
border_style="bright_blue",
164-
box=box.ROUNDED,
162+
box=box.SIMPLE,
165163
title="[bold bright_blue]Bootstrap Process[/bold bright_blue]"
166164
))
167165

@@ -244,7 +242,7 @@ def main(branch: str = "main") -> int:
244242
console.print(Rule(style="dim bright_magenta"))
245243

246244
# Wait for repository sync
247-
console.print("\n[bold bright_yellow on black][7/7][/bold bright_yellow on black] 🔄 [bold white]Waiting for repository sync[/bold white]")
245+
console.print() # Add spacing
248246
wait_for_repository_sync(120)
249247

250248
console.print(Rule(style="dim bright_yellow"))
@@ -272,7 +270,7 @@ def main(branch: str = "main") -> int:
272270
" [green]•[/green] Create a Proposed Change",
273271
title="[bold bright_green]✓ Success[/bold bright_green]",
274272
border_style="bright_green",
275-
box=box.ROUNDED
273+
box=box.SIMPLE
276274
))
277275

278276
return 0

scripts/create_proposed_change.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def create_proposed_change(branch: str) -> int:
4040
f"[bright_cyan]Source Branch:[/bright_cyan] [bold yellow]{branch}[/bold yellow]\n"
4141
f"[bright_cyan]Target Branch:[/bright_cyan] [bold green]main[/bold green]",
4242
border_style="bright_magenta",
43-
box=box.ROUNDED,
43+
box=box.SIMPLE,
4444
title="[bold bright_white]Proposed Change[/bold bright_white]",
4545
title_align="left"
4646
))
@@ -131,7 +131,7 @@ async def create_proposed_change(branch: str) -> int:
131131
f"[bold bright_white]View Proposed Change:[/bold bright_white]\n\n"
132132
f"[bright_blue]{pc_url}[/bright_blue]",
133133
border_style="bright_green",
134-
box=box.ROUNDED
134+
box=box.SIMPLE
135135
))
136136

137137
console.print()

scripts/get_configs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ async def main(branch: str | None = None) -> int:
167167
f"[bold cyan]Extracting Infrahub Configuration Artifacts[/bold cyan]\n"
168168
f"[dim]Branch:[/dim] {branch_name}",
169169
border_style="cyan",
170-
box=box.ROUNDED
170+
box=box.SIMPLE
171171
))
172172

173173
if branch:
@@ -201,7 +201,7 @@ async def main(branch: str | None = None) -> int:
201201
" • Check Infrahub logs for errors",
202202
title="[bold red]Error[/bold red]",
203203
border_style="red",
204-
box=box.ROUNDED
204+
box=box.SIMPLE
205205
))
206206
return 1
207207

@@ -214,7 +214,7 @@ async def main(branch: str | None = None) -> int:
214214
f" • [cyan]{cabling_count}[/cyan] cabling matri{'x' if cabling_count == 1 else 'ces'}\n\n"
215215
f"[dim]Saved to:[/dim] [bold]./generated-configs/[/bold]",
216216
border_style="green",
217-
box=box.ROUNDED
217+
box=box.SIMPLE
218218
))
219219

220220
# Display containerlab deployment instructions if topologies were saved
@@ -224,7 +224,7 @@ async def main(branch: str | None = None) -> int:
224224
# Create deployment table
225225
deploy_table = Table(
226226
title="Containerlab Deployment Commands",
227-
box=box.ROUNDED,
227+
box=box.SIMPLE,
228228
show_header=True,
229229
header_style="bold magenta"
230230
)

tasks.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def list_tasks(context: Context) -> None:
6767
# Create a Rich table
6868
table = Table(
6969
title="Available Invoke Tasks",
70-
box=box.ROUNDED,
70+
box=box.SIMPLE,
7171
show_header=True,
7272
header_style="bold cyan"
7373
)
@@ -93,7 +93,7 @@ def info(context: Context) -> None:
9393
f"[cyan]Command:[/cyan] [dim]{COMPOSE_COMMAND}[/dim]",
9494
title="[bold]Infrahub Configuration[/bold]",
9595
border_style="blue",
96-
box=box.ROUNDED
96+
box=box.SIMPLE
9797
)
9898
console.print()
9999
console.print(info_panel)
@@ -108,7 +108,7 @@ def start(context: Context) -> None:
108108
console.print(Panel(
109109
f"[green]Starting Infrahub {edition}[/green] [dim]({INFRAHUB_VERSION})[/dim]",
110110
border_style="green",
111-
box=box.ROUNDED
111+
box=box.SIMPLE
112112
))
113113
context.run(f"{COMPOSE_COMMAND} up -d")
114114
console.print("[green]✓[/green] Infrahub started successfully")
@@ -153,7 +153,7 @@ def bootstrap_bash(context: Context, branch: str = "main") -> None:
153153
f"[dim]Branch:[/dim] {branch}\n"
154154
f"[dim]This will load schemas, menu, bootstrap data, security, and repository[/dim]",
155155
border_style="blue",
156-
box=box.ROUNDED
156+
box=box.SIMPLE
157157
))
158158
console.print()
159159
context.run(f"./scripts/bootstrap.sh {branch}")
@@ -176,7 +176,7 @@ def demo_dc_arista(context: Context, branch: str = "add-dc3") -> None:
176176
f"[bold cyan]Arista Data Center Demo[/bold cyan]\n"
177177
f"[dim]Branch:[/dim] {branch}",
178178
border_style="cyan",
179-
box=box.ROUNDED
179+
box=box.SIMPLE
180180
))
181181

182182
console.print(f"\n[cyan]→[/cyan] Creating branch: [bold]{branch}[/bold]")
@@ -235,7 +235,7 @@ def containerlab(context: Context, branch: str = "add-dc3", topology: str = "DC-
235235
f"[dim]Branch:[/dim] {branch}\n"
236236
f"[dim]Topology:[/dim] {topology}",
237237
border_style="magenta",
238-
box=box.ROUNDED
238+
box=box.SIMPLE
239239
))
240240

241241
console.print(f"\n[magenta]→[/magenta] Generating configurations from branch: [bold]{branch}[/bold]")
@@ -256,7 +256,7 @@ def destroy(context: Context) -> None:
256256
console.print(Panel(
257257
"[red]Destroying all containers and volumes[/red]",
258258
border_style="red",
259-
box=box.ROUNDED
259+
box=box.SIMPLE
260260
))
261261
context.run(f"{COMPOSE_COMMAND} down -v")
262262
console.print("[green]✓[/green] All containers and volumes destroyed")
@@ -269,7 +269,7 @@ def stop(context: Context) -> None:
269269
console.print(Panel(
270270
"[yellow]Stopping all containers[/yellow]",
271271
border_style="yellow",
272-
box=box.ROUNDED
272+
box=box.SIMPLE
273273
))
274274
context.run(f"{COMPOSE_COMMAND} down")
275275
console.print("[green]✓[/green] All containers stopped")
@@ -283,7 +283,7 @@ def restart(context: Context, component: str = "") -> None:
283283
console.print(Panel(
284284
f"[yellow]Restarting component:[/yellow] [bold]{component}[/bold]",
285285
border_style="yellow",
286-
box=box.ROUNDED
286+
box=box.SIMPLE
287287
))
288288
context.run(f"{COMPOSE_COMMAND} restart {component}")
289289
console.print(f"[green]✓[/green] Component '{component}' restarted")
@@ -293,7 +293,7 @@ def restart(context: Context, component: str = "") -> None:
293293
console.print(Panel(
294294
"[yellow]Restarting all containers[/yellow]",
295295
border_style="yellow",
296-
box=box.ROUNDED
296+
box=box.SIMPLE
297297
))
298298
context.run(f"{COMPOSE_COMMAND} restart")
299299
console.print("[green]✓[/green] All containers restarted")
@@ -306,7 +306,7 @@ def run_tests(context: Context) -> None:
306306
console.print(Panel(
307307
"[bold cyan]Running Tests[/bold cyan]",
308308
border_style="cyan",
309-
box=box.ROUNDED
309+
box=box.SIMPLE
310310
))
311311
context.run("pytest -vv tests")
312312
console.print("[green]✓[/green] Tests completed")
@@ -320,7 +320,7 @@ def validate(context: Context) -> None:
320320
"[bold cyan]Running Code Validation[/bold cyan]\n"
321321
"[dim]Ruff → Mypy → Pytest[/dim]",
322322
border_style="cyan",
323-
box=box.ROUNDED
323+
box=box.SIMPLE
324324
))
325325

326326
console.print("\n[cyan]→[/cyan] Running Ruff checks...")
@@ -344,7 +344,7 @@ def format(context: Context) -> None:
344344
"[bold magenta]Formatting Python Code[/bold magenta]\n"
345345
"[dim]Ruff Format → Ruff Fix[/dim]",
346346
border_style="magenta",
347-
box=box.ROUNDED
347+
box=box.SIMPLE
348348
))
349349

350350
exec_cmds = ["ruff format .", "ruff check . --fix"]
@@ -391,7 +391,7 @@ def lint_all(context: Context) -> None:
391391
"[bold yellow]Running All Linters[/bold yellow]\n"
392392
"[dim]YAML → Ruff → Mypy[/dim]",
393393
border_style="yellow",
394-
box=box.ROUNDED
394+
box=box.SIMPLE
395395
))
396396

397397
console.print("\n[yellow]→[/yellow] Running yamllint...")
@@ -415,7 +415,7 @@ def docs_build(context: Context) -> None:
415415
"[bold blue]Building Documentation Website[/bold blue]\n"
416416
f"[dim]Directory:[/dim] {DOCUMENTATION_DIRECTORY}",
417417
border_style="blue",
418-
box=box.ROUNDED
418+
box=box.SIMPLE
419419
))
420420

421421
exec_cmd = "npm run build"

0 commit comments

Comments
 (0)