ContextLab / quail

A python toolbox for analyzing and plotting free recall data
http://cdl-quail.readthedocs.io/en/latest/
MIT License
20 stars 10 forks source link

functions vs methods of pyro object #7

Closed andrewheusser closed 7 years ago

andrewheusser commented 7 years ago

Thinking about how users will interact with this package.. During our meeting last week, we decided to implement the package as a set of functions, instead of method attached to the pyro object.

pyro=Pyro(data)
x = spc(pyro)
spc_plot(x)

vs.

pyro=Pyro(data)
pyro.spc(listgroup=listgroup).plot()

#or even more concise
Pyro(data).spc(listgroup=listgroup).plot()

Still happy with the functions as it will be the most straight forward to implement, but wanted to make one last case for the object-oriented design before we get too far with the API :)

KirstensGitHub commented 7 years ago

happy to do whatever you guys think is best! :)

jeremymanning commented 7 years ago

I think we should start with the "simple to implement" case (i.e. the implementation we discussed last week). I don't think it'd be too difficult to switch implementations if we discover a use case where it'd be especially convenient. At the moment, though, I'm not totally sold on the object-oriented version being substantially more convenient...and the non O-O version is simpler, which to me is a clear benefit.

andrewheusser commented 7 years ago

alright sounds good to me, onward!