qnngroup / qnngds

MIT License
4 stars 3 forks source link

More automated cell creation #68

Open reed-foster opened 3 months ago

reed-foster commented 3 months ago

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.