lincc-frameworks / lincc-frameworks/asv-formatter

Don't fail on missing file

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

  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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.