allow passing input
This commit is contained in:
parent
53c32315e7
commit
44bfa767a6
@ -1,6 +1,7 @@
|
||||
import importlib
|
||||
import typer
|
||||
import sys
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated
|
||||
|
||||
app = typer.Typer()
|
||||
@ -26,8 +27,14 @@ def show(recipe: Annotated[str, typer.Option(...)]):
|
||||
|
||||
|
||||
@app.command()
|
||||
def run(recipe: Annotated[str, typer.Option(...)]):
|
||||
def run(
|
||||
recipe: Annotated[str, typer.Option(...)],
|
||||
input: Annotated[Optional[List[str]], typer.Option(...)] = None,
|
||||
):
|
||||
mod = _load_recipe(recipe)
|
||||
for input_str in input:
|
||||
beaker, filename = input_str.split("=")
|
||||
mod.csv_to_beaker(filename, beaker)
|
||||
mod.run_once()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user