Juan Luis
02/20/2023, 10:36 AMkedro new
in non-interactive ways so it's compatible with Jupyter shell commands (!kedro new ...
). I see two ways:
• yes "Project Name" | kedro new --starter=xxx
: works, but it's UNIX-only (don't think this will work on Windows), assumes there is only one question, and looks a bit arcane.
• `vim kedro.yaml ... && kedro new --starter=xxx --config=kedro.yaml`: works, but I'm creating a file that I will only use once, plus it's not very easy to discover what structure should the file have (one has to navigate to the source code of the starter in question, locate the prompts.yml
, and mimic those keys)
I see that this has been unchanged since basically "forever" but I'm wondering what are folks opinions on having a way to pass these configs to the CLI? something like kedro new --starter=xxx --project_name=yyy
datajoely
02/20/2023, 11:54 AMkedro new --starter=xxx --config=kedro.yaml
Antony Milne
02/20/2023, 3:24 PMconfig-file
option was created to support this CI use case but I imagine it’s not used much at all
2. yes
works for answering multiple questions (since it can respond to multiple prompts, and you can always just press enter in kedro new
to use the defaults). Agreed that it’s rather arcane and doesn’t work on Windows, but if you’re doing something on CI then doing this programmatically or using a config file is not such a weird thing to do (similarly for just creating the .telemetry
file)
Would passing flags directly through kedro new
be better? I think maybe. On the one hand, it would be a nice simplification for the cases that a kedro starter just requires project_name
(which at the moment I think is all of them? And probably 99% of any ones that people have made outside kedro too tbh). And then we could also add the telemetry flag in there too.
But I don’t think it would work well with the full generality of kedro starters that might have multiple fields you need to enter (how do you document and pass through arbitrary fields from click?).
More generally I think we should reconsider the new project flow (like kedro starters list
is disjoint from kedro new
) and try and delegate as much to cookiecutter as possible (see https://github.com/kedro-org/kedro/issues/1692).Antony Milne
02/20/2023, 3:35 PMJuan Luis
02/20/2023, 3:40 PMdatajoely
02/20/2023, 4:02 PMJuan Luis
02/28/2023, 11:22 AMcookiecutter --no-input gh:msabramo/cookiecutter-supervisor program_name=foobar startsecs=10
(from the docs)