From 3d895d411121a2590936e4dba9199dfa2a6befbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 7 Jul 2025 16:02:38 +0200 Subject: [PATCH 1/5] =?UTF-8?q?=E2=9E=95=20Add=20optional=20dependency=20o?= =?UTF-8?q?n=20fastapi-cloud-cli?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 48521876..8454023a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,10 @@ dependencies = [ [project.optional-dependencies] standard = [ "uvicorn[standard] >= 0.15.0", + "fastapi-cloud-cli >= 0.1.1", +] +standard-no-fastapi-cloud-cli = [ + "uvicorn[standard] >= 0.15.0", ] [project.urls] From 3b22ba04480a34f6f3c4a23915fd911485b08ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 7 Jul 2025 16:04:41 +0200 Subject: [PATCH 2/5] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Upgrade=20Typer=20and?= =?UTF-8?q?=20Rich=20Toolkit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8454023a..d74cfda7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,9 +32,9 @@ classifiers = [ "License :: OSI Approved :: MIT License", ] dependencies = [ - "typer >= 0.12.3", + "typer >= 0.15.1", "uvicorn[standard] >= 0.15.0", - "rich-toolkit >= 0.11.1" + "rich-toolkit >= 0.14.8", ] [project.optional-dependencies] From 1ed96760d98c39fd482d8bc8ed0bef0a22fa019a Mon Sep 17 00:00:00 2001 From: Patrick Arminio Date: Mon, 7 Jul 2025 15:07:18 +0100 Subject: [PATCH 3/5] Import fastapi-cloud-cli if installed --- src/fastapi_cli/cli.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/fastapi_cli/cli.py b/src/fastapi_cli/cli.py index c983b5ca..8a5bb3c9 100644 --- a/src/fastapi_cli/cli.py +++ b/src/fastapi_cli/cli.py @@ -25,6 +25,16 @@ uvicorn = None # type: ignore[assignment] +try: + from fastapi_cloud_cli.cli import ( # type: ignore[import-not-found] + app as fastapi_cloud_cli, + ) + + app.add_typer(fastapi_cloud_cli) +except ImportError: # pragma: no cover + pass + + def version_callback(value: bool) -> None: if value: print(f"FastAPI CLI version: [green]{__version__}[/green]") From 13055fa6fde58f2da0b275d4e35f5912740a7c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 7 Jul 2025 16:14:45 +0200 Subject: [PATCH 4/5] =?UTF-8?q?=E2=9E=95=20Add=20standard=20extras=20to=20?= =?UTF-8?q?test=20dependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements-tests.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-tests.txt b/requirements-tests.txt index ffe53601..28039982 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,4 +1,4 @@ --e . +-e .[standard] pytest >=4.4.0,<9.0.0 coverage[toml] >=6.2,<8.0 From 2a1fc699ffdca9ae7c01134bca538b9c503f9e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 7 Jul 2025 16:16:35 +0200 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=9A=A8=20Tweak=20linter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fastapi_cli/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fastapi_cli/cli.py b/src/fastapi_cli/cli.py index 8a5bb3c9..77647217 100644 --- a/src/fastapi_cli/cli.py +++ b/src/fastapi_cli/cli.py @@ -26,7 +26,7 @@ try: - from fastapi_cloud_cli.cli import ( # type: ignore[import-not-found] + from fastapi_cloud_cli.cli import ( app as fastapi_cloud_cli, )