Support for A.pdf, A.tex and Ac.tex for initial files
This commit is contained in:
1 parent
42a5b9778e
commit
e4e25eca55
12 files changed
+104
-32
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user