-
Notifications
You must be signed in to change notification settings - Fork 165
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
Extension delete on recompute #2579
Extension delete on recompute #2579
Conversation
for more information, see https://pre-commit.ci
Nice, works for me! Maybe we could warn the user in some cases? E.g. deleting random spikes deletes everything! Or tell them what's happening: |
@alejoe91 : what do you think of warning or print when cascade deleteting on re compute ? |
For me I mean I wonder what the warning does? Because you're not going to say delete then offer a For me the warning only helps if I can stop it when I realize that deleting random_spikes deletes waveforms too... But in this case this is just a print that we are putting as a warning. But that's just my two cents. |
I know that I would be confused if I deleted "random_spikes" and everything vanished. I might not realise that the other extensions were deleted when I deleted random_spikes. So the warning highlights this fact. But yeah, if this was documented well that could work too! Another idea: now that we have these relationships we could have a "compute_parents" option on the compute() method? |
I think that is fair for newer users. I think it will also really annoy them that the warning is warning them after it is already done, but it is true that it will at least them know why they are now missing more than just what they thought they were deleting. So I can see it being helpful. I guess I could go either way.
I think @alejoe91 wanted that too! We discussed that a bit here #2504, but Sam was against it because he wanted to keep things as explicit as possible. |
# recursive children and so grand children and grand grand children | ||
# this is usefull to delete child extension on re compute | ||
# for instance recompute the "waveforms" need to delete "template" in ms_before is changed |
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'm just wondering if we can get a proper docstring here. For future contributors that haven't been a part of the transition to SortingAnalyzer
I think it would be nice. For example the parent-child in neo can be pretty confusing for new people so if we document it now I think future developers will thank us.
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.
OK I will do this but this function will be private. I think it is internal no ?
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.
done
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'm just imagining some young developer in 100 years working on spikeinterface and wishing all the private functions were fully documented.
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.
Hopefully there will be a 1.0 by then ahahah
for more information, see https://pre-commit.ci
Finally I choose the silently deletion. |
@chrishalcrow : this should fix the issue we discussed when recomputing something all children dependency are not valid anymore and have to deleted. Here a simple implementation of this idea.