Skip to content

Commit

Permalink
feat: improve build failure table in wiki (#1031)
Browse files Browse the repository at this point in the history
Include a column for the "reason" field of build failures, which
hopefully helps point people in the right direction for fixing. After 80
chars, will dump the rest in a `<details>` tag to avoid table overflow.

Also list multiple rows (one per platform) instead of comma-separated
strings, which do not work well in minimally-styled github wiki table.

Example of new table:

![Screenshot 2025-01-05 at 5 04
54 PM](https://github.com/user-attachments/assets/c93a44c4-7820-4aa6-9783-03bbb68eabb0)
  • Loading branch information
daler authored Jan 6, 2025
1 parent 0a4d558 commit f25bff9
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions bioconda_utils/build_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,20 @@ def get_data():
downloads = utils.get_package_downloads(channel, package_name)
recs = list(get_build_failure_records(recipe))

failures = ", ".join(utils.format_link(rec.path, link_fmt, prefix=link_prefix, label=rec.platform) for rec in recs)
categories = ", ".join(rec.category for rec in recs)
skiplisted = any(rec.skiplist for rec in recs)
prs = utils.format_link(f"https://github.com/bioconda/bioconda-recipes/pulls?q=is%3Apr+is%3Aopen+{package}", link_fmt, label="show")
yield (recipe, downloads, descendants, skiplisted, categories, failures, prs)
limit = 80 # characters in last column to show before putting the rest in "<details>"
for rec in recs:
failures = utils.format_link(rec.path, link_fmt, prefix=link_prefix, label=rec.platform)
categories = rec.category
reasons = rec.reason

data = pd.DataFrame(get_data(), columns=["recipe", "downloads", "depending", "skiplisted", "category", "build failures", "pull requests"])
if len(reasons) > limit:
reasons = reasons[:limit] + "..." + "<details>" + reasons[limit:] + "</details>"
skiplisted = rec.skiplist
prs = utils.format_link(f"https://github.com/bioconda/bioconda-recipes/pulls?q=is%3Apr+is%3Aopen+{package}", link_fmt, label="show")
recipe = recipe.replace('recipes/', '')

yield (recipe, downloads, descendants, skiplisted, categories, failures, prs, reasons)

data = pd.DataFrame(get_data(), columns=["recipe", "downloads", "depending", "skiplisted", "category", "build failures", "pull requests", "reason"])
data.sort_values(by=["depending", "downloads"], ascending=False, inplace=True)
return data

0 comments on commit f25bff9

Please sign in to comment.