Skip to content

Commit 9b8b4e1

Browse files
committed
Rename reset command to unlink
1 parent 24cc6d3 commit 9b8b4e1

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/fastapi_cloud_cli/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .commands.env import env_app
55
from .commands.login import login
66
from .commands.logout import logout
7-
from .commands.reset import reset
7+
from .commands.unlink import unlink
88
from .commands.whoami import whoami
99
from .logging import setup_logging
1010
from .utils.sentry import init_sentry
@@ -21,7 +21,7 @@
2121
app.command()(login)
2222
app.command()(logout)
2323
app.command()(whoami)
24-
app.command()(reset)
24+
app.command()(unlink)
2525

2626
app.add_typer(env_app, name="env")
2727

src/fastapi_cloud_cli/commands/deploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def deploy(
589589
if not app:
590590
toolkit.print_line()
591591
toolkit.print(
592-
"If you deleted this app, you can run [bold]fastapi reset[/] to delete the local configuration.",
592+
"If you deleted this app, you can run [bold]fastapi unlink[/] to unlink the local configuration.",
593593
tag="tip",
594594
)
595595
raise typer.Exit(1)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
logger = logging.getLogger(__name__)
1111

1212

13-
def reset() -> Any:
13+
def unlink() -> Any:
1414
"""
15-
Reset by deleting the `.fastapicloud` directory.
15+
Unlink by deleting the `.fastapicloud` directory.
1616
"""
1717
with get_rich_toolkit(minimal=True) as toolkit:
1818
config_dir = Path.cwd() / ".fastapicloud"
@@ -25,5 +25,5 @@ def reset() -> Any:
2525
raise typer.Exit(1)
2626

2727
shutil.rmtree(config_dir)
28-
toolkit.print("FastAPI Cloud configuration has been reset successfully! 🚀")
28+
toolkit.print("FastAPI Cloud configuration has been unlinked successfully! 🚀")
2929
logger.debug(f"Deleted configuration directory: {config_dir}")
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
runner = CliRunner()
99

1010

11-
def test_reset_removes_fastapicloud_dir(tmp_path: Path) -> None:
11+
def test_unlink_removes_fastapicloud_dir(tmp_path: Path) -> None:
1212
config_dir = tmp_path / ".fastapicloud"
1313
config_dir.mkdir(parents=True)
1414

@@ -21,12 +21,12 @@ def test_reset_removes_fastapicloud_dir(tmp_path: Path) -> None:
2121
gitignore_file = config_dir / ".gitignore"
2222
gitignore_file.write_text("*")
2323

24-
with patch("fastapi_cloud_cli.commands.reset.Path.cwd", return_value=tmp_path):
25-
result = runner.invoke(app, ["reset"])
24+
with patch("fastapi_cloud_cli.commands.unlink.Path.cwd", return_value=tmp_path):
25+
result = runner.invoke(app, ["unlink"])
2626

2727
assert result.exit_code == 0
2828
assert (
29-
"FastAPI Cloud configuration has been reset successfully! 🚀" in result.output
29+
"FastAPI Cloud configuration has been unlinked successfully! 🚀" in result.output
3030
)
3131

3232
assert not config_dir.exists()
@@ -35,12 +35,12 @@ def test_reset_removes_fastapicloud_dir(tmp_path: Path) -> None:
3535
assert not gitignore_file.exists()
3636

3737

38-
def test_reset_when_no_configuration_exists(tmp_path: Path) -> None:
38+
def test_unlink_when_no_configuration_exists(tmp_path: Path) -> None:
3939
config_dir = tmp_path / ".fastapicloud"
4040
assert not config_dir.exists()
4141

42-
with patch("fastapi_cloud_cli.commands.reset.Path.cwd", return_value=tmp_path):
43-
result = runner.invoke(app, ["reset"])
42+
with patch("fastapi_cloud_cli.commands.unlink.Path.cwd", return_value=tmp_path):
43+
result = runner.invoke(app, ["unlink"])
4444

4545
assert result.exit_code == 1
4646
assert (

0 commit comments

Comments
 (0)