Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

faircode/report.py's to_csv()/compare_to_csv() silently omit proxy-hint results, even at the CLI level

Open Beginner friendly
#760 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli, data

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

bug help wanted

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from yakew7/Fair-Code

All issues in yakew7/Fair-Code

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.