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

[Refactor] Decouple Kedro-viz and Kedro-datasets #1700

Closed
1 task
rashidakanchwala opened this issue Jan 8, 2024 · 1 comment
Closed
1 task

[Refactor] Decouple Kedro-viz and Kedro-datasets #1700

rashidakanchwala opened this issue Jan 8, 2024 · 1 comment
Assignees
Labels
Enhancement Issue: Feature Request Python Pull requests that update Python code

Comments

@rashidakanchwala
Copy link
Contributor

Description

Kedro-Viz and Kedro-Datasets currently are tightly coupled , leading to issues where modifications in Kedro-Datasets can disrupt the functionality of Kedro-Viz. This ticket aims to refactor the codebase to enhance modularity and stability. The goal is to decouple the two components, allowing for smoother integration in the future without excessive interdependencies.

Context

Why is this change important to you? How would you use it? How can it benefit other users?

Possible Implementation

(Optional) Suggest an idea for implementing the addition or change.

Possible Alternatives

(Optional) Describe any alternative solutions or features you've considered.

Checklist

  • Include labels so that we can categorise your feature request
@rashidakanchwala rashidakanchwala added the Python Pull requests that update Python code label Jan 8, 2024
@rashidakanchwala rashidakanchwala moved this to Backlog in Kedro-Viz Jan 8, 2024
@rashidakanchwala rashidakanchwala moved this from Backlog to Todo in Kedro-Viz Jan 8, 2024
@rashidakanchwala rashidakanchwala self-assigned this Jan 8, 2024
@rashidakanchwala rashidakanchwala moved this from Todo to In Progress in Kedro-Viz Jan 9, 2024
@rashidakanchwala rashidakanchwala moved this from In Progress to In Review in Kedro-Viz Feb 5, 2024
rashidakanchwala added a commit that referenced this issue Feb 21, 2024
Description
Related to: #1700

Kedro-Viz and Kedro-Datasets are tightly coupled , leading to issues where modifications in Kedro-Datasets can disrupt the functionality of Kedro-Viz. This ticket aims to refactor the codebase to enhance modularity and stability. The goal is to decouple the two components, allowing for smoother integration in the future without excessive interdependencies.

Development notes
We've moved the logic for generating previews for several datasets from kedro-viz to kedro-datasets, reducing the coupling between kedro-viz and kedro-datasets.

Previews are rendered differently in the front-end, so we've introduced aliasing using NewType. Currently, we support four types of previews in the front-end: json, image [png], plotly, and dataframe [as tables]. Users can enable previews for custom datasets as long as they fall into one of these categories.

Previously, we utilized the load function and overrode it in kedro-viz to load dataset previews. However, this logic has been migrated to kedro-datasets within the preview() function. In the kedro-viz API, we no longer include plot, image, or tracking_data as fields of DataNodeMetadata. Instead, we now only send preview and preview_type. Preview can be a preview of any dataset that has the preview function, and preview_type informs the front-end on how to render the preview.
@rashidakanchwala rashidakanchwala moved this from In Review to Done in Kedro-Viz Feb 21, 2024
@rashidakanchwala
Copy link
Contributor Author

Closing this as it is done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Issue: Feature Request Python Pull requests that update Python code
Projects
Status: Done
Development

No branches or pull requests

1 participant