i2mint / creek

Simple streams
Apache License 2.0
2 stars 0 forks source link

Move `SlabsIter` from `know` to `creek` #5

Closed thorwhalen closed 1 year ago

thorwhalen commented 1 year ago

SlabsIter, which started in know, as a proposal object that to manage stream read/writes iteratively, seems to have graduated to being used more often. creek seems to be the right place for it since it has no third-party dependencies and has to do with streams.

See in comments more decisions to discuss and settle on.

EDIT: Actually, I misread: SlabsIter does have a dependency on i2. So we should reconsider if it makes sense

I prefer the first two options.

thorwhalen commented 1 year ago

I left slabsiter_test in know for now since this test is heavy (it downloads data, and requires pandas, graze, soundfile and dol) and doesn't really test slabsiter that much. It's a nice test to have around to see slabsiter in a more involved context, but I wouldn't want to burden the CI of such a light weight package as creek with it.

Any suggestions of what to do with it? Leave it where it is? Convert it to something similar but light weight (example, using recode instead of soundfile, local package file instead of a graze download (which doesn't even persist till the next CI run), and (possibly, but not sure it's worth it) replacing pandas with something else. pandas is only used for uniqueness (can use set instead of pd.unique!) and reading a csv into a dataframe (but then need to check how this dataframe is used.

thorwhalen commented 1 year ago

Now is a good time (if not too late already) to reconsider the names we use in the slabs module before they become too sticky.

The main one I'm tempted to change is SlabsIter, using the name Slabs instead, since it's less of a mouthful and it doesn't seem we need the "Iter" part, since the s makes it clear that it's an iterable.

Then we can reconsider the word "slab" itself too. It's a bit of an ugly word. But maybe changing the word would be too much work at this point to update it everywhere, and I don't even have a better word for it.

thorwhalen commented 1 year ago

Moving to meshed so closing this issue.