Skip to content

Commit 0a14602

Browse files
committed
✨ Rename .fastapi to .fastapicloud
1 parent 26ffd30 commit 0a14602

5 files changed

Lines changed: 18 additions & 18 deletions

File tree

src/fastapi_cloud_cli/utils/apps.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AppConfig(BaseModel):
1010

1111

1212
def get_app_config(path_to_deploy: Path) -> Optional[AppConfig]:
13-
config_path = path_to_deploy / ".fastapi/cloud.json"
13+
config_path = path_to_deploy / ".fastapicloud/cloud.json"
1414

1515
if not config_path.exists():
1616
return None
@@ -19,24 +19,24 @@ def get_app_config(path_to_deploy: Path) -> Optional[AppConfig]:
1919

2020

2121
README = """
22-
> Why do I have a folder named ".fastapi" in my project? 🤔
23-
The ".fastapi" folder is created when you link a directory to a FastAPI Cloud project.
22+
> Why do I have a folder named ".fastapicloud" in my project? 🤔
23+
The ".fastapicloud" folder is created when you link a directory to a FastAPI Cloud project.
2424
2525
> What does the "cloud.json" file contain?
2626
The "cloud.json" file contains:
2727
- The ID of the FastAPI app that you linked ("app_id")
2828
- The ID of the team your FastAPI Cloud project is owned by ("team_id")
2929
30-
> Should I commit the ".fastapi" folder?
31-
No, you should not commit the ".fastapi" folder to your version control system.
30+
> Should I commit the ".fastapicloud" folder?
31+
No, you should not commit the ".fastapicloud" folder to your version control system.
3232
That's why there's a ".gitignore" file in this folder.
3333
"""
3434

3535

3636
def write_app_config(path_to_deploy: Path, app_config: AppConfig) -> None:
37-
config_path = path_to_deploy / ".fastapi/cloud.json"
38-
readme_path = path_to_deploy / ".fastapi/README.md"
39-
gitignore_path = path_to_deploy / ".fastapi/.gitignore"
37+
config_path = path_to_deploy / ".fastapicloud/cloud.json"
38+
readme_path = path_to_deploy / ".fastapicloud/README.md"
39+
gitignore_path = path_to_deploy / ".fastapicloud/.gitignore"
4040
config_path.parent.mkdir(parents=True, exist_ok=True)
4141

4242
config_path.write_text(

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def configured_app(tmp_path: Path) -> ConfiguredApp:
5151
app_id = "123"
5252
team_id = "456"
5353

54-
config_path = tmp_path / ".fastapi" / "cloud.json"
54+
config_path = tmp_path / ".fastapicloud" / "cloud.json"
5555

5656
config_path.parent.mkdir(parents=True, exist_ok=True)
5757
config_path.write_text(f'{{"app_id": "{app_id}", "team_id": "{team_id}"}}')

tests/test_cli_deploy.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def test_exists_successfully_when_deployment_is_done_when_app_is_configured(
386386
team_id = team_data["id"]
387387
deployment_data = _get_random_deployment(app_id=app_id)
388388

389-
config_path = tmp_path / ".fastapi" / "cloud.json"
389+
config_path = tmp_path / ".fastapicloud" / "cloud.json"
390390

391391
config_path.parent.mkdir(parents=True, exist_ok=True)
392392
config_path.write_text(f'{{"app_id": "{app_id}", "team_id": "{team_id}"}}')
@@ -439,7 +439,7 @@ def test_shows_error_when_deployment_build_fails(
439439
team_id = team_data["id"]
440440
deployment_data = _get_random_deployment(app_id=app_id)
441441

442-
config_path = tmp_path / ".fastapi" / "cloud.json"
442+
config_path = tmp_path / ".fastapicloud" / "cloud.json"
443443

444444
config_path.parent.mkdir(parents=True, exist_ok=True)
445445
config_path.write_text(f'{{"app_id": "{app_id}", "team_id": "{team_id}"}}')
@@ -573,18 +573,18 @@ def test_creates_config_folder_and_creates_git_ignore(
573573
) -> None:
574574
_deploy_without_waiting(respx_mock, tmp_path)
575575

576-
assert (tmp_path / ".fastapi" / "cloud.json").exists()
577-
assert (tmp_path / ".fastapi" / "README.md").exists()
578-
assert (tmp_path / ".fastapi" / ".gitignore").read_text() == "*"
576+
assert (tmp_path / ".fastapicloud" / "cloud.json").exists()
577+
assert (tmp_path / ".fastapicloud" / "README.md").exists()
578+
assert (tmp_path / ".fastapicloud" / ".gitignore").read_text() == "*"
579579

580580

581581
@pytest.mark.respx(base_url=settings.base_api_url)
582582
def test_does_not_duplicate_entry_in_git_ignore(
583583
logged_in_cli: None, tmp_path: Path, respx_mock: respx.MockRouter
584584
) -> None:
585585
git_ignore_path = tmp_path / ".gitignore"
586-
git_ignore_path.write_text(".fastapi\n")
586+
git_ignore_path.write_text(".fastapicloud\n")
587587

588588
_deploy_without_waiting(respx_mock, tmp_path)
589589

590-
assert git_ignore_path.read_text() == ".fastapi\n"
590+
assert git_ignore_path.read_text() == ".fastapicloud\n"

tests/test_env_delete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def configured_app(tmp_path: Path) -> Path:
2020
app_id = "123"
2121
team_id = "456"
2222

23-
config_path = tmp_path / ".fastapi" / "cloud.json"
23+
config_path = tmp_path / ".fastapicloud" / "cloud.json"
2424

2525
config_path.parent.mkdir(parents=True, exist_ok=True)
2626
config_path.write_text(f'{{"app_id": "{app_id}", "team_id": "{team_id}"}}')

tests/test_env_set.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def configured_app(tmp_path: Path) -> Path:
2020
app_id = "123"
2121
team_id = "456"
2222

23-
config_path = tmp_path / ".fastapi" / "cloud.json"
23+
config_path = tmp_path / ".fastapicloud" / "cloud.json"
2424

2525
config_path.parent.mkdir(parents=True, exist_ok=True)
2626
config_path.write_text(f'{{"app_id": "{app_id}", "team_id": "{team_id}"}}')

0 commit comments

Comments
 (0)