Migrate nb entier
This commit is contained in:
@@ -425,7 +425,7 @@ def collect_lesson_status(lesson: dict) -> dict:
|
||||
if tests_dir.exists()
|
||||
else len([path for path in (legacy_kit_dir / "test_diagnostic").glob("*.md") if path.name != "README.md"]) if legacy_kit_dir.exists() else 0,
|
||||
"test_svg": len(list(tests_dir.glob("*.svg"))) if tests_dir.exists() else len(list((legacy_kit_dir / "svg").glob("*.svg"))) if legacy_kit_dir.exists() else 0,
|
||||
"adaptive_profiles": len([path for path in parcours_dir.glob("*.md") if path.name != "README.md"])
|
||||
"adaptive_profiles": len([path for path in parcours_dir.rglob("*.md") if path.name != "README.md"])
|
||||
if parcours_dir.exists()
|
||||
else len([path for path in (legacy_kit_dir / "parcours_profils").glob("*.md") if path.name != "README.md"]) if legacy_kit_dir.exists() else 0,
|
||||
"validations": sorted(path.stem for path in lesson_dir.glob("VALIDATION_PHASE_*.md")),
|
||||
@@ -460,10 +460,10 @@ def collect_adaptive_kit(lesson_dir: Path) -> dict | None:
|
||||
return [
|
||||
{
|
||||
"id": path.relative_to(CONTENT_ROOT).as_posix(),
|
||||
"title": title_from_slug(path.stem),
|
||||
"title": title_from_slug(path.parent.name if path.stem == "exercices" else path.stem),
|
||||
"content": read_review_text(path),
|
||||
}
|
||||
for path in sorted(base.glob("*.md"))
|
||||
for path in sorted(base.rglob("*.md"))
|
||||
if path.name != "README.md"
|
||||
]
|
||||
|
||||
@@ -471,7 +471,7 @@ def collect_adaptive_kit(lesson_dir: Path) -> dict | None:
|
||||
if not base.exists():
|
||||
return []
|
||||
items = []
|
||||
for path in sorted(base.glob("*.svg")):
|
||||
for path in sorted(base.rglob("*.svg")):
|
||||
relative = path.relative_to(CONTENT_ROOT).as_posix()
|
||||
items.append(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user