JosephLai241 / URS

Universal Reddit Scraper - A comprehensive Reddit scraping/archival command-line tool.
https://josephlai241.github.io/URS/
MIT License
780 stars 105 forks source link

Deprecating `Credentials.py` in favor of `.env` #26

Closed JosephLai241 closed 3 years ago

JosephLai241 commented 3 years ago

Overview

Summary

Credentials.py has been deprecated. API credentials are now stored in the .env file. This is another pull request containing changes that will be included in v3.2.1.

Motivation/Context

I have been procrastinating - a refactor for how API credentials are stored is yet another overdue item on the list. I believe it is bad practice to store sensitive information directly in the source code. I took a page out of Flask's design and created the new .env file so that any kind of integration into scripts would not require the user's credentials to be directly exposed.

Additionally, I should now be able to write more thorough continuous integration tests. With previous iterations, I would have had to hardcode my personal credentials into Credentials.py and send the code over to Travis CI, but now I will be able to set encrypted environment variables and keep my credentials private. These new tests are not included in this pull request - I will create a new one in the future once I complete research on setting the variables and when I finalize the tests.

New Dependencies

python-dotenv==0.15.0

Issue Fix or Enhancement Request

N/A

Type of Change

Breaking Change

N/A

List All Changes That Have Been Made

Added

Changed

Deprecated

How Has This Been Tested?

Test Configuration

Dependencies

astroid==2.5.1
attrs==20.3.0
certifi==2020.12.5
chardet==4.0.0
colorama==0.4.4
coverage==5.5
cycler==0.10.0
halo==0.0.31
idna==2.10
iniconfig==1.1.1
isort==5.8.0
kiwisolver==1.3.1
lazy-object-proxy==1.5.2
log-symbols==0.0.14
matplotlib==3.3.4
mccabe==0.6.1
more-itertools==8.7.0
numpy==1.20.1
packaging==20.9
Pillow==8.1.2
pluggy==0.13.1
praw==7.2.0
prawcore==2.0.0
prettytable==2.1.0
py==1.10.0
pylint==2.7.2
pyparsing==2.4.7
pytest==6.2.2
pytest-cov==2.11.1
python-dateutil==2.8.1
python-dotenv==0.15.0
requests==2.25.1
six==1.15.0
spinners==0.0.24
termcolor==1.1.0
toml==0.10.2
update-checker==0.18.0
urllib3==1.26.4
wcwidth==0.2.5
websocket-client==0.58.0
wordcloud==1.8.1
wrapt==1.12.1

Checklist