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

Improve the error message & docstring of kedro new for custom starters #2618

Closed
Tracked by #2604
noklam opened this issue May 30, 2023 · 5 comments
Closed
Tracked by #2604

Improve the error message & docstring of kedro new for custom starters #2618

noklam opened this issue May 30, 2023 · 5 comments
Labels
Component: Documentation 📄 Issue/PR for markdown and API documentation good first issue Good first issues for beginners

Comments

@noklam
Copy link
Contributor

noklam commented May 30, 2023

Part of #2604

Context

The error message of kedro new is not very accurate. This was found when we try to use kedro new for a new starter that haven't been added to the official starters list.

There are at least 2 common ways (Added more if found)

  1. kedro new -s pandas-iris , using kedro new for official starters

  2. kedro new --starter <some_directory> --checkout <branch> --directory <directory>, use it for custom starters in local or repository (not documented)

  3. should be documented as it is not easy to figure out with the docstring and CLI help message. In addition, the error message isn't accurate

    if starter_alias in starters_dict:
        if directory:
            raise KedroCliError(
                "Cannot use the --directory flag with a --starter alias."
            )

This is very confusing because to do 2. you need to use both starter and directory, but the error message says the opposite.

i.e. kedro new --starter git+https://github.com/kedro-org/kedro-starters.git --directory databricks-iris --checkout feat/modify-pyspark-iris-databricks-packaged-deployment (This works)

The help message have some information about --starter flag can be provided as a git URL

The help message actually provide more accurate information.

 -s, --starter TEXT  Specify the starter template to use when creating the
                      project. This can be the path to a local directory, a
                      URL to a remote VCS repository supported by
                      `cookiecutter` or one of the aliases listed in ``kedro
                      starter list``.

Action

  • Improve the docstring or error message or both, add example to make it easier to discover the feature.
@merelcht merelcht changed the title Improve the error message & docstring of kedro new starter Improve the error message & docstring of kedro new for custom starters Jun 5, 2023
@merelcht merelcht added the Component: Documentation 📄 Issue/PR for markdown and API documentation label Jun 5, 2023
@astrojuanlu astrojuanlu added the good first issue Good first issues for beginners label Oct 6, 2023
@MinuraPunchihewa
Copy link
Contributor

Hey @astrojuanlu, @merelcht,
I would like to take this up!

@astrojuanlu
Copy link
Member

Hi @MinuraPunchihewa , thanks for stepping in! @AhdraMeraliQB does this somehow conflict with the new add-ons flow?

@AhdraMeraliQB
Copy link
Contributor

CC: @noklam

This is very confusing because to do 2. you need to use both starter and directory, but the error message says the opposite.

The error message results if an official Kedro starter-alias is used with --directory, hence why using a git url works. Perhaps the issue here is that the error message "Cannot use the --directory flag with a --starter alias." is not clear enough?

Option: "Cannot use the --directory flag with a Kedro starter alias."

I agree that this should be visibly documented, an addition should be made to https://docs.kedro.org/en/stable/starters/starters.html, but I'm unsure the error message itself needs to be modified

@doxenix
Copy link
Contributor

doxenix commented Apr 2, 2024

PR is ready: #3771
I only updated docs and add more examples.
I agree with @AhdraMeraliQB that error message itself dosen't needs to be modified

doxenix added a commit to doxenix/kedro that referenced this issue Apr 3, 2024
doxenix added a commit to doxenix/kedro that referenced this issue Apr 3, 2024
doxenix added a commit to doxenix/kedro that referenced this issue Apr 3, 2024
doxenix added a commit to doxenix/kedro that referenced this issue Apr 4, 2024
doxenix added a commit to doxenix/kedro that referenced this issue Apr 4, 2024
doxenix added a commit to doxenix/kedro that referenced this issue Apr 4, 2024
doxenix added a commit to doxenix/kedro that referenced this issue Apr 4, 2024
merelcht pushed a commit that referenced this issue May 14, 2024
* Improve Documentation for Custom Starters in kedro new (#2618)

Signed-off-by: Dominik Zalewski <[email protected]>
@astrojuanlu
Copy link
Member

This was addressed in #3771!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation 📄 Issue/PR for markdown and API documentation good first issue Good first issues for beginners
Projects
Archived in project
Development

No branches or pull requests

7 participants