Skip to content

Commit

Permalink
Merge pull request #17 from mbsantiago/fix/remove-splash
Browse files Browse the repository at this point in the history
Fix/remove splash
  • Loading branch information
mbsantiago authored May 17, 2024
2 parents f159925 + 8b7c3a3 commit d89615c
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 28 deletions.
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

0 comments on commit d89615c

Please sign in to comment.