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
@@ -147,6 +147,18 @@ def save_paginated_pdf(
|
||||
)
|
||||
|
||||
|
||||
def save_checked_pdf(root, labelled_images, all_labels, output_path):
|
||||
"""Build the checked-mode return PDF with the same supplements as BGnot."""
|
||||
groups = []
|
||||
seen_contexts = set()
|
||||
for label, image in labelled_images:
|
||||
extras = get_extra_pdfs_as_images(
|
||||
root, label, annotating, all_labels, seen_contexts=seen_contexts
|
||||
)
|
||||
groups.append([*extras, image])
|
||||
save_paginated_pdf(groups, output_path)
|
||||
|
||||
|
||||
def _scan_annotation_directory(
|
||||
directory: Path,
|
||||
only_ids: set[str] | None = None,
|
||||
@@ -420,6 +432,12 @@ def apply_actions_and_regenerate_grouped(
|
||||
[image for group in filtered_groups for image in group]
|
||||
)
|
||||
filtered_image.save(staging / "Concat_F.jpg")
|
||||
if annotation_dir == "Bnot":
|
||||
save_checked_pdf(
|
||||
workspace.root,
|
||||
[(label, dirty_images[label]) for label in filtered_labels],
|
||||
all_labels, staging / "Concat_F.pdf",
|
||||
)
|
||||
stage_baseline(workspace.root, annotation_dir, output_dir, staging, dirty_images,
|
||||
header_heights, build_answer_info(scores, labels_data, answer_labels, touched),
|
||||
filtered_labels, scores)
|
||||
|
||||
Reference in new issue
Block a user