Ian Whalen
11/08/2024, 3:11 PMmkdir 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 current 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 upHall
11/08/2024, 3:11 PMJuan Luis
11/08/2024, 3:17 PMkedro 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-initIan Whalen
11/08/2024, 3:19 PM