GLAM-Workbench / glam-workbench.github.io

https://glam-workbench.github.io/
25 stars 6 forks source link

Use pip-tools to manage requirements.txt #48

Closed wragge closed 10 months ago

wragge commented 2 years ago

I currently have a script to create requirements.txt and requirements-unpinned.txt files. A better approach would be to create a requirements.in file (using my unpinned file as a basis), then generate requirements.txt using pip-compile: https://github.com/jazzband/pip-tools/

This should help avoid pip problems and make it easier to keep things up to date.

wragge commented 2 years ago

Probably also need a dev-requirements.in.

Compile with pip-compile requirements.in this generates requirements.txt

Then pip-sync requirements.txt dev-requirements.txt to update current environment

Leave the dev files out of version control

wragge commented 2 years ago

To avoid conflicts between main and dev requirements you can add -c requirements.txt to the top of requirements-dev.in