From ac33a5a1395698dfe40ef5c7a2c3085c602e4e8f Mon Sep 17 00:00:00 2001 From: Carson-Shaar Date: Mon, 16 Oct 2023 15:22:54 -0400 Subject: [PATCH] minor cli changes --- zt_cli/cli.py | 4 +--- zt_dev_cli/cli.py | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/zt_cli/cli.py b/zt_cli/cli.py index f88b4ad6..953f717e 100644 --- a/zt_cli/cli.py +++ b/zt_cli/cli.py @@ -3,7 +3,6 @@ import os import typer from typing_extensions import Annotated -import logging import uvicorn from typing import Optional from rich import print @@ -26,7 +25,7 @@ def print_ascii_logo(): @app.command() def start(mode: Annotated[Optional[str], typer.Argument(help="The mode to run zero-true in, can be one of 'notebook' and 'app'")], host: Annotated[Optional[str], typer.Argument(help="Host address to bind to.")]="localhost", - port: Annotated[Optional[str],typer.Argument(help="Port number to bind to.")]=""): + port: Annotated[Optional[str], typer.Argument(help="Port number to bind to.")]=""): """ Start the Zero-True application. """ @@ -41,7 +40,6 @@ def start(mode: Annotated[Optional[str], typer.Argument(help="The mode to run ze else: typer.echo("Invalid mode. Choose either 'notebook' or 'app'.") raise typer.Exit(code=1) - print(f"[yellow]Starting Zero-True in {mode} mode on http://{host}:{port}[/yellow]") diff --git a/zt_dev_cli/cli.py b/zt_dev_cli/cli.py index e3d5bcf9..5cfb4143 100644 --- a/zt_dev_cli/cli.py +++ b/zt_dev_cli/cli.py @@ -59,10 +59,8 @@ def run_yarn_build(): @app.command() def run(mode: Annotated[Optional[str], typer.Argument(help="The mode to run zero-true in, can be one of 'notebook' and 'app'")], - host: Annotated[Optional[str], typer.Argument(help="Host address to bind to.")]="0.0.0.0", - port: Annotated[Optional[str],typer.Argument(help="Port number to bind to.")]=""): + port: Annotated[Optional[str], typer.Argument(help="Port number to bind to.")]=""): - print(port) print_ascii_logo() port = port if port else 5173 @@ -81,6 +79,5 @@ def run(mode: Annotated[Optional[str], typer.Argument(help="The mode to run zero backend_process.wait() frontend_process.wait() - if __name__ == "__main__": app()