sPyNNaker icon indicating copy to clipboard operation
sPyNNaker copied to clipboard

Suggestion: rename `IDMixin` to `ID`

Open apdavison opened this issue 4 years ago • 6 comments

I noticed when debugging a script using spyNNaker that objects of type "IDMixin" appear where I would expect to see type "ID". The name "IDMixin" is not intended to be part of the PyNN API. In the PyNN "common" implementation, the class is used as a mixin for subclassing int or long, it does not have an __init__(). I think the best solution would be to rename the class in spyNNaker to ID. This is of course not urgent, it has no functional effect, just caused me some confusion when debugging.

apdavison avatar Mar 10 '21 14:03 apdavison

In PyNN if you do

foo = sim.Population(10, .... x = foo[2:3] y = foo[1]

x would be a PopulationView

What kind of Object should y be?

Can y also be just a PopulationView too or does it need to be a different object and if so what?

Christian-B avatar Mar 11 '21 10:03 Christian-B

y should be an ID object, although this name is potentially confusing, and the class could be renamed Cell or Neuron.

apdavison avatar Mar 11 '21 10:03 apdavison

"Cell" is already used for neuron model cell type and "neuron" is already over used.

I am thinking of using PopulationID which goes nicely with PopulationView

Christian-B avatar Mar 12 '21 07:03 Christian-B

Using a different name from other PyNN implementations is confusing, that's why I opened this ticket. If we change, it should be done across all implementations. I've opened https://github.com/NeuralEnsemble/PyNN/issues/715 to discuss this question and the relationship to PopulationView. I'd appreciate input from the SpiNNaker side there.

apdavison avatar Mar 12 '21 08:03 apdavison

I completely agree that Using a different name from other PyNN implementations is confusing!

I will await the decision in https://github.com/NeuralEnsemble/PyNN/issues/715 and then implement the same in SpyNNaker

Christian-B avatar Mar 12 '21 09:03 Christian-B

Still awaiting the decision what to do here in https://github.com/NeuralEnsemble/PyNN/issues/715

Christian-B avatar Jun 03 '21 06:06 Christian-B