Support for A.pdf, A.tex and Ac.tex for initial files

This commit is contained in:
sebastien committed 2026-09-26 11:22:09 +02:00
1 parent 42a5b9778e
commit e4e25eca55
12 files changed
+104 -32

No files matched your search

+5 -3
View File
@@ -173,7 +173,7 @@ def copy_pdf_paths(evaluation: Path) -> list[Path]:
(
path
for path in location.glob("*.pdf")
if path.name.casefold() not in {"enonce.pdf", "énoncé.pdf"}
if not EvaluationWorkspace(evaluation).is_statement_pdf(path)
),
key=lambda path: path.name.casefold(),
)
@@ -578,7 +578,8 @@ class CopienatorApp(tk.Tk):
if self.state_store.step(step.id).get("status") == "running":
self.state_store.update_step(step.id, status="interrupted")
self._populate_tree()
missing = [name for name in ("enonce.pdf", "enonce.tex", "correction.tex") if not (evaluation / name).exists()]
workspace = EvaluationWorkspace(evaluation)
missing = [name for name in ("enonce.pdf", "enonce.tex", "correction.tex") if not workspace.resolve(name).exists()]
names_found = (evaluation / "names").exists() or (self.repository / "names").exists()
details = []
if missing:
@@ -678,7 +679,8 @@ class CopienatorApp(tk.Tk):
if any(char in pattern for char in "*?["):
exists = next(evaluation.glob(pattern), None) is not None
else:
path = EvaluationWorkspace(evaluation).annotation_dir("refaire") if pattern == "BRnot" else evaluation / pattern
workspace = EvaluationWorkspace(evaluation)
path = workspace.annotation_dir("refaire") if pattern == "BRnot" else workspace.resolve(pattern)
exists = path.exists()
if not exists:
missing.append(pattern)
+2 -1
View File
@@ -126,7 +126,8 @@ def build_workflow(show_personal_steps: bool) -> list[StepDefinition]:
"inputs",
"Préparation",
"Vérifier les fichiers d’entrée",
"Le dossier doit contenir enonce.pdf, enonce.tex et correction.tex. "
"Le dossier doit contenir enonce.pdf, enonce.tex et correction.tex, ou, "
"s’il s’appelle A, les fichiers A.pdf, A.tex et Ac.tex. "
"Le fichier names doit être présent dans l’évaluation ou à la racine du projet.",
(manual("check"),),
requires=("enonce.pdf", "enonce.tex", "correction.tex"),