dreamproit / billtitleindex

Create an index of U.S. bill titles
Other
0 stars 3 forks source link

Start using poetry to manage dependencies #15

Open alexbojko opened 2 years ago

alexbojko commented 2 years ago

Objective

Start using poetry to manage dependencies https://python-poetry.org/

Advantages:

The main purpose of using poetry is to keep requirements consistent because it's a pretty common issue when you are installing requirements using pip install -r requirements.txt but some of listed there packages have the same dependencies but with different versions. I've faced such issues many times and they are really painful especially when some part of functionality works as expected but other just raises an exception.

But poetry handles it like a charm and helps to prevent such situations even before you tried to rebuild container image (usually it will highlight the issue once you're adding new dependency)

What poetry does: it collects all requirements in one place for all dependencies and then tries to align all versions to make them consistent (if possible, otherwise raises an exception).

Disadvantages

Version checking process takes some time (1-2-3 mins or so) but I think we shouldn't care about it, because it executes only when you add new dependency.