Bnot fixes ; Missing énoncés fixes.
This commit is contained in:
1 parent
f39868207d
commit
55d5cf16c9
18 files changed
+486
-44
No files matched your search
+17
-4
@@ -893,11 +893,13 @@ class CopienatorApp(tk.Tk):
|
||||
value = False # Deletion is a one-run choice, never a saved default.
|
||||
if step.id == 'statement' and spec.name == 'restart':
|
||||
value = False
|
||||
if step.id == "final_score" and spec.name == "copy_merged_histogramme" and spec.name not in values:
|
||||
value = bool(self.state_store.step("personal_read").get("wsnm_run", False))
|
||||
if step.id == "modify_annotations" and spec.name == "annotation_dir" and spec.name not in values:
|
||||
reader = self.state_store.step("read_annotations")
|
||||
value = annotation_mode_for_reader(reader)
|
||||
choices = spec.choices
|
||||
if spec.name == "annotation_dir" and step.id in {"export", "import"}:
|
||||
if spec.name == "annotation_dir" and step.id in {"export", "import", "giving_names"}:
|
||||
choices, value = self._annotation_directory_choices(step.id)
|
||||
argument_label = ttk.Label(self.form, text=f"{spec.label} ⓘ")
|
||||
argument_label.grid(row=row, column=0, sticky="nw", pady=4, padx=(0, 8))
|
||||
@@ -1033,7 +1035,7 @@ class CopienatorApp(tk.Tk):
|
||||
controls = ttk.Frame(self.form)
|
||||
controls.grid(row=row, column=0, columnspan=2, sticky="w", pady=8)
|
||||
self.review_buttons = []
|
||||
for command in ("re", "wsn", "we"):
|
||||
for command in ("re", "wsn", "we", "mei", "wsnm"):
|
||||
button = ttk.Button(
|
||||
controls, text=f"gestion_classe {command}",
|
||||
command=lambda command=command: self._run_current_step(review_command=command),
|
||||
@@ -1301,8 +1303,10 @@ class CopienatorApp(tk.Tk):
|
||||
evaluation = self.evaluation
|
||||
detected = detected_annotation_directories(evaluation) if evaluation else ()
|
||||
choices = detected or ANNOTATION_DIRECTORIES
|
||||
if step_id == "giving_names":
|
||||
choices = ANNOTATION_DIRECTORIES
|
||||
|
||||
if step_id == "export":
|
||||
if step_id in {"export", "giving_names"}:
|
||||
annotation = self.state_store.step("annotation")
|
||||
variant = annotation.get("last_run_variant", annotation.get("variant", "grouped"))
|
||||
preferred = ANNOTATION_VARIANT_DIRECTORIES.get(str(variant), "BGnot")
|
||||
@@ -1608,7 +1612,7 @@ class CopienatorApp(tk.Tk):
|
||||
if orientation_repair and (not step or step.id != 'labels'):
|
||||
return
|
||||
if review_command is not None and (
|
||||
not step or step.id != "personal_read" or review_command not in {"re", "wsn", "we"}
|
||||
not step or step.id != "personal_read" or review_command not in {"re", "wsn", "we", "mei", "wsnm"}
|
||||
):
|
||||
return
|
||||
if not step or not evaluation or not self.state_store.evaluation:
|
||||
@@ -1671,6 +1675,10 @@ class CopienatorApp(tk.Tk):
|
||||
command = [sys.executable, '-m', 'copienator', 'repair-orientation', str(evaluation)]
|
||||
if step.id == "personal_read":
|
||||
command = ["gestion_classe", review_command]
|
||||
if review_command not in {"mei", "wsnm"}:
|
||||
evaluation_name = str(self._values().get("evaluation_name", evaluation.name)).strip()
|
||||
if evaluation_name:
|
||||
command.append(evaluation_name)
|
||||
if variant.dangerous and not messagebox.askyesno(
|
||||
"Nettoyage irréversible" if step.id == "clean" else "Confirmation requise",
|
||||
variant.danger_warning
|
||||
@@ -1718,6 +1726,11 @@ class CopienatorApp(tk.Tk):
|
||||
self._append_console(f"\n$ {command_display(command)}\n")
|
||||
try:
|
||||
self.runner.start(command, self.repository, environment, log_path)
|
||||
if step.id == "personal_read" and review_command == "wsnm" and not self.state_store.step(step.id).get("wsnm_run"):
|
||||
self.state_store.update_step(step.id, wsnm_run=True)
|
||||
values = dict(self.state_store.step("final_score").get("values", {}))
|
||||
values["copy_merged_histogramme"] = True
|
||||
self.state_store.update_step("final_score", values=values)
|
||||
if step.id == 'statement_persp':
|
||||
self.arg_vars['delete_persp'].set(False)
|
||||
self._save_current_form()
|
||||
|
||||
Reference in new issue
Block a user