faircode/report.py's to_csv()/compare_to_csv() silently omit proxy-hint results, even at the CLI level
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
Research direction
Start in faircode/report.py at to_csv() and compare_to_csv(), then compare their existing flags-section patterns with the proxy-hints handling in to_terminal() and to_html(). Add coverage in tests/test_report.py and verify that CSV output includes proxy-hints rows for profile and compare results when the corresponding values are present.
Written by the indexing model from the issue text.
Description
Where: faircode/report.py - to_csv() (line 38), compare_to_csv() (line 252).
Current gap: #739 added --csv export to faircode profile/faircode compare, writing a flat, one-row-per-group CSV. Neither to_csv() nor compare_to_csv() writes anything for proxy_hints/proxy_hints_a/proxy_hints_b, unlike to_terminal() and to_html(), which both have working, tested proxy-hints sections (tests/test_report.py covers the terminal/HTML renderers but has no proxy-hints test for either CSV writer). So faircode profile data.csv --proxy-hints --csv out.csv runs the chi-squared check but the written CSV has no trace of it at all - a pipeline that only consumes the CSV export loses this signal entirely and silently.
Repro:
$ grep -n "^def to_csv\|^def compare_to_csv\|^def to_terminal\|^def to_html" faircode/report.py
38:def to_csv(result: dict) -> str:
73:def to_terminal(result: dict) -> str:
252:def compare_to_csv(cmp: dict) -> str:
290:def to_html(result: dict) -> str:
$ grep -n "proxy" faircode/report.py
140: if result.get("proxy_hints"): # inside to_terminal
230: for key, label in ... # inside to_terminal
375: proxy_html = "" # inside to_html
570: proxy_html = "" # inside compare's to_html
(nothing between lines 38-72 or 252-289 - to_csv/compare_to_csv have none)
Suggested approach: append a third section to both CSV writers (e.g. col_a, col_b, p_value, cramers_v rows for to_csv; same plus an A/B column for compare_to_csv) when proxy_hints/proxy_hints_a/proxy_hints_b are present in the result dict, mirroring the flags-section pattern each writer already uses.
- Dominant language
- HTML
- Stars
- 47
- Forks
- 45
- Avg merge
- 1h 57m
- Merged PRs (30d)
- 94
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yakew7/Fair-Code
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug help wanted
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
All issues in yakew7/Fair-Code
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
area/install-update comp/cli P3 platform/windows sweeper:risk-compatibility sweeper:risk-platform-windows type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#130071 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
stellar/stellar-cli#2773 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
IBM/aspera-cli#265 ·
-
type/automation type/performance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day