-
Notifications
You must be signed in to change notification settings - Fork 113
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 MemoryDataSet
not displaying on metadata panel
#1113
Changes from 5 commits
823eed7
ef31de9
f30a6b9
26ce669
5aaccb6
85a2085
909fced
e998d0e
05fcacc
4253cf3
5d5177f
13a65e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -3,7 +3,7 @@ | |||||||||||
# pylint: disable=missing-class-docstring,missing-function-docstring,protected-access | ||||||||||||
from typing import Dict, Optional | ||||||||||||
|
||||||||||||
from kedro.io import AbstractDataSet, DataCatalog, DataSetNotFoundError | ||||||||||||
from kedro.io import AbstractDataSet, DataCatalog, DataSetNotFoundError, MemoryDataSet | ||||||||||||
|
||||||||||||
from kedro_viz.constants import KEDRO_VERSION | ||||||||||||
|
||||||||||||
|
@@ -57,6 +57,9 @@ def get_dataset(self, dataset_name: str) -> Optional[AbstractDataSet]: | |||||||||||
dataset_obj = self._catalog._get_dataset(dataset_name) | ||||||||||||
except DataSetNotFoundError: # pragma: no cover | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wonder if this should be covered in tests, given that it does make a functional difference. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, i will write the tests now ! |
||||||||||||
dataset_obj = None | ||||||||||||
# if dataset has no catalog entry, it is a MemoryDataSet | ||||||||||||
if not dataset_obj: | ||||||||||||
dataset_obj = MemoryDataSet() | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this any different from the below? Can
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it work's if you just add it in the exception. the reason why it flickered was because filepath is none for MemoryDataSets and it is a required field in DataNodeMetaDataResponseAPI which now I have made Optional. I will make the above change :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm happy with this. Yeah, I just didn't understand/get to finding what was happening with the validation error, but this solves it. |
||||||||||||
|
||||||||||||
return dataset_obj | ||||||||||||
|
||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can revert it?