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

Fix shareable viz issue with dataclass refactor #1640

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading