slac207 / cs207project

MIT License
0 stars 3 forks source link

Create a TimeSeriesInterface ABC #23

Closed sanoke closed 8 years ago

sanoke commented 8 years ago

From the Project Spec 5, implement

a well documented ABC which defines a set of common methods that might be used both in sized-container based time series as well as stream based and simulated time series (for e.g. the time series range(1000) or that represented by successive (to infinity) fibonaccis).

I'll let you decide what methods ought to go into this ABC and what don't, but can tell you that the constructor is not part of the interface, and that the way to think about this is: that for example, __iter__ makes sense both for containers and iterables, but that values only makes sense for containers. Or in other words, iterators make sense here, but not containers.

So the way to think about it is: which methods you defined in the last installation of the project so far ought to be hoisted into the common interface?

cocochrane commented 8 years ago

@sanoke @lshen2009 @jsm09 @brennan-ae Hey guys, I need some input as to what functions should go in the ABC. This is what I'm currently thinking: Go into ABC: iter, itervalues, itertimes, iteritems Won't go into ABC: getitem, setitem, contains, values, time, items, and length

Really unsure about this though so please give me your input!

brennan-ae commented 8 years ago

I think that sounds good.

Does the streaming version store the data? If so, then we'd want times, values, items, contains.

What about add, bool etc? I would think yes to all those being in the ABC.