refactor(dashboard): switch a NiceGUI, rimuovi legacy Streamlit

NiceGUI è la dashboard ufficiale (port 8080, dark/neon palette, 3 pagine:
/, /convergence, /genomes). La porta è ora parametrica via env
SWARM_DASHBOARD_PORT, letta in ui.run() — Docker la usa anche per
healthcheck e label Traefik.

docker-compose.yml: entrypoint del servizio dashboard cambiato da
streamlit a python -m multi_swarm.dashboard.nicegui_app. Default porta
8080 ovunque (.env, .env.example, compose, healthcheck).

Rimossi i file legacy della vecchia GUI Streamlit:
- src/multi_swarm/dashboard/streamlit_app.py
- src/multi_swarm/dashboard/aquarium.py (helper canvas HTML5)
- src/multi_swarm/dashboard/pages/{01_overview,02_ga_convergence,
  03_genomes,04_aquarium}.py
- tests/integration/test_streamlit_smoke.py

pyproject.toml: rimossa la dep streamlit; uv.lock rigenerato (10 deps
transitive eliminate: pydeck, watchdog, jsonschema, pillow, ecc.).
README aggiornato (architettura, comando dashboard, sezione Dashboard
ora descrive NiceGUI con riferimento al deploy Docker via Traefik).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Adriano Dal Pastro
2026-05-14 12:15:11 +00:00
parent 8e5efde219
commit 03f723f7fc
13 changed files with 24 additions and 1569 deletions
+5 -9
View File
@@ -81,20 +81,16 @@ services:
- ./data:/app/data:ro
- ./series:/app/series:ro
entrypoint:
- streamlit
- run
- /app/src/multi_swarm/dashboard/streamlit_app.py
- --server.address=0.0.0.0
- --server.port=${SWARM_DASHBOARD_PORT:-8501}
- --server.headless=true
- --browser.gatherUsageStats=false
- python
- -m
- multi_swarm.dashboard.nicegui_app
command: []
healthcheck:
test:
- "CMD"
- "python"
- "-c"
- "import os, urllib.request; urllib.request.urlopen(f'http://localhost:{os.environ.get(\"SWARM_DASHBOARD_PORT\",\"8501\")}/_stcore/health', timeout=3).close()"
- "import os, urllib.request; urllib.request.urlopen(f'http://localhost:{os.environ.get(\"SWARM_DASHBOARD_PORT\",\"8080\")}/', timeout=3).close()"
interval: 30s
timeout: 5s
retries: 3
@@ -106,5 +102,5 @@ services:
- traefik.http.routers.multi-swarm-dashboard.tls=true
- traefik.http.routers.multi-swarm-dashboard.entrypoints=websecure
- traefik.http.routers.multi-swarm-dashboard.tls.certresolver=mytlschallenge
- "traefik.http.services.multi-swarm-dashboard.loadbalancer.server.port=${SWARM_DASHBOARD_PORT:-8501}"
- "traefik.http.services.multi-swarm-dashboard.loadbalancer.server.port=${SWARM_DASHBOARD_PORT:-8080}"
- com.centurylinklabs.watchtower.enable=true