Skip to content

Add markdown export and consolidate output format flags#2

Merged
dev-ankit merged 4 commits into
mainfrom
copilot/add-markdown-export-results
Jan 8, 2026
Merged

Add markdown export and consolidate output format flags#2
dev-ankit merged 4 commits into
mainfrom
copilot/add-markdown-export-results

Conversation

Copilot AI commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Adds markdown export capability with emoji indicators (✅ better, ❌ worse, ➖ same) and consolidates output format selection into a unified -o/--output flag.

Changes

  • New functions:

    • _verdict_to_emoji(): Maps verdict strings to emoji
    • render_comparison_markdown(): Renders comparison tables in markdown format
    • print_section_markdown(): Outputs hierarchical markdown headers (##, ###, ####)
  • CLI: Consolidated --json and --markdown into -o/--output {text,json,markdown} flag

    • text (default): Human-readable table format
    • json: Machine-readable JSON format
    • markdown: Markdown tables with emoji indicators
  • API: Refactored compare_reports() to use single output_format parameter instead of separate as_json and as_markdown flags

  • Backward compatibility note: This is a breaking change for CLI users. The old --json and --markdown flags are replaced by -o json and -o markdown respectively.

Examples

# Default text output
$ python3 compare_runs.py base/ current/

# JSON output
$ python3 compare_runs.py base/ current/ -o json

# Markdown output with emojis
$ python3 compare_runs.py base/ current/ -o markdown

Markdown Output Sample

Aggregated

Metric Base Current Diff % Change Verdict
Requests/s 286.200 300 +13.800 +4.8%
Failure Count 7 4 -3 -42.9%
Average Response Time 85.200 78.500 -6.700 -7.9%

Useful for GitHub PR comments, issue tracking, or documentation where color codes don't render.

Original prompt

Add the ability to export results as markdown. Instead of colors use emoji for showing better worse or same


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: dev-ankit <1901680+dev-ankit@users.noreply.github.com>
@dev-ankit dev-ankit marked this pull request as ready for review January 8, 2026 09:38
@dev-ankit

Copy link
Copy Markdown
Owner

@copilot consolidate and use --output or -o with markdown and json as options instead of separate arge

Copilot AI changed the title [WIP] Add ability to export results as markdown with emoji indicators Add markdown export with emoji verdict indicators Jan 8, 2026
Copilot AI requested a review from dev-ankit January 8, 2026 09:41
Co-authored-by: dev-ankit <1901680+dev-ankit@users.noreply.github.com>

Copilot AI commented Jan 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot consolidate and use --output or -o with markdown and json as options instead of separate arge

Done! Consolidated into -o/--output flag with choices: text (default), json, or markdown.

Examples:

python3 compare_runs.py base/ current/              # text (default)
python3 compare_runs.py base/ current/ -o json      # JSON output
python3 compare_runs.py base/ current/ -o markdown  # Markdown with emojis

Help output:

-o {text,json,markdown}, --output {text,json,markdown}
                      Output format: text (default), json, or markdown with emoji 
                      indicators (✅ better, ❌ worse, ➖ same)

All 161 tests updated and passing. Changes in commit d9bfc49.

Copilot AI changed the title Add markdown export with emoji verdict indicators Add markdown export and consolidate output format flags Jan 8, 2026
@dev-ankit dev-ankit merged commit 1b45153 into main Jan 8, 2026
5 checks passed
@dev-ankit dev-ankit deleted the copilot/add-markdown-export-results branch January 11, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants