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

feat/remove-viz-tool #4517

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

feat/remove-viz-tool #4517

wants to merge 15 commits into from

Conversation

Huongg
Copy link
Contributor

@Huongg Huongg commented Feb 25, 2025

Description

As part of kedro-org/kedro-starters#263, we need to remove the Viz tool since it is automatically included when a user runs kedro new.

This PR ensures there are no remaining references to the Viz tool in the starters. If a user includes viz or the number 7 in their setup, they will see an error message stating:
"Kedro Viz is automatically included in the project. Please remove 'viz' from your setup."
or
"Kedro Viz is automatically included in the project. Please remove 7 from your setup."

Development notes

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

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

Huong Nguyen added 2 commits February 25, 2025 15:29
Signed-off-by: Huong Nguyen <huong.nguyen@mckinsey.com>
Signed-off-by: Huong Nguyen <huong.nguyen@mckinsey.com>
@Huongg Huongg requested a review from ankatiyar February 25, 2025 15:34
Huong Nguyen and others added 9 commits February 25, 2025 15:41
Signed-off-by: Huong Nguyen <huong.nguyen@mckinsey.com>
Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
Signed-off-by: Huong Nguyen <huong.nguyen@mckinsey.com>
Signed-off-by: Huong Nguyen <huong.nguyen@mckinsey.com>
Signed-off-by: Huong Nguyen <huong.nguyen@mckinsey.com>
Signed-off-by: Huong Nguyen <huong.nguyen@mckinsey.com>
@Huongg Huongg marked this pull request as ready for review March 4, 2025 11:08
@Huongg Huongg requested a review from merelcht as a code owner March 4, 2025 11:08
@ankatiyar
Copy link
Contributor

Was just manually testing this branch and realised that you'd also need to update the prompt here: https://github.com/kedro-org/kedro/blob/main/kedro/templates/project/prompts.yml

Huongg and others added 3 commits March 4, 2025 14:20
Co-authored-by: Ankita Katiyar <110245118+ankatiyar@users.noreply.github.com>
Signed-off-by: Huong Nguyen <32060364+Huongg@users.noreply.github.com>
Signed-off-by: Huong Nguyen <huong.nguyen@mckinsey.com>
Signed-off-by: Huong Nguyen <huong.nguyen@mckinsey.com>
@Huongg Huongg requested review from lrcouto and ElenaKhaustova March 4, 2025 16:58
@rashidakanchwala rashidakanchwala self-requested a review March 5, 2025 12:17
Copy link
Contributor

@rashidakanchwala rashidakanchwala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey,

I tested this, and it worked well—Kedro-Viz didn’t appear as an option, which was great. However, after selecting option 7, it first asked if I wanted an example pipeline before informing me that the project couldn't be created because option 7 didn’t exist. Ideally, selecting option 7 should immediately throw an error instead of proceeding further.

If we could surface this error earlier, that would improve the experience. Otherwise, everything else was fine.

@merelcht
Copy link
Member

merelcht commented Mar 6, 2025

If we could surface this error earlier, that would improve the experience. Otherwise, everything else was fine.

Agreed on this, but that has always been the behaviour so not really part of this task. Let's create a separate ticket for that.

Copy link
Contributor

@rashidakanchwala rashidakanchwala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok since the other issue will be tackled in a seperate ticket. This looks good to me. Thanks @Huongg.

Also, can we create the other issue so we dont' forget.

Copy link
Member

@merelcht merelcht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just don't forget to add this to the release notes ✍️

Copy link
Contributor

@ElenaKhaustova ElenaKhaustova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested it and it works well as described.

One thing I find confusing is that we process 7 different from other non-valid selections. Is there a specific reason for that?

For example, if selecting 8 we get:

'8' is not a valid selection.
Please select from the available tools: 1, 2, 3, 4, 5, 6.

Should we process 7 differently at all? And if yes, maybe it makes sense extending the original message rather than fully replacing it, so it was clear that the nature of the problem is non-valid selection?

But if it was done intentionally - feel free to merge 🙂

@Huongg
Copy link
Contributor Author

Huongg commented Mar 7, 2025

I've tested it and it works well as described.

One thing I find confusing is that we process 7 different from other non-valid selections. Is there a specific reason for that?

For example, if selecting 8 we get:

'8' is not a valid selection.
Please select from the available tools: 1, 2, 3, 4, 5, 6.

Should we process 7 differently at all? And if yes, maybe it makes sense extending the original message rather than fully replacing it, so it was clear that the nature of the problem is non-valid selection?

But if it was done intentionally - feel free to merge 🙂

hey @ElenaKhaustova thanks for reviewing the PR. The reason we see a different error for number 7 is that it was originally associated with Kedro-Viz. However, since we've now removed 7 and kedro-viz from the tools, we want to ensure that if a user includes it in their tool selection, it indicates that Kedro-Viz is automatically included when they run kedro new

Signed-off-by: Huong Nguyen <huong.nguyen@mckinsey.com>
@ElenaKhaustova
Copy link
Contributor

I've tested it and it works well as described.
One thing I find confusing is that we process 7 different from other non-valid selections. Is there a specific reason for that?
For example, if selecting 8 we get:

'8' is not a valid selection.
Please select from the available tools: 1, 2, 3, 4, 5, 6.

Should we process 7 differently at all? And if yes, maybe it makes sense extending the original message rather than fully replacing it, so it was clear that the nature of the problem is non-valid selection?
But if it was done intentionally - feel free to merge 🙂

hey @ElenaKhaustova thanks for reviewing the PR. The reason we see a different error for number 7 is that it was originally associated with Kedro-Viz. However, since we've now removed 7 and kedro-viz from the tools, we want to ensure that if a user includes it in their tool selection, it indicates that Kedro-Viz is automatically included when they run kedro new

I see, thanks for explaining. Then maybe we can have a message like that:

`7` is not a valid selection.
Please select from the available tools: 1, 2, 3, 4, 5, 6.
Kedro Viz is automatically included in the project. Please remove `7` from your tool selection.

Copy link
Contributor

@ElenaKhaustova ElenaKhaustova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with a suggestion left, thank you @Huongg

@@ -117,11 +117,10 @@ def _remove_file(path: Path) -> None:
path.unlink()


def _remove_pyspark_viz_starter_files(is_viz: bool, python_package_name: str) -> None:
def _remove_pyspark_viz_starter_files(python_package_name: str) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this function needs to be renamed too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants