Skip to content

Commit

Permalink
Bump version to 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
avsthiago committed Apr 3, 2023
1 parent 3ada70e commit 1a000dc
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion kopylot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
app = typer.Typer()
console = Console()

__version__ = "0.0.3"


@app.command()
def ctl(args: List[str]) -> subprocess.CompletedProcess:
Expand All @@ -36,7 +38,7 @@ def diagnose(
no_color: bool = typer.Option(False, "--no-color", help="Disable color output and borders"),
) -> str:
"""
Diagnose a pod, deployment, or service using an LLM model.
Diagnose a resource e.g. pod, deployment, or service using an LLM model.
"""
# run `kubectl describe` for the resource
describe_command = f"kubectl describe {resource_type} {resource_name}"
Expand Down Expand Up @@ -122,5 +124,19 @@ def chat() -> None:
subprocess.run(command, shell=True)


def version_callback(value: bool) -> None:
if value:
typer.echo(f"KoPylot Version: {__version__}")
raise typer.Exit()


@app.callback()
def common(
ctx: typer.Context,
version: bool = typer.Option(None, "--version", callback=version_callback),
) -> None:
pass


if __name__ == "__main__":
app()

0 comments on commit 1a000dc

Please sign in to comment.