Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/remove splash #17

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ site
back/user_guide

whombat.db
.ruff_cache/
.pdm-python
back/src/whombat/statics/*
back/src/whombat/user_guide/*
Expand Down
9 changes: 1 addition & 8 deletions back/src/whombat/system/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand Down
18 changes: 0 additions & 18 deletions back/src/whombat/system/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down
1 change: 0 additions & 1 deletion scripts/bundle_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ build/.venv/bin/pyinstaller \
--recursive-copy-metadata "numpy" \
--name whombat \
--onefile \
--splash "../assets/splash.png" \
app.py


Expand Down
1 change: 0 additions & 1 deletion scripts/bundle_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ build\.venv\Scripts\pyinstaller `
--name whombat `
--onefile `
--console `
--splash "..\assets\splash.png" `
app.py


Expand Down