MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / build_decisions

Function build_decisions

scripts/plan_figure_table_decisions.py:195–208  ·  view source on GitHub ↗
(
    source_manifest: dict[str, Any],
    figures_wrapper: dict[str, Any],
)

Source from the content-addressed store, hash-verified

193
194
195def build_decisions(
196 source_manifest: dict[str, Any],
197 figures_wrapper: dict[str, Any],
198) -> list[dict[str, Any]]:
199 planned = planned_items(figures_wrapper)
200 decisions = [
201 decide(caption, planned.get(normalize_label(str(caption.get("label", "")))))
202 for caption in caption_items(source_manifest)
203 ]
204 for decision in decisions:
205 if decision["decision"] not in DECISION_VALUES:
206 decision["decision"] = "skip"
207 decision["skip_reason"] = "invalid_decision_normalized_to_skip"
208 return decisions
209
210
211def main() -> None:

Callers 1

mainFunction · 0.85

Calls 4

planned_itemsFunction · 0.85
decideFunction · 0.85
normalize_labelFunction · 0.85
caption_itemsFunction · 0.85

Tested by

no test coverage detected