-
Notifications
You must be signed in to change notification settings - Fork 76
Adds child cascading to assign_context_to_process_group #267
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
Conversation
Adds an optional bool to assign_context_to_process_group that, when True, will cascade the assigned Parameter Context down to the direct children Process Groups of the named Process Group. Does not recur down to nested-children.
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 this is a good capability, but API wise it seems a little odd.
- It only recurses one level, shouldn't it call itself on the child so the child recurses all the way down instead of update_process_group? That would also be cleaner.
- It returns the top level process group, so all the children modified are 'lost', this seems counter to the api. It returns the process group for a reason right?
Maybe a new api on top would be a better fit than putting it inside this api.
@Chaffelson ?
Ok, so I was mistaking on 1. wrt actually getting to all the children, sorry. I still think changing the call might be right ( looking for @Chaffelson input though ) Thanks for the contribution as well! |
Originally I went with single depth as I hadn't thought through all of the consequences of recurring over all children yet - After discussion with @Chaffelson I changed this to recur down to all children, so it's doing that after the second commit. wrt to point 2 - yep, welcome feedback on that - I had considered returning a list of all the child PGs affected, but that meant either 1. changing the return type so it always returns a list or 2. having more than one possible return type - neither sounded ideal. Open to suggestions |
* Adds direct-child cascading to assign_context_to_process_group Adds an optional bool to assign_context_to_process_group that, when True, will cascade the assigned Parameter Context down to the direct children Process Groups of the named Process Group. Does not recur down to nested-children. * Updates cascade to recur to all children rather than immediate only * removed pprint import oops Co-authored-by: abrown <[email protected]>
Adds an optional bool to assign_context_to_process_group that, when True, will cascade the assigned Parameter Context down to the direct children Process Groups of the named Process Group. Does not recur down to nested-children.