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

Introduce get_kedro_project_json_data function for VSCode integration #2049

Merged
merged 10 commits into from
Sep 3, 2024

Conversation

jitu5
Copy link
Contributor

@jitu5 jitu5 commented Aug 20, 2024

Description

Resolves #2021

To get current Kedro project JSON data required by Kedro-Viz React component when running inside VSCode, We introduce get_kedro_project_json_data function in responses.py which returns current Kedro project JSON data.

Development notes

  • This function will call from Kedro VSCode extension
  • Before calling get_kedro_project_json_data function, load_and_populate_data will be called

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

jitu5 added 3 commits August 20, 2024 14:37
Signed-off-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
@jitu5 jitu5 marked this pull request as ready for review August 21, 2024 17:11
@jitu5 jitu5 self-assigned this Aug 28, 2024
@astrojuanlu
Copy link
Member

And also, would it make sense longer term to extract that functionality to a self-contained package? Thinking for example of the defunct https://github.com/AlpAribal/kedro-inspect/

@noklam
Copy link
Contributor

noklam commented Aug 30, 2024

And also, would it make sense longer term to extract that functionality to a self-contained package? Thinking for example of the defunct https://github.com/AlpAribal/kedro-inspect/

This definitely make sense, but I would like to see this happen at a core level where kedro has a better way of serialise/deserialise a Pipeline. Otherwise the current JSON data structure is very much coupled to kedro-viz, and I don't see much benefit of making it a separate package itself. Maybe just making kedro-viz a leaner package would help. similiar to the kedro-core discussion, maybe kedro-viz[core] or kedro-viz[standard].

https://nbviewer.org/github/noklam/kedro-viz-lite/blob/main/nbs/10_demo.ipynb, regardless of a separate package /refactoring, I would like to see this can be done in a notebook, where I can easily convert an existing Pipeline object. The notebook has shown that Pipeline is the only thing that is needed, we don't really need a full Kedro project to generate the flowchart JSON.

@noklam noklam mentioned this pull request Sep 2, 2024
21 tasks
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!

* Load data functions move out of server

Signed-off-by: Jitendra Gundaniya <[email protected]>

* Refactor

Signed-off-by: Jitendra Gundaniya <[email protected]>

* Lint fix

Signed-off-by: Jitendra Gundaniya <[email protected]>

* lint fix

Signed-off-by: Jitendra Gundaniya <[email protected]>

---------

Signed-off-by: Jitendra Gundaniya <[email protected]>
@jitu5 jitu5 merged commit e09ba1f into main Sep 3, 2024
33 checks passed
@jitu5 jitu5 deleted the feature/kedro-project-data branch September 3, 2024 09:55
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.

Spike: Share JSON data from Kedro-Viz via extension to Webview
4 participants