Skip to content

Commit 28f5ac2

Browse files
authored
♻️ Improve message around application directory (#191)
1 parent 8477df2 commit 28f5ac2

5 files changed

Lines changed: 31 additions & 8 deletions

File tree

src/fastapi_cloud_cli/commands/deploy.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,14 @@ def _configure_app(
378378
initial_directory = selected_app.directory if selected_app else ""
379379

380380
directory_input = toolkit.input(
381-
title="Path to the directory containing your app (e.g. src, backend):",
381+
title=(
382+
"Directory where your app's pyproject.toml file lives (e.g. src, backend):"
383+
),
382384
tag="dir",
383385
value=initial_directory or "",
384-
placeholder="[italic]Leave empty if it's the current directory[/italic]",
386+
placeholder=(
387+
"[italic]Leave empty if pyproject.toml is in the current directory[/italic]"
388+
),
385389
validator=TypeAdapter(AppDirectory),
386390
)
387391

@@ -665,7 +669,10 @@ def deploy(
665669
path: Annotated[
666670
Path | None,
667671
typer.Argument(
668-
help="A path to the folder containing the app you want to deploy"
672+
help=(
673+
"Path to the directory with your app's pyproject.toml "
674+
"(defaults to current directory)"
675+
)
669676
),
670677
] = None,
671678
skip_wait: Annotated[

src/fastapi_cloud_cli/commands/env.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ def list(
6161
path: Annotated[
6262
Path | None,
6363
typer.Argument(
64-
help="A path to the folder containing the app you want to deploy"
64+
help=(
65+
"Path to the directory with your app's pyproject.toml "
66+
"(defaults to current directory)"
67+
)
6568
),
6669
] = None,
6770
) -> Any:
@@ -119,7 +122,10 @@ def delete(
119122
path: Annotated[
120123
Path | None,
121124
typer.Argument(
122-
help="A path to the folder containing the app you want to deploy"
125+
help=(
126+
"Path to the directory with your app's pyproject.toml "
127+
"(defaults to current directory)"
128+
)
123129
),
124130
] = None,
125131
) -> Any:
@@ -208,7 +214,10 @@ def set(
208214
path: Annotated[
209215
Path | None,
210216
typer.Argument(
211-
help="A path to the folder containing the app you want to deploy"
217+
help=(
218+
"Path to the directory with your app's pyproject.toml "
219+
"(defaults to current directory)"
220+
)
212221
),
213222
] = None,
214223
secret: Annotated[

src/fastapi_cloud_cli/commands/logs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ def logs(
113113
path: Annotated[
114114
Path | None,
115115
typer.Argument(
116-
help="Path to the folder containing the app (defaults to current directory)"
116+
help=(
117+
"Path to the directory with your app's pyproject.toml "
118+
"(defaults to current directory)"
119+
)
117120
),
118121
] = None,
119122
tail: int = typer.Option(

src/fastapi_cloud_cli/commands/setup_ci.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ def setup_ci(
157157
path: Annotated[
158158
Path | None,
159159
typer.Argument(
160-
help="Path to the folder containing the app (defaults to current directory)"
160+
help=(
161+
"Path to the directory with your app's pyproject.toml "
162+
"(defaults to current directory)"
163+
)
161164
),
162165
] = None,
163166
branch: str | None = typer.Option(

tests/test_cli_deploy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ def test_creates_app_with_directory(
528528
assert result.exit_code == 1
529529

530530
assert "App created successfully" in result.output
531+
assert "Directory where your app's pyproject.toml file lives" in result.output
531532
assert "Directory: src" in result.output
532533

533534

0 commit comments

Comments
 (0)