Skip to content

Commit

Permalink
Fix shareable viz issue with dataclass refactor (#1640)
Browse files Browse the repository at this point in the history
* fix shareable viz

Signed-off-by: ravi-kumar-pilla <[email protected]>

* update earliest kedro version to 0.18.3

Signed-off-by: ravi-kumar-pilla <[email protected]>

---------

Signed-off-by: ravi-kumar-pilla <[email protected]>
  • Loading branch information
ravi-kumar-pilla authored Nov 15, 2023
1 parent 2eb9c0a commit b8fbc4b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package/features/viz.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Feature: Viz plugin in new project
Given I have prepared a config file with example code

Scenario: Execute viz with the earliest Kedro version that it supports
Given I have installed kedro version "0.18.2"
Given I have installed kedro version "0.18.3"
And I have run a non-interactive kedro new with pandas-iris starter
And I have installed the project's requirements
When I execute the kedro viz command
Expand Down
12 changes: 7 additions & 5 deletions package/kedro_viz/models/flowchart.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ class GraphNode(BaseModel, abc.ABC):
type: str
tags: Set[str] = Field(set(), description="The tags associated with this node")
kedro_obj: Optional[Union[KedroNode, AbstractDataset]] = Field(
None, description="The underlying Kedro object for each graph node, if any"
None,
description="The underlying Kedro object for each graph node, if any",
exclude=True,
)
pipelines: Set[str] = Field(
set(), description="The set of registered pipeline IDs this node belongs to"
Expand Down Expand Up @@ -429,7 +431,7 @@ class TaskNodeMetadata(GraphNodeMetadata):
AssertionError: If task_node is not supplied during instantiation
"""

task_node: TaskNode
task_node: TaskNode = Field(..., exclude=True)

# Source code of the node's function
code: Optional[str]
Expand Down Expand Up @@ -712,7 +714,7 @@ class DataNodeMetadata(GraphNodeMetadata):
AssertionError: If data_node is not supplied during instantiation
"""

data_node: DataNode
data_node: DataNode = Field(..., exclude=True)

# The type of the data node
type: Optional[str]
Expand Down Expand Up @@ -821,7 +823,7 @@ class TranscodedDataNodeMetadata(GraphNodeMetadata):
AssertionError: If transcoded_data_node is not supplied during instantiation
"""

transcoded_data_node: TranscodedDataNode
transcoded_data_node: TranscodedDataNode = Field(..., exclude=True)

# The path to the actual data file for the underlying dataset.
# Only available if the dataset has filepath set.
Expand Down Expand Up @@ -957,7 +959,7 @@ class ParametersNodeMetadata(GraphNodeMetadata):
AssertionError: If parameters_node is not supplied during instantiation
"""

parameters_node: ParametersNode
parameters_node: ParametersNode = Field(..., exclude=True)
parameters: Optional[Dict] = Field(
None, description="The parameters dictionary for the parameters metadata node"
)
Expand Down

0 comments on commit b8fbc4b

Please sign in to comment.