Skip to content

feat: add RNTuple with inherited structs #216

Merged
ariostas merged 4 commits intoscikit-hep:mainfrom
mrzimu:mrli/add-test-file-for-uproot-pr-1589
Mar 4, 2026
Merged

feat: add RNTuple with inherited structs #216
ariostas merged 4 commits intoscikit-hep:mainfrom
mrzimu:mrli/add-test-file-for-uproot-pr-1589

Conversation

@mrzimu
Copy link
Contributor

@mrzimu mrzimu commented Mar 4, 2026

Hi,
As requested by @ariostas, I have added a file to test the reading of RNTuples containing inherited structs, for Uproot's PR scikit-hep/uproot5#1589.

Since writing a derived class requires the dictionary of not only itself but also all its base classes, I added a small CMake project (instead of a simple ROOT script) to properly handle the dictionary generation and avoid cluttering the directory.

Please let me know if anything needs improvement :)

@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.51%. Comparing base (b5524d4) to head (012e7d6).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #216   +/-   ##
=======================================
  Coverage   72.51%   72.51%           
=======================================
  Files           4        4           
  Lines         131      131           
=======================================
  Hits           95       95           
  Misses         36       36           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ariostas
Copy link
Member

ariostas commented Mar 4, 2026

Thank you, @mrzimu! To keep it consistent with the rest of the RNTuples here, let's name it something like class_inheritance_rntuple_v1-0-1-0.root.

Also, I'm wondering if there's some way to keep it all in a single file. The dictionary generation can't be done within the same file?

@mrzimu
Copy link
Contributor Author

mrzimu commented Mar 4, 2026

Thank you, @mrzimu! To keep it consistent with the rest of the RNTuples here, let's name it something like class_inheritance_rntuple_v1-0-1-0.root.

Also, I'm wondering if there's some way to keep it all in a single file. The dictionary generation can't be done within the same file?

I will name it as class_inheritance_rntuple_v1-0-1-0.root.

I also tend to keep it all in a single file, but I couldn't find a way to generate the dictionary properly now. Let me look into it.

@ariostas
Copy link
Member

ariostas commented Mar 4, 2026

Thanks @mrzimu! Last thing, could you rename the actual root file?

@mrzimu
Copy link
Contributor Author

mrzimu commented Mar 4, 2026

Thanks @mrzimu! Last thing, could you rename the actual root file?

I have renamed it 😄

@mrzimu
Copy link
Contributor Author

mrzimu commented Mar 4, 2026

Thanks @mrzimu! Last thing, could you rename the actual root file?

I have renamed it 😄

Oh sorry, I forgot that generated file...

@ariostas
Copy link
Member

ariostas commented Mar 4, 2026

Maybe it was only renamed locally, and you forgot to push it. But I went ahead and renamed it, so no worries. Thanks again!

(I'll do a couple checks before merging)

@ariostas ariostas changed the title feat: Test Uproot's reading of RNTuple with inherited structs feat: add RNTuple with inherited structs Mar 4, 2026
@ariostas ariostas merged commit 4c5c7dc into scikit-hep:main Mar 4, 2026
6 checks passed
@ariostas
Copy link
Member

ariostas commented Mar 4, 2026

@all-contributors please add @mrzimu for data

@mrzimu mrzimu deleted the mrli/add-test-file-for-uproot-pr-1589 branch March 4, 2026 19:11
@allcontributors
Copy link
Contributor

@ariostas

I've put up a pull request to add @mrzimu! 🎉

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