switch to uv has removed requirements folder from generated project #6272
-
|
Before I open a bug, is this expected behaviour? I just ran cookiecutter to create a new project and the generated folder structure has no requirements folder, despite it still existing in the github codebase. I understand that uv is now being used instead of pip, or whatever preceded uv, and that requirements are listed in pyproject.toml, but I am surprised to see that the requirements folder has been removed, as it is far clearer what each file does ie requirements/base.txt or requirements/local.txt and uv can be configured to read in requirements from requirements files, I think. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
|
I also notice that despite setting github as my Source Code manager in options when generating that the project hasn't been added to a git repo inside the generated folder, so no .git folder. .gitignore exists, so perhaps this is the default, I can't recall. |
Beta Was this translation helpful? Give feedback.
-
|
Correct, the requirements folder is no longer used in the generated project since we moved to uv: #6139 The only reason these files are in the template is to let us keep our dependencies up to date, as Dependabot doesn't support updating a templated pyproject.toml and AFAIK PyUP does not support pyproject.toml (but supports updating a templated requirements file)
The dependencies and dependency groups which are generated are not specific to uv, they are Python packaging standard defined by PEPs and are supported by a number of other package managers (including pip). The only bit specific to uv is the lock file, but uv has an option to export it to the standardised With all the recent advancements in standardizing, I am far less worried about switching that I've been until now. That's also why we resisted adopting Pipenv or Poetry when they came along. |
Beta Was this translation helpful? Give feedback.
-
|
@browniebroke hi, I note there are no instructions in the help section, yet, regarding uv. I have added some dependencies to the pyproject.toml file and when I build the containers I get the following error message: I am running as docker, but am not sure which of the dockerfiles need to be edited to allow the lock file to be updated, if that is the correct thing to do in this situation. I don't have a virtual environment with uv installed but perhaps that is the correct thing to do in order to update the lock file. |
Beta Was this translation helpful? Give feedback.
Correct, the requirements folder is no longer used in the generated project since we moved to uv: #6139
The only reason these files are in the template is to let us keep our dependencies up to date, as Dependabot doesn't support updating a templated pyproject.toml and AFAIK PyUP does not support pyproject.toml (but supports updating a templated requirements file)
The dependencies and dependency groups which are generated are not specific to uv, they are Python packaging standard defined by PEPs and are supported by a number of other package mana…