I wonder if it makes sense to redesign cells.py so that there's one general method which takes in a die_parameters instance and a curried function for generating the device. For example, if you have a device method ntron(choke_w, channel_w, ...), you could define my_ntron = lambda: ntron(my_choke_w, my_channel_w, ...) and then pass my_ntron as an argument to some more generic cell-creation method.
If all the methods in cells.py are similar (e.g. instantiate the device and add some pads), then this might reduce the amount of code someone has to write to contribute a new cell, but if you think it's important to have customization in these methods, then definitely keep things the way they are. Minor customization could be achieved when defining the curried device-creation function, but if you need to add a lot of stuff, then it kind of defeats the point.
I wonder if it makes sense to redesign
cells.py
so that there's one general method which takes in a die_parameters instance and a curried function for generating the device. For example, if you have a device methodntron(choke_w, channel_w, ...)
, you could definemy_ntron = lambda: ntron(my_choke_w, my_channel_w, ...)
and then passmy_ntron
as an argument to some more generic cell-creation method.If all the methods in
cells.py
are similar (e.g. instantiate the device and add some pads), then this might reduce the amount of code someone has to write to contribute a new cell, but if you think it's important to have customization in these methods, then definitely keep things the way they are. Minor customization could be achieved when defining the curried device-creation function, but if you need to add a lot of stuff, then it kind of defeats the point.