NeurodataWithoutBorders / nwbwidgets

Explore the hierarchical structure of NWB 2.0 files and visualize data with Jupyter widgets.
https://nwb-widgets.readthedocs.io/en/latest/
Other
48 stars 21 forks source link

Add BaseController - demonstrate refactor on time window controllers #256

Closed CodyCBakerPhD closed 1 week ago

CodyCBakerPhD commented 1 year ago

Draft PR split from #255, consists of 4 major parts:

(i) Introduction of BaseController

(ii) Introduction of MultiController

(iii) Demonstrated refactor of the 3 classes in the time window controllers to inherit from the BaseController, which thereby allows them to be passed as a component to a MultiController. Also added annotation types.

(iv) Tests for new controller classes - still in progress until I get the go ahead to finish them up, but a few of them show the new BaseController design pattern.

I opted to get rid of the GenericController from #255 since it was allowing a bit too much flexibility to controller design; better if we just enforce a single design standard that is similar to existing controller designs.