mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-03 21:28:29 +00:00
24 lines
606 B
Python
24 lines
606 B
Python
import subprocess
|
|
|
|
import click
|
|
|
|
|
|
def plot_flow() -> None:
|
|
"""
|
|
Plot the flow by running a command in the UV environment.
|
|
"""
|
|
command = ["uv", "run", "plot"]
|
|
|
|
try:
|
|
result = subprocess.run(command, capture_output=False, text=True, check=True)
|
|
|
|
if result.stderr:
|
|
click.echo(result.stderr, err=True)
|
|
|
|
except subprocess.CalledProcessError as e:
|
|
click.echo(f"An error occurred while plotting the flow: {e}", err=True)
|
|
click.echo(e.output, err=True)
|
|
|
|
except Exception as e:
|
|
click.echo(f"An unexpected error occurred: {e}", err=True)
|