Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add compatibility with vscode tableviewer #510

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

dwinrow
Copy link
Contributor

@dwinrow dwinrow commented Apr 6, 2022

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
Copy link
Contributor Author

dwinrow commented Apr 19, 2024

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
Copy link
Collaborator

Thanks for your contributions!

@iblislin iblislin merged commit fecc184 into JuliaStats:master Apr 22, 2024
3 of 4 checks passed
@dwinrow dwinrow deleted the vscodetableview branch April 23, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants