MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / render_category_markdown

Function render_category_markdown

tools/commitlist.py:573–586  ·  view source on GitHub ↗
(category: str, commits: list[CommitRow])

Source from the content-addressed store, hash-verified

571
572
573def render_category_markdown(category: str, commits: list[CommitRow]) -> str:
574 lines = [get_markdown_header(category), f'## {category}\n\n']
575 topics = ordered_values((commit.topic for commit in commits), PR_TYPES)
576 for topic in topics:
577 topic_commits = [commit for commit in commits if commit.topic == topic]
578 if not topic_commits:
579 continue
580 lines.append(f'### {topic}\n\n')
581 for commit in topic_commits:
582 lines.append(
583 f'- {markdown_entry_text(commit)} ({get_hash_or_pr_url(commit)})\n'
584 )
585 lines.append('\n')
586 return ''.join(lines)
587
588
589def write_csv(path: Path, rows: list[CommitRow]) -> None:

Callers 1

write_category_exportsFunction · 0.85

Calls 6

get_markdown_headerFunction · 0.85
ordered_valuesFunction · 0.85
markdown_entry_textFunction · 0.85
get_hash_or_pr_urlFunction · 0.85
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected