Is there a way to point kedro new to a starter in ...
# questions
w
Is there a way to point kedro new to a starter in GitHub without adding a
plugin.py
file and modifiying
pyproject.toml
? It feels to me that the extra configuration needed kind of defeats the point of allowing GitHub starters 🤔
d
kedro new --starter git+<https://github.com/kedro-org/kedro-starters.git> --directory spaceflights-pandas
https://docs.kedro.org/en/stable/starters/starters.html#how-to-use-a-starter Does this help?
thankyou 1
👍 1
But I think I overlooked something 😅
You can add an alias by creating a plugin using
kedro.starters
entry point which enables you to call
kedro new --starter=your_starters
. That is, it can be used directly through the
starter
argument in
kedro new
rather than needing to explicitly provide the
template
and
directory
arguments.
So the
plugin.py
file is not really necessary?
d
I'd have to look into this, since I'm not actually familiar with this functionality. But, if you want a 90% confident answer:
So the
plugin.py
file is not really necessary?
No, not necessary, unless you want to be able to use the starter by alias name.
It feels to me that the extra configuration needed kind of defeats the point of allowing GitHub starters 🤔
I'm actually not sure about this part, why you'd want to create an alias. 😅 Maybe somebody who's familiar with this can explain. Let me ping the team.
👍 1
w
Probably I’m just confused - the alias part is not important to me. It seems you are right and I just needed to RTFM 😅 thank you!
d
I'm actually not sure about this part, why you'd want to create an alias. 😅 Maybe somebody who's familiar with this can explain. Let me ping the team.
Actually, just thinking a bit more, I'm 95% sure this is intended for plugin authors who want to distribute starters this way. But will confirm!
👍 1
y
Yes it's exactly what deepyaman says. I introduced this feature because in my org we can't download starters from the internet, and we have a couple of internal ones. It was hard for users to remember the exact address of the git repo, and we wanted to make transition smooth across our different versions (just install the new version of the plugin which is up to date).
👍 1
Obviously the plugin way is the only way to distribute such aliases because it must happen before kedro new is executed
j
TIL that one can distribute starters as Python packages using entry points! 💡
❤️ 2
d
TIL that one can distribute starters as Python packages using entry points!
we should document this!
y
That's the link above ;) but maybe we should make it a bit clearer
I've found it very useful in enterprise context with internal mirrors but not direct internet access!