Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from Pipenv to Poetry #58

Open
3 tasks done
jensneuhaus opened this issue Mar 11, 2020 · 3 comments
Open
3 tasks done

Move from Pipenv to Poetry #58

jensneuhaus opened this issue Mar 11, 2020 · 3 comments
Assignees
Labels

Comments

@jensneuhaus
Copy link
Contributor

jensneuhaus commented Mar 11, 2020

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

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

💭 Implementation details

📋 Todos

  • Add Poetry and remove Pipfile
  • Have CircleCI work (just like we did with Pipenv, we should use the locked file there!)
  • Have the deployment to Heroku still work (either use the locked file, if they support Poetry // Or have the requirement.txt file generated at CircleCI)
@jensneuhaus
Copy link
Contributor Author

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?

  • generate it locally (this needs to be done by every dev and could be forgotten, add problems)
  • do it at CircleCI and add it to the repository somehow
  • have a Github action which does the job (check if there are Poetry Github actions)
  • Check if there is a Heroku buildpack supporting Poetry

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

@jensneuhaus
Copy link
Contributor Author

As addition: It seems not to be in the buildpack yet: heroku/heroku-buildpack-python#796

@AntonDnepr
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants