Open yakimka opened 1 month ago
Unless I'm missing something, you'd have to render the cookiecutter first into an actual valid project using cookiecutter
e.g. uvx cookiecutter gh:audreyfeldroy/cookiecutter-pypackage
or in your case, something like uvx cookiecutter gh:yakimka/cookiecutter-pyproject
Or are you asking to allow uv to process (not validating) expressions like {{ cookiecutter.project_name }}
and {% if cookiecutter.fastapi_support.startswith("y") %}
?
What would the project name be in such case?
@samypr100
you'd have to render the cookiecutter first into an actual valid project using
If I want to create a new project from the cookiecutter template, then yes, I need to render it first.
But for managing and updating dependencies of the template itself, I don't need to, and now it is working perfectly with Poetry. I can just navigate to cookiecutter-pyproject/{{cookiecutter.project_name}}
, run poetry install
, poetry update
, or poetry add some-package
, and it works perfectly fine because the pyproject.toml
in my template is valid. For managing dependencies, Poetry doesn't need to validate the project name or load setup.cfg
.
I have a Cookiecutter project template that I am trying to migrate from using Poetry to
uv
. However, I encountered an issue with the strictuv
validation ofpyproject.toml
.Poetry is able to read this pyproject.toml, handle dependencies, upgrade, etc. However, when I try to run the
uv
command, I get an error related to reading the config:Even when I replace
{{ cookiecutter.project_name }}
with a valid project name, I encounter an error while readingsetup.cfg
:Additionally, because of these errors, GitHub's Dependabot cannot process this
pyproject.toml
file.Would it be possible for
uv
to implement a--no-validation
flag that disables validation, allowinguv
to be used with Cookiecutter templates?