feat: smart systray Léa (plyer), preflight GPU, fix tests, support qwen3-vl
- Smart systray (pystray+plyer) remplace PyQt5 : notifications toast, menu dynamique avec workflows, chat "Que dois-je faire ?", icône colorée - Preflight GPU : check_machine_ready() + @pytest.mark.gpu dans conftest - Correction 63 tests cassés → 0 failed (1200 passed) - Tests VWB obsolètes déplacés vers _a_trier/ - Support qwen3-vl:8b sur GPU (remplace qwen2.5vl:3b) - fix images < 32x32 (Ollama panic) - fix force_json=False (qwen3-vl incompatible) - fix temperature 0.1 (0.0 bloque avec images) - Fix captor Windows : Key.esc, _get_key_name() - Fix LeaServerClient : check_connection, list_workflows format - deploy_windows.py : packaging propre client Windows - VWB : edges visibles (#607d8b) + fitView automatique Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,10 +9,13 @@ Ce fichier garantit que:
|
||||
- pytest fonctionne depuis un IDE (PyCharm/VSCode)
|
||||
- Les imports 'from core...' marchent partout
|
||||
- Plus de problèmes PYTHONPATH
|
||||
- Le GPU est vérifié avant les tests qui en ont besoin
|
||||
"""
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
# S'assurer que la racine du projet est dans sys.path pour que `import core...` fonctionne partout
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
if str(ROOT) not in sys.path:
|
||||
@@ -25,4 +28,37 @@ try:
|
||||
except ImportError as e:
|
||||
print(f"❌ Erreur import core: {e}")
|
||||
print(f" ROOT path: {ROOT}")
|
||||
print(f" sys.path: {sys.path[:3]}...")
|
||||
print(f" sys.path: {sys.path[:3]}...")
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# GPU Preflight — vérification avant les tests GPU
|
||||
# =============================================================================
|
||||
|
||||
def pytest_configure(config):
|
||||
"""Enregistre le marqueur 'gpu' pour les tests nécessitant le GPU."""
|
||||
config.addinivalue_line(
|
||||
"markers",
|
||||
"gpu: test nécessitant le GPU (skip auto si VRAM insuffisante)",
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _gpu_preflight_check(request):
|
||||
"""Skip automatiquement les tests marqués 'gpu' si la machine n'est pas prête."""
|
||||
marker = request.node.get_closest_marker("gpu")
|
||||
if marker is None:
|
||||
return
|
||||
|
||||
from core.gpu.preflight import check_machine_ready
|
||||
|
||||
# Seuils personnalisables via le marqueur : @pytest.mark.gpu(min_vram=2000)
|
||||
min_vram = marker.kwargs.get("min_vram", 1000)
|
||||
max_util = marker.kwargs.get("max_util", 80)
|
||||
|
||||
result = check_machine_ready(
|
||||
min_free_vram_mb=min_vram,
|
||||
max_gpu_util_percent=max_util,
|
||||
)
|
||||
if not result.ready:
|
||||
pytest.skip(f"GPU pas prêt : {result.reason}")
|
||||
Reference in New Issue
Block a user