-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat: Adding awkward.semipublic submodule #3152
feat: Adding awkward.semipublic submodule #3152
Conversation
I don't think they should be organized into a named submodule called "semipublic." It's an attribute of the data, but not an ontological category. (A lot of unrelated things would go into that submodule, which would not make them any easier to find.) Besides, all of the currently semipublic APIs would have to get doubled, since we can't remove the old API without a deprecation cycle, and they're currently in places that are named after their function (e.g. in |
Okay, that's a good point. I can make awkward.prettyprint an alias for awkward._prettyprint. That's easy -- |
|
Also adding a unit test for this and prettyprint.
Okay, I did these both, more or less. See tests/test_2856_export_remove_structure_and_prettyprint.py |
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.
This is a good way to organize it. If Ragged needs to be updated as well, then that would be a logical next step after this is merged.
If it passes all the tests, this can be merged.
This should start the ball rolling on a phased approach to resolving 2856, and more generally
provide a place to put functions that are not well-documented and not available in the top-level
awkward namespace, but are still available to external projects in the sense that we promise
to maintain future support in at least minor and patch releases.
I'm adding a new submodule,
awkward.semipublic
. This is not particularly inspired, but I believethat a new submodule named something is necessary, in part because of the thirsty behavior in
src/awkward/__init__.py
:So if we were to sprinkle these semi-public functions into other modules like ak.operations, they would
wind up in the top-level namespace unless we did fancy things like a
@semipublic
decorator. I don'tthink that's worth the effort, even though I also don't particularly like my submodule name. Any other
suggestions?