pixelpassion / django-saas-boilerplate

A Django + django-rest-framework + Heroku + SaaS application boilerplate
MIT License
51 stars 10 forks source link

Move from Pipenv to Poetry #58

Open jensneuhaus opened 4 years ago

jensneuhaus commented 4 years ago

☝️What is it? Why do we need it?

Right now, Pipenv is not as reliable and we should switch to Poetry

💭 Implementation details

📋 Todos

jensneuhaus commented 4 years ago

Hey @itisallgood (cc @AntonDnepr)

what do you think would be the best practice to deal with Poetry, if Heroku does not support the lock-file out of the box?

Can you investigate this please, @itisallgood ? Any ideas on this, @AntonDnepr ?

jensneuhaus commented 4 years ago

As addition: It seems not to be in the buildpack yet: https://github.com/heroku/heroku-buildpack-python/issues/796

AntonDnepr commented 4 years ago

@jensneuhaus https://python-poetry.org/docs/cli/#export

We can export poetry into requirements.txt. The only question is where we do this. One possible place: pre-commit hooks, though we will need to detect if there is difference between committed requirements.txt and one that was generated by the command. There is custom buildpack for poetry: https://github.com/moneymeets/python-poetry-buildpack And yeah, we can search for circleci approach: add test that checks the content of requirements.txt and poetry newly generated requirements.txt. And fail build if they differ.