Join the Kedro community

Updated 2 weeks ago

Question on Project Setup

Question on project setup.

My workflow usually looks like:

mkdir new-project
cd new-project
uv venv --python 3.xx
source .venv/bin/activate
uv pip install kedro
kedro new --name new-project 
Then my directories look like:
new-project/
    .venv/
    new-project/
        ... kedro stuff ...
but really i wanted the <i>current</i> directory to be my kedro project (at the level where .venv is)
Is there a good way to do this?

of course I could just create the venv a directory up, like so:
new-project/
    ... kedro stuff ...
.venv/
but I was things all in the same directory without having to move all the kedro project files one directory up

J
I
2 comments

yeah, kedro new is sadly famous for creating yet another directory, because it relies on cookiecutter under the hood...

long standing discussion https://github.com/kedro-org/kedro/discussions/4274

one possible solution is to install kedro globally (with uvx or pip-tools ) and use that to run kedro new :

uv tool install kedro  # this will be global
uvx kedro new --name new-project && cd new-project
uv venv --python 3.xx
uv pip install kedro  # this will install Kedro only for this venv

another possible workaround is to use my kedro-init package, that does a very minimal scaffolding but in return works in the current directory https://github.com/astrojuanlu/kedro-init

I knew I couldn't be the only one!
Thanks for the quick response
I'll just keep moving things up one directory, no big deal 😁

Add a reply
Sign up and join the conversation on Slack