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 TRANSCODING_SEPARATOR import errors #1866

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Please follow the established format:
- Add markdown support for backticks in the pop-up reminder. (#1826)
- Fix posix path conversion on Windows in DatasetStatsHook. (#1843)
- Add `pydantic` pin to requirements. (#1861)
- Fix TRANSCODING_SEPARATOR import error. (#1866)

# Release 8.0.1

Expand Down
10 changes: 9 additions & 1 deletion package/kedro_viz/data_access/repositories/catalog.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
"""`kedro_viz.data_access.repositories.catalog` defines interface to
centralise access to Kedro data catalog."""

# pylint: disable=missing-class-docstring,missing-function-docstring,protected-access
import logging
from typing import TYPE_CHECKING, Dict, Optional

from kedro.io import DataCatalog
from kedro.pipeline.pipeline import TRANSCODING_SEPARATOR, _strip_transcoding

try:
# kedro 0.19.4 onwards
from kedro.pipeline._transcoding import TRANSCODING_SEPARATOR, _strip_transcoding
except ImportError: # pragma: no cover
# older versions
from kedro.pipeline.pipeline import TRANSCODING_SEPARATOR, _strip_transcoding

from packaging.version import parse

from kedro_viz.constants import KEDRO_VERSION
Expand Down
8 changes: 7 additions & 1 deletion package/kedro_viz/integrations/kedro/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
from kedro.framework.hooks import hook_impl
from kedro.io import DataCatalog
from kedro.io.core import get_filepath_str
from kedro.pipeline.pipeline import TRANSCODING_SEPARATOR, _strip_transcoding

try:
# kedro 0.19.4 onwards
from kedro.pipeline._transcoding import TRANSCODING_SEPARATOR, _strip_transcoding
except ImportError: # pragma: no cover
# older versions
from kedro.pipeline.pipeline import TRANSCODING_SEPARATOR, _strip_transcoding

logger = logging.getLogger(__name__)

Expand Down
9 changes: 8 additions & 1 deletion package/kedro_viz/models/flowchart.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
from typing import Any, Dict, List, Optional, Set, Union, cast

from kedro.pipeline.node import Node as KedroNode
from kedro.pipeline.pipeline import TRANSCODING_SEPARATOR, _strip_transcoding

try:
# kedro 0.19.4 onwards
from kedro.pipeline._transcoding import TRANSCODING_SEPARATOR, _strip_transcoding
except ImportError: # pragma: no cover
# older versions
from kedro.pipeline.pipeline import TRANSCODING_SEPARATOR, _strip_transcoding

from pydantic import (
BaseModel,
ConfigDict,
Expand Down
Loading