-
Notifications
You must be signed in to change notification settings - Fork 873
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
Import TRANSCODING_SEPARATOR
to pipeline to make Kedro backwards compatible with kedro-viz
on python 3.8
#3822
Conversation
Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
How about this, but just get rid of the But generally in favor of doing a patch release; easy fix that will avoid more questions, and show responsiveness. |
To add some context to my suggestion—what was the original reason for moving stuff to the |
This is a breaking change and shouldn't be done in non-breaking release, we can do this but add a pointer to import from the new module instead. Agree with @deepyaman as I am not sure why this refactoring is necessary. It's not a big problem so a patch fix will do. |
It was done as part of #3812 to fix the issue with node dependencies uncovered by using the built-in toposort functionality. When reviewing it I didn't realise the transcoding separator was used outside of the framework and didn't think it was such a consequential refactor 😕 |
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.
Approved with a small comment to explains why this is needed and remind ourselves this can be removed in 0.20
I think this actually shouldn't be removed in 0.20? By adding this, we're once again signaling that |
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'm still pushing to just get rid of the _transcoding
module. IMO the refactor was unnecessary and inconsistent (introduced a new convention that doesn't exist anywhere else in the codebase), on top of having the breaking effect.
As mentioned in a comment just now, I don't think TRANSCODING_SEPARATOR
should be removed from public access even in 0.20.
As such, I see this is a good time to just move the stuff back into the pipeline
module, rather that keeping it in _transcoding
and importing most of the stuff, anyway.
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.
Thanks @ankatiyar I vote to go forward with this solution.
We didn't anticipate the move to _transcoding
to have such an impact, but nevertheless I think that was a good refactor and even though it's a new convention in Kedro it's not new for the world of Python to indicate private API in this way.
Thanks for weighing in Deepyaman. I disagree that introducing _transcoding was a bad refactor idea and think we should move forward. Juanlu and I discussed to have some sort of post-mortem on this issue so we can talk more.
Co-authored-by: Nok Lam Chan <nok.lam.chan@quantumblack.com> Signed-off-by: Ankita Katiyar <110245118+ankatiyar@users.noreply.github.com>
@deepyaman The addition of the module is actually necessary, because it resolves a circular dependency between |
There are other ways to remove circular dependencies, like not importing at the top level. It's not necessarily required. But that's fine.
Yes, there are a lot of libraries that use it very heavily. My point is that Kedro does not use it anywhere—I searched before making that comment—so it's introducing a new convention in the codebase. Even naming it |
Created a simple PR to illustrate: #3826 |
Description
Flagged by e2e test on
kedro-docker
this morning (but not related tokedro-docker
) - https://github.com/kedro-org/kedro-plugins/actions/runs/8730295535/job/23953858295#step:8:1Context
kedro-viz
dropped support for python 3.8 inv.8.0.0
TRANSCODING_SEPARATOR
tokedro.pipeline._transcoding.py
fromkedro.pipeline.pipeline.py
kedro-viz
in https://github.com/kedro-org/kedro-viz/blob/main/package/kedro_viz/integrations/kedro/hooks.pyThe problem
For python versions > 3.8, everything is okay ✅
For python version == 3.8:
If a user has a project that uses both Kedro and Viz, the project becomes completely unusable -
Development notes
Proposed Solution 1
kedro-viz
for their projects)kedro-viz
(Uninstalling viz solves the problem)Proposed Solution 2
TRANSCODE_SEPARATOR
tokedro.pipeline.pipeline
Other considerations (Bigger discussion)
Developer Certificate of Origin
We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a
Signed-off-by
line in the commit message. See our wiki for guidance.If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.
Checklist
RELEASE.md
file