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

[KED-987] Current kedro_cli behaviour should be in main kedro package #314

Closed
seeM opened this issue Apr 5, 2020 · 6 comments
Closed

[KED-987] Current kedro_cli behaviour should be in main kedro package #314

seeM opened this issue Apr 5, 2020 · 6 comments
Labels
Issue: Bug Report 🐞 Bug that needs to be fixed

Comments

@seeM
Copy link

seeM commented Apr 5, 2020

Description

The current auto-generated kedro_cli.py should be mostly internal to the kedro package, and thinly wrapped in the project's kedro_cli.py, for example, an import and a function call.

Context

One of the main purposes of a framework is to reduce duplication and boilerplate. The kedro_cli.py files are ~600 lines of code that don't really have anything to do with project-specific behaviour – they are essentially boilerplate.

Django has a similar setup with its manage.py importing and calling the execute_from_command_line function.

@seeM seeM added the Issue: Bug Report 🐞 Bug that needs to be fixed label Apr 5, 2020
@921kiyo 921kiyo changed the title Current kedro_cli behaviour should be in main kedro package [KED-987] Current kedro_cli behaviour should be in main kedro package Apr 6, 2020
@921kiyo
Copy link
Contributor

921kiyo commented Apr 6, 2020

@seeM Thank you for raising this! We have a ticket to do this actually, but haven't had a chance to implement it yet. We will let you know once the clean-up in kedro-cli.py is done.

@seeM
Copy link
Author

seeM commented Apr 6, 2020

Amazing, thank you! 😄

@WaylonWalker
Copy link
Contributor

@seeM I completely agree. I have gone as far as removing the cli completely from our project template to make it easier to keep them up to date. If I remember right it was pretty much copying the existing cli into a library, then importing cli inside each project. This reduced it from ~600 lines to about 3, and if a project still wants to add a special cli command they are welcome to as the cli object is right there to add onto. Now I have only one cli to keep up to date rather than dozens.

@yetudada
Copy link
Contributor

@921kiyo is currently making this change for our next release! Stay tuned 😄

@lorenabalan
Copy link
Contributor

lorenabalan commented May 27, 2020

The new kedro versions (0.16.*) have a lot of the CLI functionality moved to the library side. We left only functionality related to kedro run, as that tends to be the command that users customise most, and it's easier to have it in there handy rather than look for the source code and copy-paste some snippets if necessary.
We'll continue to look at the kedro run CLI UX as part of our roadmap, and we welcome feedback on that topic. 😊 Meanwhile I'll close this issue as resolved.

@seeM
Copy link
Author

seeM commented May 27, 2020

Thanks @921kiyo @yetudada @lorenabalan for handling this so well 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Bug Report 🐞 Bug that needs to be fixed
Projects
None yet
Development

No branches or pull requests

5 participants