Add a workflow catalog source.
(
url: str = typer.Argument(..., help="Catalog URL to add"),
name: str | None = typer.Option(None, "--name", help="Catalog name"),
)
| 1007 | |
| 1008 | @workflow_catalog_app.command("add") |
| 1009 | def workflow_catalog_add( |
| 1010 | url: str = typer.Argument(..., help="Catalog URL to add"), |
| 1011 | name: str | None = typer.Option(None, "--name", help="Catalog name"), |
| 1012 | ): |
| 1013 | """Add a workflow catalog source.""" |
| 1014 | from .catalog import WorkflowCatalog, WorkflowValidationError |
| 1015 | |
| 1016 | project_root = _require_specify_project() |
| 1017 | catalog = WorkflowCatalog(project_root) |
| 1018 | try: |
| 1019 | catalog.add_catalog(url, name) |
| 1020 | except WorkflowValidationError as exc: |
| 1021 | console.print(f"[red]Error:[/red] {exc}") |
| 1022 | raise typer.Exit(1) |
| 1023 | |
| 1024 | console.print(f"[green]✓[/green] Catalog source added: {url}") |
| 1025 | |
| 1026 | |
| 1027 | @workflow_catalog_app.command("remove") |
nothing calls this directly
no test coverage detected