-
Notifications
You must be signed in to change notification settings - Fork 908
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 --tools=all
not working properly
#3361
Conversation
Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> Signed-off-by: lrcouto <laurarccouto@gmail.com>
Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> Signed-off-by: lrcouto <laurarccouto@gmail.com>
ad8d5dc
to
87e2e1e
Compare
Signed-off-by: lrcouto <laurarccouto@gmail.com>
…to bugfix/addons=all-fix
…kedro into bugfix/addons=all-fix Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com>
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.
Do we have any tests that should have caught this?
--addons=all
not working properly--tools=all
not working properly
+1 was going to say the same thing, then saw @merelcht already did :D |
kedro/framework/cli/starters.py
Outdated
if selected_tools.lower() == "none": | ||
return "" | ||
if selected_tools.lower() == "all": | ||
return ",".join(TOOLS_SHORTNAME_TO_NUMBER.values()) |
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.
Maybe we just need to update the TOOLS_SHORTNAME_TO_NUMBER dictionary? Put "none" and "all" there? Or it will break something else?
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 was thinking this as well but it feels a bit weird as "all" and "none" aren't tools.
😬 The unchecked point of failure is a little concerning I noticed in |
Sounds good to me 👍 |
Signed-off-by: lrcouto <laurarccouto@gmail.com>
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, @lrcouto and @SajidAlamQB , great work!
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.
Love the new tests, just a few comments:
@@ -1324,3 +1324,92 @@ def test_invalid_names(self, fake_kedro_cli, name): | |||
"Kedro project names must contain only alphanumeric symbols, spaces, underscores and hyphens and be at least 2 characters long" | |||
in result.output | |||
) | |||
|
|||
|
|||
class TestParseYesNoToBools: |
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.
Could we move the tests for parse_tools_input
into their own class as well? For consistency
def test_validate_selection_invalid_single_tool(self): | ||
tools = ["8"] | ||
with pytest.raises(SystemExit): | ||
_validate_selection(tools) |
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.
Could we add an assert for the correct error message? E.g the implementation for test_parse_tools_invalid_selection
Signed-off-by: lrcouto <laurarccouto@gmail.com>
…to bugfix/addons=all-fix
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.
LGTM! 👍
Description
Related to: #3334
When you use
--tools=all
or--tools all
in kedro new directly you don't get all addons as expected.You can also see in the message:
You have selected the following tools:
Development notes
The problem looks to be coming from
_convert_tool_names_to_numbers
.kedro/kedro/framework/cli/starters.py
Lines 469 to 490 in 7d295e8
We don't have a check for the "all" flag. We should probably also have "none" check here as well.
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