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
[ntuple] Show all fields unless a model is specified #12026
Conversation
Can one of the admins verify this patch? |
I realize this commit also includes some changes to unrelated parts of the code made by clang-format. Let me know if I should revert those/put them in a separate commit. |
@phsft-bot build |
Starting build on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be enough if, instead of defining a new option for Show()
, we adjust the current behaviour of kCurrentModelJSON
to trigger model generation from the ntuple descriptor if there’s no current model.
Rationale: this is the current behaviour of LoadEntry()
; why should Show()
behave differently? What do you think, @jblomer?
Jakob and I had a quick chat yesterday and the conclusion was that this would indeed make the most sense. I thought initially that this meant we could get rid of the format option altogether, but now I think it might be good to keep the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
I think in the ntuple_show
unit test, we should suppress the clang-format changes for the expected strings (// clang-format off
). Otherwise it will be difficult to adjust the strings in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! @jblomer? Please, consider also squashing on merge :-).
@phsft-bot build |
Starting build on |
Starting build on |
Build failed on ROOT-ubuntu18.04/nortcxxmod. Errors:
|
Build failed on ROOT-ubuntu2004/python3. Errors:
|
Build failed on mac12/noimt. Errors:
|
Build failed on mac11/cxx14. |
This PR introduces a new format option for
RNTupleReader::Show()
that shows all fields if no model is specified, and only the fields present in the model if there is one. It also changes the default show format to this option.Checklist:
Fixes #12031.