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

Support Deferred Type Annotations in Dataset Previews #1798

Merged
merged 3 commits into from
Mar 12, 2024

Conversation

SajidAlamQB
Copy link
Contributor

@SajidAlamQB SajidAlamQB commented Mar 11, 2024

Description

Related to: kedro-org/kedro-plugins#595 and #1622

This PR updates dataset preview types to support deferred type annotations, from __future__ import annotations.

With from __future__ import annotations, annotations are stored as strings and resolved when needed rather than immediately. This affects how annotations are accessed in Kedro-Viz particularly in how we retrieve preview_type for datasets.

Development notes

  • Adjusted set_preview_type in the backend to accommodate type annotations as strings.

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added new entries to the RELEASE.md file
  • Added tests to cover my changes

Signed-off-by: Sajid Alam <sajid_alam@mckinsey.com>
Signed-off-by: Sajid Alam <sajid_alam@mckinsey.com>
Signed-off-by: Sajid Alam <sajid_alam@mckinsey.com>
@SajidAlamQB
Copy link
Contributor Author

Reverted FE changes as they didn't have any effect and were causing the failures.

Copy link
Contributor

@rashidakanchwala rashidakanchwala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks

Copy link
Contributor

@ravi-kumar-pilla ravi-kumar-pilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯 ... Thank you @SajidAlamQB

@SajidAlamQB SajidAlamQB merged commit 7cf36bd into main Mar 12, 2024
14 checks passed
@SajidAlamQB SajidAlamQB deleted the add-support-for-future-annotations branch March 12, 2024 10:08
@rashidakanchwala rashidakanchwala mentioned this pull request Apr 17, 2024
5 tasks
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.

3 participants