Skip to content

workflows

CLI for running workflows.

wf_app = Typer(callback=_wf_callback, name='wf', help='Run a pipewine workflow.', invoke_without_command=True, no_args_is_help=True) module-attribute

The main CLI application for workflows.

wf_cli(name=None)

Decorator to generate a CLI command for a dataset workflow.

Decorated functions must follwo the rules of Typer CLI commands, returning a Workflow object to be run.

Parameters:

Name Type Description Default
name str

The name of the command. Defaults to None, in which case the function name is used.

None
Source code in pipewine/cli/workflows.py
def wf_cli[T](name: str | None = None) -> Callable[[T], T]:
    """Decorator to generate a CLI command for a dataset workflow.

    Decorated functions must follwo the rules of Typer CLI commands, returning a
    `Workflow` object to be run.

    Args:
        name (str, optional): The name of the command. Defaults to None, in which case
            the function name is used.
    """
    return functools.partial(_generate_wf_command, name=name)  # type: ignore