-
Notifications
You must be signed in to change notification settings - Fork 115
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
[Spike] Create a Proof of Concept for Type Hints for dataset previews #2090
Comments
Hey @astrojuanlu @rashidakanchwala, I replaced the existing See: kedro-org/kedro-plugins#831 Results:
Issue:
Let me know your thoughts. Example type hint for Auto suggestion for |
This is amazing! Thanks for the spike. I had one question. In Juanlu's example he returned a PolarsTable which had a differnt format. He didn't type it out just returned df (which was columns:...) -- does it highlight then too, if this is wrong return type |
Great job @SajidAlamQB and good call @rashidakanchwala ! Sad that my original issue wouldn't have been caught by this. It's still a small improvement in DX, so maybe it would be nice to have. |
And the small improvement in DX is probably not worth the effort of doing this in a way that it's compatible with Python 3.9... |
Thanks for the feedback. Since the type hinting provides some improvement in developer experience but doesn't strictly enforce the structure and has compatibility issues with Python 3.9, we'll close this spike. For now, we'll keep the current approach and revisit in the future. |
Description
See here: #1847
By using a type dict or other typing tools, see if the IDE will be able to provide hints that lets users know about the required structure of the preview dictionary (e.g., index, columns, and data keys for TablePreview). Assess how effective the PoC is in helping users keep to the expected preview format and reducing the likelihood of errors due to incorrect return types or structures.
Checklist
The text was updated successfully, but these errors were encountered: