load_audit("Nope") fails with a bare FileNotFoundError that does not say an audit folder was expected
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1123 by @dxnnystyles — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start with load_audit in faircode/benchmark.py and the existing cases in tests/test_load_audit.py; check how it handles folder paths, manifest paths, and discover_manifests. Add tests for a missing folder, an existing folder without audit.yaml, and a close misspelling. Done means each error names the attempted path and explains what audit folders or manifest paths are available.
Written by the indexing model from the issue text.
Description
Where: faircode/benchmark.py (load_audit), tests/test_load_audit.py.
Current gap: load_audit accepts a folder or a manifest path. For a name that is neither it raises FileNotFoundError: [Errno 2] No such file or directory: 'Nope', which does not say that it looked for Nope/audit.yaml, and a typo such as "Benefits denial" (the folder is Benefits Denial) gives no hint. A name that is a real folder without an audit.yaml reports the missing file only as a path from yaml loading. The strategy error is already clear (unknown strategy: 'bogus').
Repro:
$ python3 -c "from faircode.benchmark import load_audit; load_audit('Nope')"
FileNotFoundError: [Errno 2] No such file or directory: 'Nope'
Suggested approach: raise a FileNotFoundError that names the path it tried (Nope/audit.yaml), says that folder must be an audit folder or a manifest path, and, if the folder does not exist, lists the audit folders found next to it (use discover_manifests). Add tests for a missing folder, a folder without a manifest and a close misspelling.
Done when: each of those cases produces a message that names what was tried and what exists.
- Dominant language
- HTML
- Stars
- 47
- Forks
- 45
- Avg merge
- 3h 4m
- Merged PRs (30d)
- 83
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
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Numeric column headers keep their type in Python (the integer 2020) and are text in the web enginePossibly taken @snehal1931 claimed this 4 days ago. Openbug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yakew7/Fair-Code#1045 · 2 comments ·
Maintainers usually reply within 1 day
-
JSON string cells "NA" and "" are missing in the web engine and ordinary values in PythonPossibly taken @snehal1931 claimed this 4 days ago. Openbug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
yakew7/Fair-Code#1036 · 2 comments ·
Maintainers usually reply within 1 day
-
check_issue_refs fails a pull request that says it closes an issue the pull request itself closesOpenenhancement help wanted
Difficulty 3/5 1-2 days Newbie friendliness 76/100
Maintainers usually reply within 1 day
All issues in yakew7/Fair-Code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
FiloSottile/age#758 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
kunchenguid/gh-axi#221 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
area:agent-view area:tui bug platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
anthropics/claude-code#104558 ·
Maintainers usually reply within 1 day