Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 119c08faca |
@@ -137,16 +137,22 @@ def _extract_content_units(parsed_data: dict) -> dict:
|
|||||||
|
|
||||||
for sec in sections:
|
for sec in sections:
|
||||||
name = sec.get("source", "")
|
name = sec.get("source", "")
|
||||||
if _is_functional_section(name) and _has_section_content(sec):
|
is_func = _is_functional_section(name) and _has_section_content(sec)
|
||||||
|
if is_func:
|
||||||
functional_sections.append({
|
functional_sections.append({
|
||||||
"name": name,
|
"name": name,
|
||||||
"number": _section_number(name),
|
"number": _section_number(name),
|
||||||
})
|
})
|
||||||
|
|
||||||
for block in sec.get("blocks", []):
|
# Only count table rows from functional sections
|
||||||
if block.get("type") == "table":
|
# (non-functional sections like changelog, glossary, references
|
||||||
rows = block.get("rows", [])
|
# cannot be covered by function_units — counting them inflates
|
||||||
total_table_rows += len(rows)
|
# the denominator and yields misleadingly low coverage.)
|
||||||
|
if is_func:
|
||||||
|
for block in sec.get("blocks", []):
|
||||||
|
if block.get("type") == "table":
|
||||||
|
rows = block.get("rows", [])
|
||||||
|
total_table_rows += len(rows)
|
||||||
|
|
||||||
# Diagram-type images from image_analysis
|
# Diagram-type images from image_analysis
|
||||||
diagram_rids: list[str] = []
|
diagram_rids: list[str] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user