SpiNNakerManchester / sPyNNaker8

The PyNN 0.8 interface to sPyNNaker.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ugly hidden inheritance requirement

dkfellows opened this issue · comments

spynnaker8.models.recorder.Recorder can only work if the class is also a spynnaker.pyNN.models.pynn_population_common.PyNNPopulationCommon because it assumes that there is an _all_ids field and that's the only class that ever defines one. This is ugly. Something neater should be done, but I'm not sure what.

(Found as part of #287.)

Looking at it Population has two superclasses and implements one interface

The Interface is PopulationBase is shared with PopulationView and would be shared with Assembliy so it fine.

The Two Superclasses are:
PyNNPopulationCommon and Recorder where Recorder extends RecordingCommon
Population is the ONLY thing that uses these three superlcasses

The line count is:
Population 462 (spynnaker8)
PyNNPopulationCommon 584 (spynakker)
Recorder 466 (spynakker8)
RecordingCommon 262 (spynakker)

There is a lot of spaghetti left over from the PyNN7 vs Pynn8 monster.

Suggestion merge into 1 big class.
Then if too big split off some to a super class.

@dkfellows @rowleya @alan-stokes @andrewgait Opinions?

Sounds like it is being made more confusing by separation. I suggest merging.

Is there likely to be other directly-recordable things?

No objections to merging all of them but it might be easier to start off with to merge the sPyNNaker8 classes and sPyNNaker classes separately. Then at some point we can look at merging all of sPyNNaker8 into sPyNNaker... ?

the only issue i have with the merging is your result will be another beast of a file. we have issues with beasty files.
ASB, Transciever, ya want another one..... is there not a fix which does not require merging everything?

This work is messy to do without first moving.merging the sPyNNaker8 code into sPyNNaker

At a minimum to merge these we should move
Population which then requires moving
IDMixin, PopulationBase, PopulationView, DataCache, VariableCache, Recorder