-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/feedback-form
- Loading branch information
Showing
18 changed files
with
273 additions
and
491 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
package/kedro_viz/integrations/kedro/abstract_dataset_lite.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"""``AbstractDatasetLite`` is a custom implementation of Kedro's ``AbstractDataset`` | ||
to provide an UnavailableDataset instance when running Kedro-Viz in lite mode. | ||
""" | ||
|
||
import logging | ||
from typing import Any, Optional | ||
|
||
from kedro.io.core import AbstractDataset, DatasetError | ||
|
||
from kedro_viz.integrations.utils import UnavailableDataset | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class AbstractDatasetLite(AbstractDataset): | ||
"""``AbstractDatasetLite`` is a custom implementation of Kedro's ``AbstractDataset`` | ||
to provide an UnavailableDataset instance by overriding ``from_config`` of ``AbstractDataset`` | ||
when running Kedro-Viz in lite mode. | ||
""" | ||
|
||
@classmethod | ||
def from_config( | ||
cls: type, | ||
name: str, | ||
config: dict[str, Any], | ||
load_version: Optional[str] = None, | ||
save_version: Optional[str] = None, | ||
) -> AbstractDataset: | ||
try: | ||
return AbstractDataset.from_config(name, config, load_version, save_version) | ||
except DatasetError: | ||
return UnavailableDataset() |
Oops, something went wrong.