danparizher / Pax-Academia

General purpose utility bot for the Homework Help Discord server
MIT License
13 stars 5 forks source link

Use piptools #254

Closed danparizher closed 10 months ago

danparizher commented 10 months ago

We can use pip-tools to use commands like pip-sync and pip-compile. Basically, we would have a new file called requirements.in which would house the packages we would normally have in requirements.txt. After compiling it, it will autogenerate all nested dependencies to requirements.txt, which pip-sync can then read and sync with your environment.

sebastiaan-daniels commented 10 months ago

I do not really see the use in this? You can just pip install -r and you're ready to go?

danparizher commented 10 months ago

I do not really see the use in this? You can just pip install -r and you're ready to go?

If a package is removed from the requirements file, it will not be removed from your venv. Piptools fixes that issue by syncing your venv exactly with what is needed in your environment

sebastiaan-daniels commented 10 months ago

I do not really see the use in this? You can just pip install -r and you're ready to go?

If a package is removed from the requirements file, it will not be removed from your venv. Piptools fixes that issue by syncing your venv exactly with what is needed in your environment

Do I need to use this? Or can I just do it the normal way if I prefer to?

danparizher commented 10 months ago

No you don't have to, you can use pip install -r requirements.txt like you always have. It just helps with granularity. It shouldn't really affect anyone's workflow