Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add addon flags to kedro new (#3081)
* Update prompts.yml Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> * Update starters.py Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> * add post_gen_project in cookiecutter hooks Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> * add confirmation message for the options selected Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> * Update post_gen_project.py Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> * changes based on review Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> * Lint Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Remove documentation requirements Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Remove testing requirements Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Remove leftover linting requirements Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Lint Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add add-on requirements when an addon is selected Signed-off-by: lrcouto <laurarccouto@gmail.com> * Correct file path Signed-off-by: lrcouto <laurarccouto@gmail.com> * Update tests with new default template files number Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Update tests with add-ons argument Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Make lint Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Lint Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Make tests use all add-ons by default Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Make unit tests use no add-ons by default Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add installing project dependencies to e2e tests Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add linting requirements, organize code Signed-off-by: lrcouto <laurarccouto@gmail.com> * Refactor test for all add on options Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add test to check parsing add-ons Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add scaffolding for add-ons tests Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Change name of test class Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Correct test names Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Correct tests directory Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Clean up success message Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Fix logging option Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Update lint add-on logic Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Ensure add-ons message only shows when add-ons are configurable Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add requirement checks to tests Signed-off-by: lrcouto <laurarccouto@gmail.com> * Refactor unit tests Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add validation to add ons in config file Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Refactor add-ons flow script Signed-off-by: lrcouto <laurarccouto@gmail.com> * Pass through correct repo name in test Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Clean up and clarify text Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Wrap hook script inside main function Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Revert displayed default Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add range validation Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add tests for add-on range validation Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Apply suggestions from code review Co-authored-by: Merel Theisen <49397448+merelcht@users.noreply.github.com> * Update kedro/templates/project/hooks/utils.py Co-authored-by: Merel Theisen <49397448+merelcht@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Remove traceback from add-on validation - review suggestion Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Output add-on names when selected (via CLI) Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Revert 47d935e and fix tests Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Fix test errors Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Try remove validation Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add validation back Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add config file input validation Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add /site-packages/ to coverage report omit Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Lint Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Remove duplicate error message Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Lint Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> * Add new flag and help string Signed-off-by: lrcouto <laurarccouto@gmail.com> * Parse addon list from CLI input Signed-off-by: lrcouto <laurarccouto@gmail.com> * Overwrite addons from prompts with addons from flag Signed-off-by: lrcouto <laurarccouto@gmail.com> * Remove addons prompt when addons flag is present Signed-off-by: lrcouto <laurarccouto@gmail.com> * Use helper function to add addons to config Signed-off-by: lrcouto <laurarccouto@gmail.com> * Update test to accomodate for new flag Signed-off-by: lrcouto <laurarccouto@gmail.com> * Add new tests for kedro new Signed-off-by: lrcouto <laurarccouto@gmail.com> * Fix incorrect docs link Signed-off-by: lrcouto <laurarccouto@gmail.com> * Fix another incorrect docs link Signed-off-by: lrcouto <laurarccouto@gmail.com> * Changes to --addons help string Signed-off-by: lrcouto <laurarccouto@gmail.com> * Fix merge conflics Signed-off-by: lrcouto <laurarccouto@gmail.com> * Lint Signed-off-by: lrcouto <laurarccouto@gmail.com> * Fix formatting on --help string Signed-off-by: lrcouto <laurarccouto@gmail.com> * Change Addons from CLI test to use correct arguments Signed-off-by: lrcouto <laurarccouto@gmail.com> * Convert addon input strings to number Signed-off-by: lrcouto <laurarccouto@gmail.com> * Fix tests for addon flags Signed-off-by: lrcouto <laurarccouto@gmail.com> * Lint Signed-off-by: lrcouto <laurarccouto@gmail.com> * Clean up project on addons CLI test Signed-off-by: lrcouto <laurarccouto@gmail.com> * Change error message on invalid addon input Signed-off-by: lrcouto <laurarccouto@gmail.com> * Make addon CLI test more specific Signed-off-by: lrcouto <laurarccouto@gmail.com> * Clean up prompt display function Signed-off-by: lrcouto <laurarccouto@gmail.com> * Handle whitespaces and invalid cases Signed-off-by: lrcouto <laurarccouto@gmail.com> * Add --addons flag to release notes Signed-off-by: lrcouto <laurarccouto@gmail.com> --------- Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> Signed-off-by: Ahdra Merali <ahdra.merali@quantumblack.com> Signed-off-by: lrcouto <laurarccouto@gmail.com> Signed-off-by: L. R. Couto <57910428+lrcouto@users.noreply.github.com> Co-authored-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> Co-authored-by: Ahdra Merali <ahdra.merali@quantumblack.com> Co-authored-by: Ahdra Merali <90615669+AhdraMeraliQB@users.noreply.github.com> Co-authored-by: Merel Theisen <49397448+merelcht@users.noreply.github.com>
- Loading branch information