JuliaStats / TimeSeries.jl

Time series toolkit for Julia
Other
349 stars 69 forks source link

add compatibility with vscode tableviewer #510

Closed dwinrow closed 3 months ago

dwinrow commented 2 years ago

The vscode tableviewer guide is incorrect when it says it works with all Tables.jl compatible types. In fact it requires the type's iterator to be a named tuple and uses two further packages for this.

It uses TableTraits.jl isiterabletable(x) to determine if the table x is iterable. This checks the eltype of the table x requiring it to be a NamedTuple. It also uses IteratorInterfaceExtensions.jl getiterator(x) to retrieve the iterator for the interface.

This commit implements a fix for #508 in the way that DataFrames.jl implements tables.jl by overloading the above methods. I've also overloaded IteratorInterfaceExtensions.isiterable(x) but this may be unnecessary.

dwinrow commented 3 months ago

Could I have some feedback on this? I've resolved the conflicts in Project.toml, and this commit enhances the use of TimeArrays in VSCode as you can use the table viewer in the Julia extension.

iblislin commented 3 months ago

Thanks for your contributions!