Conversation
|
I ended up not adding all the functionality, since I didn't realize how robust those functions are for TTrees. However, I added all the most commonly used functionality, and I'll follow up implementing missing things on future PRs. There were some significant changes to I also fixed the tupleness of tuple-like data ( |
|
Just out of curiosity, I'll have Copilot review this PR to see how it works. |
There was a problem hiding this comment.
Pull Request Overview
This pull request adds improved RNTuple reading functionality along with new tests covering methods such as keys, getitem, to_akform, and iteration/concatenation behavior. The changes include adjustments in expected array lengths, updated output formats for empty structures, and refinements in container handling for RNTuple tests.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_1406_improved_rntuple_methods.py | New tests added for keys, array access, to_akform conversion, and iteration/concatenation functionality. |
| tests/test_1250_rntuple_improvements.py | Updated assertions in field class and iterate tests to reflect new behavior. |
| tests/test_1223_more_rntuple_types.py | Modified expected output for empty structures from dicts to tuples. |
| tests/test_0662_rntuple_stl_containers.py | Adjusted keys call and tuple conversion assertions for STL container tests. |
| tests/test_0630_rntuple_basics.py | Updated keys assertions to use nonrecursive calls for clarity. |
Comments suppressed due to low confidence (2)
tests/test_1250_rntuple_improvements.py:23
- Verify that updating the expected count for 'v' from 0 to 1 reflects the intended behavior for empty structures in RField.
assert len(v) == 1
tests/test_1250_rntuple_improvements.py:58
- [nitpick] Consider adding a comment to clarify the rationale behind the new magic number (188) for the array length in the iteration tests.
assert len(arrays) == 188
This is still a work in progress. I'm adding more functionality for RNTuple reading so that methods are on par with what is available for TTrees. In particular, I'm adding missing functionality to
keys,arrays, and similar methods. There's also other minor tweaks and fixes, and a lot more documentation.I introduced a new
HasFieldsclass that plays a similar role forRNTupleandRField, asHasBranchesdoes forTTreeandTBranch. I'm basing things on the existing code forTBranch. However, sinceRNTupleis more "fundamental" thanRField, andRFieldis a "fake" class that is not read directly, I'm structuring things a bit differently.