Make the python writers have the same behavior as the C++ writers#897
Merged
tmadlener merged 3 commits intoAIDASoft:masterfrom Jan 12, 2026
Merged
Make the python writers have the same behavior as the C++ writers#897tmadlener merged 3 commits intoAIDASoft:masterfrom
tmadlener merged 3 commits intoAIDASoft:masterfrom
Conversation
tmadlener
approved these changes
Dec 4, 2025
816e0fb to
da403f6
Compare
Contributor
|
Should this have a test to check this behaviour? Perhaps in longer future python reading and writing could be rewritten to use C++ (type-erased) readers/writers with less wrappers? |
Collaborator
Yes, it should. |
da403f6 to
224208d
Compare
tmadlener
reviewed
Jan 10, 2026
| PODIO_SET_TEST_ENV(read_python_multiple) | ||
| set_tests_properties(read_python_multiple PROPERTIES FIXTURES_REQUIRED podio_write_root_fixture) | ||
|
|
||
| add_test(NAME write_python_empty_colls_root COMMAND python3 ${PROJECT_SOURCE_DIR}/tests/write_empty_collections.py empty_colls_frame_with_py.root) |
Collaborator
There was a problem hiding this comment.
this needs to be excluded from the sanitizer runs as they do not usually work with anything that invokes the python interpreter.
If no collections are passed then let the C++ decide instead of passing all collections (which is what the C++ writers do). In practice, this only allows to write empty frames from python, currently not possible as collections will evaluate to false and all the collections from `frame.getAvailableCollections` will be passed.
224208d to
cd47d30
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BEGINRELEASENOTES
ENDRELEASENOTES
If no collections are passed then let the C++ decide instead of passing all collections (which is what the C++ writers do). In practice, this only allows to write frames with no collections from python, currently not possible as collections will evaluate to false and all the collections from
frame.getAvailableCollectionswill be passed.