Support evaluation-local configuration and names overrides

This commit is contained in:
sebastien committed 2026-11-03 18:44:56 +01:00
1 parent 0bb6f7d97c
commit d4404e4c27
36 files changed
+409 -184

No files matched your search

+14 -1
View File
@@ -11,7 +11,7 @@ from pathlib import Path
from tkinter import filedialog, messagebox, ttk
from typing import Any
from copienator import CliError, EvaluationWorkspace, ExitCode, atomic_write_json, read_json
from copienator import configuration, CliError, EvaluationWorkspace, ExitCode, atomic_write_json, read_json
from copienator.commands.resolve_manual import pending_manual_conflicts
from copienator.copy_errors import copy_errors
from copienator.orientation import reports as orientation_reports
@@ -275,6 +275,7 @@ class CopienatorApp(tk.Tk):
super().__init__()
self.repository = repository.resolve()
self.show_personal_steps = show_personal_steps
self._global_personal_steps = show_personal_steps
self.steps = build_workflow(show_personal_steps)
self.step_by_id = {step.id: step for step in self.steps}
self.state_store = StateStore()
@@ -739,10 +740,22 @@ class CopienatorApp(tk.Tk):
if not evaluation or not evaluation.is_dir():
messagebox.showerror("Dossier invalide", "Choisissez un dossier d’évaluation existant.")
return
try:
configuration.use_evaluation(evaluation)
except Exception as exc:
messagebox.showerror("Configuration invalide", str(exc))
return
self.batch_monitor.stop()
self._reset_latex_warnings()
self._save_current_form()
self.state_store.load(evaluation)
self.show_personal_steps = (
bool(configuration.SHOW_PERSONAL_STEPS)
if configuration.LOCAL_CONFIG_PATH is not None
else self._global_personal_steps
)
self.steps = build_workflow(self.show_personal_steps)
self.step_by_id = {step.id: step for step in self.steps}
for step in self.steps:
if self.state_store.step(step.id).get("status") == "running":
self.state_store.update_step(step.id, status="interrupted")