Skip to content
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

Add a getAvailableCollections method in python #536

Merged
merged 7 commits into from
Jan 12, 2024

Conversation

jmcarcell
Copy link
Member

BEGINRELEASENOTES

  • Add a getAvailableCollections method in python that does the same thing as in C++

ENDRELEASENOTES

Currently frame.collections is the way of getting the collections. I'd prefer the C++ method and the python one to have the same name so it's easier to remember.

I'm also in favor of removing the current .collections which is probably only used in podio (in podio-dump).

@jmcarcell jmcarcell changed the title Add a getAvailableCollections Add a getAvailableCollections method in python Jan 8, 2024
Copy link
Collaborator

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objections from my side to add this (and potentially deprecate the collections property and removing it after the next tag. Unless, you want to keep that for the "pythonic interface"?

@jmcarcell
Copy link
Member Author

.collections now prints a warning and I changed it to .getAvailableCollections() where I found it. I'm fine with removing it, it's one less thing to remember or check when it's different in C++ and python.

Comment on lines 128 to 129
print('WARNING: collections is deprecated, use getAvailableCollections() (like in C++) instead',
file=sys.stderr)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this a warnings.warn("text", FutureWarning)? That would give a bit more context as to where the warning is coming from

@tmadlener tmadlener merged commit 532234f into AIDASoft:master Jan 12, 2024
18 checks passed
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