-
Notifications
You must be signed in to change notification settings - Fork 105
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 6 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 | ||
---|---|---|---|---|
|
@@ -2,8 +2,9 @@ | |||
centralise access to Kedro data catalog.""" | ||||
# pylint: disable=missing-class-docstring,missing-function-docstring,protected-access | ||||
from typing import Dict, Optional | ||||
from joblib import Memory | ||||
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.
Suggested change
|
||||
|
||||
from kedro.io import AbstractDataSet, DataCatalog, DataSetNotFoundError | ||||
from kedro.io import AbstractDataSet, DataCatalog, DataSetNotFoundError, MemoryDataSet | ||||
|
||||
from kedro_viz.constants import KEDRO_VERSION | ||||
|
||||
|
@@ -55,8 +56,9 @@ def get_dataset(self, dataset_name: str) -> Optional[AbstractDataSet]: | |||
dataset_obj = self._catalog._get_dataset(dataset_name, suggest=False) | ||||
else: # pragma: no cover | ||||
dataset_obj = self._catalog._get_dataset(dataset_name) | ||||
# if dataset has no catalog entry, it is a 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. Nit: I think this is bordering on a redundant comment (the code seems really self-explanatory), but I suppose one could argue that it adds a bit of value. Not strong feelings, just a hunch. |
||||
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 | ||||
dataset_obj = MemoryDataSet() | ||||
|
||||
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?