lincc-frameworks / lincc-frameworks/asv-formatter
Don't fail on missing file
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
In this case, the benchmarks were not set up yet on the repo, and I think it would be preferable to just pass through and not fail to create a new table from the file.
```
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/runner/.local/lib/python3.10/site-packages/lf_asv_formatter/__main__.py", line 115, in
headers, rows = format_asv_table_from_file(output_file)
File "/home/runner/.local/lib/python3.10/site-packages/lf_asv_formatter/__main__.py", line 54, in format_asv_table_from_file
headers = format_headers(rows[0])
IndexError: list index out of range
```
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start at lf_asv_formatter/__main__.py, especially format_asv_table_from_file and the module entry point shown in the traceback. Reproduce the empty or missing benchmark-file case and verify that table creation no longer fails when no rows are available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100