divanov11 / mumbleapi

Backend/API for the Mumble.dev, an open source social media application.
Apache License 2.0
199 stars 122 forks source link

Setup pip-tools to manage dependencies #144

Open M-krishna opened 3 years ago

M-krishna commented 3 years ago

Problem

Solution

Package

https://pypi.org/project/pip-tools/

PraveenMalethia commented 3 years ago

What do that "break down dev and prod dependencies mean exactly" ?

M-krishna commented 3 years ago

What do that "break down dev and prod dependencies mean exactly" ?

Imagine you have dependencies that is only used for development purposes and not exactly for production. Let's take package.json for example, there contains both dependencies and dev-dependencies separately.

PraveenMalethia commented 3 years ago

all of the dependencies in Django are used for dev and production I guess! can you define which dependencies are used for dev and prod in this project?

M-krishna commented 3 years ago

I don't exactly know what dependencies are used for dev and prod in this project. But for eg. take django-debug-toolbar package, this is not currently added in this project. This package is only used for dev purpose and not on the prod side. So this can package must be added on the dev-dependencies.

Likewise all the packages can be split.

PraveenMalethia commented 3 years ago

Heroku requires requirements.txt to grab all dependencies for build process and then run app .

M-krishna commented 3 years ago

pip-compile will automatically generate the .txt file. The thing is that we won't be editing the .txt file directly. We'll edit the requirements.in file and run pip-compile which will then spit out the requirements.txt file.

Then the requirements.txt file can be used by Heroku.