Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve build failure table in wiki #1031

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading