bookwyrm-social / bookwyrm

Social reading and reviewing, decentralized with ActivityPub
http://joinbookwyrm.com/
Other
2.22k stars 259 forks source link

Using Poetry for dependency management #793

Open SavinaRoja opened 3 years ago

SavinaRoja commented 3 years ago

Would this project benefit from using Poetry for dependency management?

I opened an experimental branch here for a transition to Poetry: https://github.com/SavinaRoja/bookwyrm/tree/poetry-dependency-management

Feel free to peruse/discuss/reject/etc.

Possible benefits:

Possible pain:

https://packaging.python.org/tutorials/managing-dependencies/

mouse-reeve commented 3 years ago

Interesting! I'm not categorically against this, but I want to get a clearer understanding of the benefit and how this works, so I'll poke around and learn a bit more. Thank you!

SavinaRoja commented 3 years ago

I probably should have provided these links at the start:

https://python-poetry.org/

https://python-poetry.org/docs/

Feel free to ask any questions. I have a bit of experience with using it production and deployment.

Flameborn commented 3 years ago

I think in this instance the advantages outweigh the disadvantages, at least for local environments. To me, for example, this would be super useful, as I am running an instance outside Docker, so this is like Bookwyrm in a box without Docker.

If developing on machines with less resources, for example on a Raspberry Pi, Poetry could also save a lot of time, as re-building an image would not be necessary.

Inside a Docker image, Poetry would not add much overhead, as there's no need to activate a Python environment, so the commands should be mostly the same.

+1 from me, thanks @SavinaRoja for taking the time to create a test branch ☺️

mouse-reeve commented 3 years ago

@SavinaRoja I'd be receptive to a pull request for this!