ioam / topographica

A general-purpose neural simulator focusing on topographic maps.
topographica.org
BSD 3-Clause "New" or "Revised" License
53 stars 32 forks source link

Refactored submodel system to use ModelSpecs #580

Closed jlstevens closed 10 years ago

jlstevens commented 10 years ago

This PR fixes some annoyances with the submodel system:

The solution proposed here is to introduce a ModelSpec which is the declarative counterpart to a Model definition class. Just like SheetSpec and ProjectionSpec it can be called to instantiate the corresponding model. This helps make a clearer distinction between the model definition (code), the model specification (lightweight, declarative object) and simulation components (memory hungry objects).

philippjfr commented 10 years ago

Makes sense. A few comments:

jlstevens commented 10 years ago

Ok great!

I'll make this commit directly to keep the commit logs clean, making sure to include a reference to this PR. I also agree that attrs doesn't need to be an AttrTree - I will switch it to a regular dictionary in a later commit.

EDIT1: Applied these changes to master in commit e0db6188 EDIT2: Switched attrs from AttrTree to dictionary in commit 3fd64fa