-
Notifications
You must be signed in to change notification settings - Fork 35
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 deep
kwarg to delete!
#774
Conversation
Codecov Report
@@ Coverage Diff @@
## master #774 +/- ##
==========================================
+ Coverage 78.68% 78.73% +0.05%
==========================================
Files 35 35
Lines 2984 2996 +12
==========================================
+ Hits 2348 2359 +11
- Misses 636 637 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
For the new |
@davidanthoff Yes, it would be a weird behavior to leave the connections hanging. Shall I remove the option all together for now? (Since this is a new function, we could always add in options later if we realize they might be needed) |
@davidanthoff ok I got impatient and was assuming you were going to answer yes so I removed that option for now |
One design question is whether it would be better to not have a separate
The only thing is that we now have this |
decided in group meeting: stick with |
delete_unbound_comp_params
kwarg to delete!
deep
kwarg to delete!
#752
Two additions in this PR:
delete_unbound_comp_params::Bool=false
keyword argument to thedelete!
function, which when set to true then deletes all external parameters that were only connected to the deleted component.delete_param!(m, external_param_name, delete_connections=true)
for removing parameters from a model's list of external parameters.To discuss:
delete_unbound_comp_params
for now, which is definitely not perfect. The reason I'm feeling averse todeep
orrecursive
is that it doesn't delete all parameters associated with this component, only the ones not connected to any other components.delete_param!
function, is this okay to make the defaultdelete_connections=true
, and do we want a different name for that keyword arg?