brendanjohnharris / TimeseriesTools.jl

A convenient package for working with time series (time-indexed arrays)
MIT License
16 stars 0 forks source link

Piracy! #10

Closed rafaqz closed 1 month ago

rafaqz commented 7 months ago

Hi! was just looking through your code for our integration section of the DImensionalData.jl docs, and I just noticed some friendly piracy going on here :pirate_flag: !!

https://github.com/brendanjohnharris/TimeseriesTools.jl/blob/d64a95b7e40eb1958ebedcfa152e7829639c57a4/src/Utils.jl#L58

Maybe this should go in DimensionalData.jl proper so we are all above board? Currently this will mean stack will only work when TimeseriesTools.jl is loaded, which might confuse some users....

Its also kind of confusing that we already have something called a DimStack that is totally different to Base.stack, but it would be useful to have stack working all the same.

rafaqz commented 7 months ago

This one too https://github.com/brendanjohnharris/TimeseriesTools.jl/blob/d64a95b7e40eb1958ebedcfa152e7829639c57a4/src/Utils.jl#L23

Whats the use-case here?

brendanjohnharris commented 7 months ago

Hey, sorry for the wait; busy week! I've been learning more about DimensionalData.jl as I go, so much of this code is sub-optimal. There are definitely some cases of lazy piracy here 😅; would be good to get them expunged.

Extending Base.stack is probably better handled like this: https://github.com/rafaqz/DimensionalData.jl/pull/645

This one too

https://github.com/brendanjohnharris/TimeseriesTools.jl/blob/d64a95b7e40eb1958ebedcfa152e7829639c57a4/src/Utils.jl#L23

Whats the use-case here?

Often I'd have two DimArrays with a common dimension, say A and B. I'd one dimension of A through some pipeline, then later want to match the dimensions of B with the reduced A: e.g. B[At(dims(A, 1)]. IIRC this was supported behavior until a little while ago; at some point I must have tried to recreate the behavior without looking for a better solution...

brendanjohnharris commented 1 month ago

Closed by adding custom DimArray and Dimension subtypes in #14