Skip to content

fix: TProfile reading and writing logic#1609

Merged
ianna merged 14 commits into
mainfrom
ariostas/fix_tprofiles
Apr 30, 2026
Merged

fix: TProfile reading and writing logic#1609
ianna merged 14 commits into
mainfrom
ariostas/fix_tprofiles

Conversation

@ariostas

Copy link
Copy Markdown
Member

This PR aims to fix the IO logic for TProfiles. These issues were brought up in #1531 and #1533.

The fixes here were made primarily made with Claude, with some manual tweaking afterwards. I did extensive questioning and I went through the changes carefully, and I ended up convincing myself that they're right. But I'd appreciate if someone else who is more familiar with TProfiles can also take a look.

@wiso, would you be able to have a look? I'll add the example you posted in #1532 as a test.

@codecov

codecov Bot commented Mar 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.95652% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.73%. Comparing base (3160365) to head (fe5057b).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/uproot/writing/identify.py 85.71% 4 Missing and 1 partial ⚠️
src/uproot/behaviors/TProfile.py 88.23% 2 Missing and 2 partials ⚠️

❌ Your patch status has failed because the patch coverage (86.95%) is below the target coverage (98.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
Files with missing lines Coverage Δ
src/uproot/behaviors/TProfile.py 85.87% <88.23%> (+4.39%) ⬆️
src/uproot/writing/identify.py 73.36% <85.71%> (+1.61%) ⬆️

... and 1 file with indirect coverage changes

@ariostas

Copy link
Copy Markdown
Member Author

@wiso, would you be able to check if this is working correctly now?

@ariostas ariostas marked this pull request as ready for review April 24, 2026 21:15
@ariostas ariostas requested a review from ianna April 24, 2026 21:15

@ianna ianna left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@ariostas - great! Code coverage is better and though it is not at the required (high-ish) level yet I'll merge it. Thanks!

@ianna ianna merged commit f4daa7a into main Apr 30, 2026
23 of 24 checks passed
@ianna ianna deleted the ariostas/fix_tprofiles branch April 30, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants