Skip to content

Commit

Permalink
Update get_kedro_project_json_data import path (#152)
Browse files Browse the repository at this point in the history
* get_kedro_project_json_data path update

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

* Updated the minimum version of kedro-viz to 10.1.0

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

---------

Signed-off-by: Jitendra Gundaniya <[email protected]>
  • Loading branch information
jitu5 authored Nov 22, 2024
1 parent 5bf392f commit e49cfa5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion bundled/tool/lsp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,12 @@ def definition_from_flowchart(ls, word):
def get_project_data_from_viz(lsClient):
"""Get project data from kedro viz"""
from kedro_viz.server import load_and_populate_data
from kedro_viz.api.rest.responses import get_kedro_project_json_data
try:
# For kedro-viz > 10.0.0
from kedro_viz.api.rest.responses.pipelines import get_kedro_project_json_data
except ImportError as e:
# For kedro-viz = 10.0.0
from kedro_viz.api.rest.responses import get_kedro_project_json_data

data = None
try:
Expand Down
2 changes: 1 addition & 1 deletion kedro-viz-requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
kedro-viz>=10.0.0
kedro-viz>=10.1.0

0 comments on commit e49cfa5

Please sign in to comment.