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.
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 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.
Amazing, thank you! ๐
@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.
@921kiyo is currently making this change for our next release! Stay tuned ๐
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.
Thanks @921kiyo @yetudada @lorenabalan for handling this so well ๐
Most helpful comment
@921kiyo is currently making this change for our next release! Stay tuned ๐