RWTH-EBC / FiLiP

FIWARE Library for Python (FiLiP) to work with FIWARE API
BSD 3-Clause "New" or "Revised" License
23 stars 13 forks source link

Dependencies single source of truth #291

Closed sbanoeon closed 2 months ago

sbanoeon commented 2 months ago

Is your feature request related to a problem? Please describe. It has happened many times that if a version of library has to be updated then it is only update in requirements.txt file and not in setup.py file or vice versa. Therefore, it would be better to have a single source where the version of dependencies must be maintained.

Describe the solution you'd like Use pip-compile from pip-tools to generate requirements.txt file locally for development from setup.py file and put requirements.txt file in .gitignore. In this way only setup.py needs to be maintained.

For local development, do: python -m pip install pip-tools pip-compile -o requirements.txt setup.py

This will create requirements.txt file with all the dependencies from setup.py. You can then easily run: pip install -r requirements.txt

Describe alternatives you've considered An alternate which was considered was to have . in requirements.txt file and maintain setup.py. This way when you do pip install -r requirements.txt it installs all the packages in the virtual environment, but this also install filip as a package.

Additional context