From 73538528b88754a13ca2ed5f769bff721bc574f7 Mon Sep 17 00:00:00 2001 From: mbsantiago Date: Fri, 17 May 2024 18:48:45 +0100 Subject: [PATCH 1/2] removed mention of splash_screen in booting code --- back/src/whombat/system/app.py | 9 +-------- back/src/whombat/system/boot.py | 18 ------------------ 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/back/src/whombat/system/app.py b/back/src/whombat/system/app.py index c089d193..37457251 100644 --- a/back/src/whombat/system/app.py +++ b/back/src/whombat/system/app.py @@ -11,11 +11,7 @@ from whombat import exceptions from whombat.plugins import add_plugin_pages, add_plugin_routes, load_plugins -from whombat.system.boot import ( - close_splash_screen, - update_splash_screen, - whombat_init, -) +from whombat.system.boot import whombat_init from whombat.system.settings import Settings ROOT_DIR = Path(__file__).parent.parent @@ -24,10 +20,7 @@ @asynccontextmanager async def lifespan(settings: Settings, app: FastAPI): """Context manager to run startup and shutdown events.""" - update_splash_screen("Initializing Whombat...") await whombat_init(settings, app) - update_splash_screen("Whombat is ready!") - close_splash_screen() yield diff --git a/back/src/whombat/system/boot.py b/back/src/whombat/system/boot.py index 68666151..62aa1545 100644 --- a/back/src/whombat/system/boot.py +++ b/back/src/whombat/system/boot.py @@ -75,24 +75,6 @@ def print_dev_message(settings: Settings): ) -def update_splash_screen(message: str) -> None: - try: - import pyi_splash # type: ignore - - pyi_splash.update_text(message) - except ImportError: - return - - -def close_splash_screen() -> None: - try: - import pyi_splash # type: ignore - - pyi_splash.close() - except ImportError: - return - - async def whombat_init(settings: Settings, _: FastAPI): """Run at initialization.""" From 8b7c3a30981baf682865f606ac960ed70a34e3b3 Mon Sep 17 00:00:00 2001 From: mbsantiago Date: Fri, 17 May 2024 18:49:01 +0100 Subject: [PATCH 2/2] Removed splash screen from build commands --- .gitignore | 1 + scripts/bundle_linux.sh | 1 - scripts/bundle_windows.ps1 | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 94c99385..15be4738 100644 --- a/.gitignore +++ b/.gitignore @@ -169,6 +169,7 @@ site back/user_guide whombat.db +.ruff_cache/ .pdm-python back/src/whombat/statics/* back/src/whombat/user_guide/* diff --git a/scripts/bundle_linux.sh b/scripts/bundle_linux.sh index 8957d3da..ba83efd0 100644 --- a/scripts/bundle_linux.sh +++ b/scripts/bundle_linux.sh @@ -41,7 +41,6 @@ build/.venv/bin/pyinstaller \ --recursive-copy-metadata "numpy" \ --name whombat \ --onefile \ - --splash "../assets/splash.png" \ app.py diff --git a/scripts/bundle_windows.ps1 b/scripts/bundle_windows.ps1 index a8333fa8..3dcddc2a 100644 --- a/scripts/bundle_windows.ps1 +++ b/scripts/bundle_windows.ps1 @@ -39,7 +39,6 @@ build\.venv\Scripts\pyinstaller ` --name whombat ` --onefile ` --console ` - --splash "..\assets\splash.png" ` app.py