Skip to content

Commit

Permalink
feat: add a welcome panel when the wizard starts
Browse files Browse the repository at this point in the history
  • Loading branch information
joanise committed Oct 4, 2024
1 parent 7e0630c commit 19cfa35
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
21 changes: 19 additions & 2 deletions everyvoice/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys
from enum import Enum
from pathlib import Path
from textwrap import dedent
from typing import Any, List, Optional

import typer
Expand Down Expand Up @@ -305,9 +306,11 @@ class ModelTypes(str, Enum):
""",
)
def new_project(
trace: bool = typer.Option(False, help="Enable trace/debugging mode", hidden=True),
trace: bool = typer.Option(
False, help="Enable question tree trace mode.", hidden=True
),
debug_state: bool = typer.Option(
False, help="Print the state along with the trace", hidden=True
False, help="Enable wizard state debug/trace mode.", hidden=True
),
resume_from: Optional[Path] = typer.Option(
None,
Expand All @@ -322,6 +325,20 @@ def new_project(
):
from everyvoice.wizard.main_tour import get_main_wizard_tour

rich_print(

Check warning on line 328 in everyvoice/cli.py

View check run for this annotation

Codecov / codecov/patch

everyvoice/cli.py#L328

Added line #L328 was not covered by tests
Panel(
dedent(
"""
Welcome to the EveryVoice Wizard. We will guide you through the process of setting up the configuration for a new EveryVoice project.
Navigation: as any point, you can hit Ctrl+C to: go back a step, view progress, save progress, or exit the wizard.
From saved progress, you can resume at any time by running the same command with the --resume-from option.
"""
).strip()
)
)

get_main_wizard_tour(trace=trace, debug_state=debug_state).run(

Check warning on line 342 in everyvoice/cli.py

View check run for this annotation

Codecov / codecov/patch

everyvoice/cli.py#L342

Added line #L342 was not covered by tests
resume_from=resume_from
)
Expand Down
2 changes: 1 addition & 1 deletion everyvoice/wizard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def keyboard_interrupt_action(self, node):
[
"Go back one step",
"Continue",
"View the question tree",
"View progress",
"Save progress",
"Exit",
],
Expand Down

0 comments on commit 19cfa35

Please sign in to comment.