-
Notifications
You must be signed in to change notification settings - Fork 13
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
functions to get children of Group #104
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #104 +/- ##
==========================================
- Coverage 81.97% 81.72% -0.26%
==========================================
Files 166 166
Lines 23489 23578 +89
==========================================
+ Hits 19255 19268 +13
- Misses 4234 4310 +76 ☔ View full report in Codecov by Sentry. |
Thanks @niklasmueboe! The API looks good. A couple of suggestions:
|
What do you think of the recursive option for listing the children? Alternatively, it could also be split into separate methods, i.e. Should these methods return a |
These methods will replace `[async_]get_child_nodes` in the next breaking release
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.
Great stuff @niklasmueboe!
What do you think of the recursive option for listing the children
I like it, and subsequently I have removed the recently added get_direct_child_nodes
in favour of adding a recursive parameter to get_child_nodes
, but that will have to wait for the next breaking release.
I hope you don't mind me just finishing this PR off, I'll get a new release out later today with these changes.
+1. Feel free to raise additional PRs if you can think of any other useful additions to this library. |
First draft of functions to directly get the children of a
Group
.Not sure what the API should look like. One could also consider returning a list of
Node
s which correspond to onlyArray
s/Group
s instead of returning a list ofArray
s/Group
s directly for the functionchild_arrays
/child_groups
, respectively.Async function could also be added if needed.
Functions that only return a list of child names (i.e.
Vec<String>
) instead ofArray
s/Group
s could also be useful. Something akin to https://zarr.readthedocs.io/en/stable/api/hierarchy.html#zarr.hierarchy.Group.group_keysWould be good to get some feedback, then I can make some further adjustments.
Disclaimer; I am still quite new to Rust.