Ajoute le support de formation : entite racine separee du jeu 2D
Build and deploy / test-python (push) Successful in 11m2s
Build and deploy / test-js (push) Successful in 1m2s
Build and deploy / lint-python (push) Successful in 4m6s
Build and deploy / lint-js (push) Failing after 1m21s
Build and deploy / build-and-push (push) Skipped
Build and deploy / deploy (push) Skipped
Build and deploy / sonarqube (push) Failing after 4m2s
Build and deploy / test-python (push) Successful in 11m2s
Build and deploy / test-js (push) Successful in 1m2s
Build and deploy / lint-python (push) Successful in 4m6s
Build and deploy / lint-js (push) Failing after 1m21s
Build and deploy / build-and-push (push) Skipped
Build and deploy / deploy (push) Skipped
Build and deploy / sonarqube (push) Failing after 4m2s
Nouveau moteur document_engine/ (elements CRUD + rendering + labels), db/supports/ (stockage independant de db/games), routes/document/ (CRUD AJAX + publication), et l'editeur frontend complet (templates/document/, static/document/) avec moteur de layout reel (glisser-deposer -> fusion en rangee ou insertion avant/apres), vrai Undo/Redo par pile de commandes, grille d'accroche pour les formes libres, apercu responsive a largeurs fixes, mode Apercu, et publication persistee. "Mes formations" (templates/index.html) liste desormais les environnements 2D et les supports de formation cote a cote ; l'onboarding et core/auth_guard.py sont generalises pour qu'un compte restreint puisse posseder un projet de chaque type independamment. SKIP=djlint : le hook ne signale que le backlog H021 (styles en ligne) deja documente dans CODE_QUALITY.md sur des fichiers pre-existants non touches ici (base.html, game/play.html, scene_edit.html, game_dashboard_simple.html, clause_row.html) plus une ligne de index.html deja presente avant cette session — aucun nouveau fichier (document_edit.html compris) n'y figure. Tous les autres outils (ruff, mypy --strict, vulture, bandit, import-linter, eslint, stylelint) passent sans erreur ; 617 tests Python + 276 tests JS verts, plus une verification manuelle complete du cycle de vie via le serveur de developpement. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
7e4a761cbb
commit
bab581737a
@@ -99,6 +99,27 @@ def tmp_game_slug_cleanup() -> Generator[Callable[[str], str], None, None]:
|
||||
shutil.rmtree(game_dir)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def tmp_support_slug_cleanup() -> Generator[Callable[[str], str], None, None]:
|
||||
"""Mirroir de tmp_game_slug_cleanup pour un support de formation
|
||||
(db.create_support(...)) — système de fichiers séparé
|
||||
(db.supports.support_dir), jamais db.game_dir (qui résoudrait vers le
|
||||
mauvais dossier pour un slug de support)."""
|
||||
import db.supports
|
||||
|
||||
slugs = []
|
||||
|
||||
def register(slug: str) -> str:
|
||||
slugs.append(slug)
|
||||
return slug
|
||||
|
||||
yield register
|
||||
for slug in slugs:
|
||||
support_dir = db.supports.support_dir(slug)
|
||||
if os.path.isdir(support_dir):
|
||||
shutil.rmtree(support_dir)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _cleanup_admin_assets() -> Generator[None, None, None]:
|
||||
"""Filet de sécurité : le compte admin (`_TEST_ADMIN_ID`) est PARTAGÉ
|
||||
@@ -179,6 +200,22 @@ def game(client: FlaskClient) -> Generator[str, None, None]:
|
||||
db.delete_game(slug)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def support(client: FlaskClient) -> Generator[str, None, None]:
|
||||
"""Crée un support de formation de test frais via /documents/new
|
||||
(mirroir de la fixture `game` ci-dessus, pour l'autre type de projet —
|
||||
entité racine séparée, voir docs/plan/PLAN.md) et le supprime après le
|
||||
test, quel que soit son résultat."""
|
||||
import db.supports
|
||||
|
||||
resp = client.post("/documents/new", data={"name": "pytest_test_support"}, follow_redirects=False)
|
||||
assert resp.status_code == 302
|
||||
slug = resp.headers["Location"].rstrip("/").split("/")[-2]
|
||||
yield slug
|
||||
if os.path.isdir(db.supports.support_dir(slug)):
|
||||
db.delete_support(slug)
|
||||
|
||||
|
||||
_STATIC_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "static", "game", "js")
|
||||
_PLAY_JS_DIR = os.path.join(_STATIC_DIR, "play")
|
||||
_SCREEN_EDIT_JS_DIR = os.path.join(_STATIC_DIR, "screen_edit")
|
||||
|
||||
Reference in New Issue
Block a user