Skip to content

BUG: hotfix report defects in logs and HTML summaries #2512

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

Merged
merged 2 commits into from
Jul 24, 2025
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions cibuildwheel/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ def print_summary(self, *, options: "Options") -> Generator[None, None, None]:
github_summary = self._github_step_summary(duration=duration, options=options)
Path(summary_path).write_text(filter_ansi_codes(github_summary), encoding="utf-8")

n = len(self.summary)
s = "s" if n > 1 else ""
n_wheels = len([info for info in self.summary if not info.filename])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@neutrinoceros The not here is looking wrong to me!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh my, definitely 🤦🏻‍♂️ I'll fix this in a minute

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#2517 👀

s = "s" if n_wheels > 1 else ""
duration_str = humanize.naturaldelta(duration)
print()
self._start_fold_group(f"{n} wheel{s} produced in {duration_str}")
self._start_fold_group(f"{n_wheels} wheel{s} produced in {duration_str}")
for build_info in self.summary:
print(" ", build_info)
self._end_fold_group()
Expand Down Expand Up @@ -320,7 +320,7 @@ def _github_step_summary(self, duration: float, options: "Options") -> str:
n_wheels = len([b for b in self.summary if b.filename])
wheel_rows = "\n".join(
"<tr>"
f"<td nowrap>{'<samp>' + b.filename.name + '</samp>' if b.filename else '*Build only*'}</td>"
f"<td nowrap>{'<samp>' + b.filename.name + '</samp>' if b.filename else '*Test only*'}</td>"
f"<td nowrap>{b.size or 'N/A'}</td>"
f"<td nowrap><samp>{b.identifier}</samp></td>"
f"<td nowrap>{humanize.naturaldelta(b.duration)}</td>"
Expand Down
2 changes: 1 addition & 1 deletion unit_test/wheel_print_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_printout_wheels(capsys):

assert "id1" in captured.out
assert "id2" in captured.out
assert "wheels produced in" in captured.out
assert "1 wheel produced in" in captured.out
assert "SHA256=" in captured.out


Expand Down
Loading