Skip to content

Commit

Permalink
add flag to looper init #514
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Aug 20, 2024
1 parent 4c9549b commit 40c6634
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
11 changes: 2 additions & 9 deletions looper/cli_pydantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,8 @@ def run_looper(args: TopLevelParser, parser: ArgumentParser, test_args=None):
console = Console()
console.clear()
console.rule(f"\n[magenta]Looper initialization[/magenta]")
console.print(
"[bold]Would you like to follow a guided tutorial?[/bold] [green]Y[/green] / [red]n[/red]..."
)

selection = None
while selection not in ["y", "n"]:
selection = console.input("\nSelection: ").lower().strip()

if selection == "n":
selection = subcommand_args.generic
if selection is True:
console.clear()
return int(
not initiate_looper_config(
Expand Down
8 changes: 8 additions & 0 deletions looper/command_models/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,14 @@ class ArgumentEnum(enum.Enum):
default=(str, None),
description="Output directory",
)

GENERIC = Argument(
name="generic",
alias="-g",
default=(bool, False),
description="Use generic looper config?",
)

SAMPLE_PIPELINE_INTERFACES = Argument(
name="sample_pipeline_interfaces",
alias="-S",
Expand Down
1 change: 1 addition & 0 deletions looper/command_models/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ def create_model(self) -> Type[pydantic.BaseModel]:
ArgumentEnum.PEP_CONFIG.value,
ArgumentEnum.SAMPLE_PIPELINE_INTERFACES.value,
ArgumentEnum.PROJECT_PIPELINE_INTERFACES.value,
ArgumentEnum.GENERIC.value,
],
)

Expand Down

0 comments on commit 40c6634

Please sign in to comment.