Closed fmigneault closed 1 year ago
Hi and thanks for creating the issue. In README the very first line says that git python and poetry must be installed.
But let me explain you the main reason why I don't include poetry as a dependency. That's because installing poetry from pip is not preferable method for installation. If people follow the docs and install poetry the way they suggest, installing poetry along with template may cause an issue, when you won't be able to tell which version of poetry is going to be used.
The second problem is versions. Poetry is not an actual dependency. We do not call it programmatically using API, we use it as a command. Like git. That's why I cannot say which version of poetry I must rely on.
That's why I decided not to include poetry in dependencies.
I hope that now you have a clear understanding why I did this exact decision. Maybe it's not clear enough, so I must update README and add additional step before the installation.
I see. I understand the reasoning. Thanks for the explanation.
Maybe it would be worth adding a pre-check that poetry
can be resolved before starting the template creation process and warn the user that this dependency should be installed. I was mostly surprised to see the full menu work all the way until final submission, and fail.
Fair point. Yes, that's a good option. Will add this in the next release.
Released in 4.1.1.
Creating a fresh new conda environment, with only
pip install fastapi_template
, it is possible to go through the whole menu setup steps of the CLI, but on the final step it crashes with the following log:Simply running
pip install poetry
before fixes the problem.The project should probably include
poetry
in its dependencies to automatically install it and avoid this issue, as it unexpectedly causes the user to have to restart the menu step process from scratch.