Skip to content

Commit edef519

Browse files
committed
💄 Update how we show messages
Shortcake-Parent: main
1 parent 8a39a12 commit edef519

File tree

5 files changed

+22
-16
lines changed

5 files changed

+22
-16
lines changed

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dependencies = [
3232
"uvicorn[standard] >= 0.17.6",
3333
"rignore >= 0.5.1",
3434
"httpx >= 0.27.0",
35-
"rich-toolkit >= 0.19.4",
35+
"rich-toolkit >= 0.19.6",
3636
"pydantic[email] >= 2.7.4; python_version < '3.13'",
3737
"pydantic[email] >= 2.8.0; python_version == '3.13'",
3838
"pydantic[email] >= 2.12.0; python_version >= '3.14'",

‎src/fastapi_cloud_cli/commands/deploy.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,10 @@ def _wait_for_deployment(
464464

465465
with (
466466
toolkit.progress(
467-
next(messages), inline_logs=True, lines_to_show=20
467+
next(messages),
468+
inline_logs=True,
469+
lines_to_show=20,
470+
done_emoji="🚀",
468471
) as progress,
469472
APIClient() as client,
470473
):
@@ -476,6 +479,7 @@ def _wait_for_deployment(
476479
progress.log(Text.from_ansi(log.message.rstrip()))
477480

478481
if log.type == "complete":
482+
progress.title = "Build complete!"
479483
progress.log("")
480484
progress.log(
481485
f"You can also check the app logs at [link={deployment.dashboard_url}]{deployment.dashboard_url}[/link]"
@@ -753,7 +757,9 @@ def deploy(
753757
archive(path or Path.cwd(), archive_path)
754758

755759
with (
756-
toolkit.progress(title="Creating deployment") as progress,
760+
toolkit.progress(
761+
title="Creating deployment", done_emoji="📦"
762+
) as progress,
757763
handle_http_errors(progress),
758764
):
759765
logger.debug("Creating deployment for app: %s", app.id)

‎src/fastapi_cloud_cli/utils/cli.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _get_tag_segments(
4040
tag = emojis[self.animation_counter % len(emojis)]
4141

4242
if done:
43-
tag = emojis[-1]
43+
tag = metadata.get("done_emoji", emojis[-1])
4444

4545
left_padding = self.tag_width - 1
4646
left_padding = max(0, left_padding)

‎tests/test_cli_deploy.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import string
33
from datetime import timedelta
44
from pathlib import Path
5-
from typing import Optional, TypedDict
5+
from typing import TypedDict
66
from unittest.mock import patch
77

88
import httpx
@@ -37,14 +37,14 @@ class RandomApp(TypedDict):
3737
slug: str
3838
id: str
3939
team_id: str
40-
directory: Optional[str]
40+
directory: str | None
4141

4242

4343
def _get_random_app(
4444
*,
45-
slug: Optional[str] = None,
46-
team_id: Optional[str] = None,
47-
directory: Optional[str] = None,
45+
slug: str | None = None,
46+
team_id: str | None = None,
47+
directory: str | None = None,
4848
) -> RandomApp:
4949
name = "".join(random.choices(string.ascii_lowercase, k=10))
5050
slug = slug or "".join(random.choices(string.ascii_lowercase, k=10))
@@ -62,7 +62,7 @@ def _get_random_app(
6262

6363
def _get_random_deployment(
6464
*,
65-
app_id: Optional[str] = None,
65+
app_id: str | None = None,
6666
status: str = "waiting_upload",
6767
) -> dict[str, str]:
6868
id = "".join(random.choices(string.digits, k=10))
@@ -1314,7 +1314,7 @@ def build_logs_handler(request: httpx.Request, route: respx.Route) -> Response:
13141314
with changing_dir(tmp_path), patch("time.sleep"):
13151315
result = runner.invoke(app, ["deploy"])
13161316

1317-
assert "short wait message" in result.output
1317+
assert "Build complete!" in result.output
13181318

13191319

13201320
@pytest.mark.respx
@@ -1382,7 +1382,7 @@ def build_logs_handler(request: httpx.Request, route: respx.Route) -> Response:
13821382
with changing_dir(tmp_path), patch("time.sleep"):
13831383
result = runner.invoke(app, ["deploy"])
13841384

1385-
assert "long wait message" in result.output
1385+
assert "Build complete!" in result.output
13861386

13871387

13881388
@pytest.mark.respx

‎uv.lock‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)