spikeinterface icon indicating copy to clipboard operation
spikeinterface copied to clipboard

Add name as an extractor attribute for `__repr__` purposes

Open h-mayorquin opened this issue 9 months ago • 15 comments

I am working on the tutorial for the upcoming school and I think that the following could be useful quality of live improvement for talking about notebooks.

Right now the name of an extractor object displayed by the repr in the notebooks is the name of the class:

image

This means that two different objects will have the same name and I can't differentiate them by their repr. A limitation when presenting notebooks and I want to talk about two different recordings of the same class.

Ti addresss this, this PR introduces another attribute name (but I think displayed name or id could be better?) that displayed by the repr when set (otherwise it falls back to the current default of using the class name).

I also added other names to common generated objects that I think make more sense (as they don't leak implementation details).

image

h-mayorquin avatar Apr 29 '24 23:04 h-mayorquin