Skip to content

fix: implement report=True for RNTuple.iterate#1630

Open
KaranSinghDev wants to merge 2 commits into
scikit-hep:mainfrom
KaranSinghDev:fix_1628_rntuple_iterate_report
Open

fix: implement report=True for RNTuple.iterate#1630
KaranSinghDev wants to merge 2 commits into
scikit-hep:mainfrom
KaranSinghDev:fix_1628_rntuple_iterate_report

Conversation

@KaranSinghDev
Copy link
Copy Markdown
Contributor

@KaranSinghDev KaranSinghDev commented May 15, 2026

Fixes #1628

RNTuple.iterate accepted a report parameter but never used it. As a result:

  • uproot.iterate("file.root:rntuple", report=True) crashed with ValueError: too many values to unpack (expected 2) at src/uproot/behaviors/TBranch.py:216.
    • rn.iterate(report=True) silently returned a bare Array instead of the (arrays, Report) tuple that the docstring promises.

I have added the regression test (tests/test_1630_rntuple_iterate_report.py), mirroring the format of the existing TTree iterate-report tests in tests/test_0043_iterate_function.py.

This PR yields (arrays, Report) when report=True, matching the TTree contract. The report=False path is unchanged.

@KaranSinghDev KaranSinghDev marked this pull request as draft May 15, 2026 20:14
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.76%. Comparing base (fe9ad24) to head (f72a83d).

Additional details and impacted files
Files with missing lines Coverage Δ
src/uproot/behaviors/RNTuple.py 70.98% <100.00%> (+0.22%) ⬆️

@KaranSinghDev KaranSinghDev marked this pull request as ready for review May 16, 2026 04:29
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.

uproot.iterate with report=True fails for RNtuple

1 participant