24 lines
698 B
Python
24 lines
698 B
Python
from hatchet_sdk.runnables.types import EmptyModel
|
|
import typer
|
|
from knoc.settings import settings
|
|
|
|
from knoc_plugin_template.workflows import do_nothing_wf, SimpleOutput
|
|
|
|
app = typer.Typer(no_args_is_help=True)
|
|
|
|
|
|
@app.command()
|
|
def do_nothing():
|
|
"""A CLI command that does very litle"""
|
|
typer.echo("Just a template of a CLI command.")
|
|
typer.echo(
|
|
f"The plugin has a setting, which is: {settings.plugin_template.setting}."
|
|
)
|
|
|
|
|
|
@app.command()
|
|
def run_wf():
|
|
"""A CLI command that runs a workflow"""
|
|
typer.echo("Just a template of a CLI command that runs a workflow.")
|
|
typer.echo("Requesting the workflow to tun...")
|
|
typer.echo(do_nothing_wf.run(EmptyModel()))
|