MalloyDelacroix / DownloaderForReddit

The Downloader for Reddit is a GUI application with some advanced features to extract and download submitted content from reddit.
GNU General Public License v3.0
506 stars 47 forks source link

What's the preferred requirements.txt style? #41

Closed crccheck closed 6 years ago

crccheck commented 6 years ago

In my local branch, I updated the requirements and things seem to be working. In trying to figure out how to contribute that back, I wasn't sure which style of requirements.txt the project is using to match.

https://github.com/MalloyDelacroix/DownloaderForReddit/blob/master/requirements.txt

  1. List everything -- it looks like it's listing everything because I see prawcore and six, but requests's requirements and some others are missing
  2. Only list the top level requirements -- Then delete deps of deps like prawcore and six
  3. Only list the top level requirements and deps of deps if there's a problem -- I would expect to see comments explaining why something had to be kept back

I've used pip-tools and pipenv and I prefer pip-tools. The current versions I get from that are:

#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile --output-file requirements.txt requirements.in
#
beautifulsoup4==4.6.3
certifi==2018.8.24        # via requests
chardet==3.0.4            # via requests
idna==2.7                 # via requests
imgurpython==1.1.7
praw==6.0.0
prawcore==1.0.0           # via praw
pyqt5-sip==4.19.12        # via pyqt5
pyqt5==5.11.2
python-json-logger==0.1.9
requests==2.19.1
update-checker==0.16      # via praw
urllib3==1.23             # via requests
youtube-dl==2018.8.28
MalloyDelacroix commented 6 years ago

I hadn't given this much thought. My goal was only to get it to where the project could be setup in an environment by running pip install -r requirements.txt, I didn't plan much past that.

I think option 3 should be used going forward.