Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update altcointip for newer dependencies and general bug fixes #47

Merged
merged 9 commits into from Jan 31, 2018

Conversation

GoldenChrysus
Copy link
Contributor

@GoldenChrysus GoldenChrysus commented Dec 18, 2017

altcointip is not functional in its current state when using latest packages. For example, many of the PRAW functions such as "get_unread" do not exist.

This change does the following:

  • Updates PRAW calls as of the latest 5.4.0 docs.
    • This involves changing the authentication to OAuth using reddit apps.
  • Removes procedural loops from cointipbot.py and puts them in main.py
    • This resolves issues when attempting to run _update_stats.py or other scripts wherein the entire bot would be launched due to the loops that were at the bottom of cointipbot.py.
    • Without this change, there are indentation issues (mixed tabs and spaces) in the existing block added by Fix crash when PRAW times out. #45 which causes the build to fail.
    • Still maintains functionality wherein the bot will restart upon crashing or exiting.
  • Updates _start.sh to now call the new class Main from the main.py file.
  • Adds coinmarketcap to the sample config exchanges.
    • Updates refresh_ev(), get_ticker_value(), and rates() logic to support the URL structure required by CoinMarketCap.
    • Not inherently a mandatory change, but it was needed for my implementation of Digibyte, and since CMC has nearly every coin with accurate pricing, the option may be useful to others.
  • Updates refresh_ev() to properly set the fiat value of each altcoin.
    • Previously, tip fiat values were reporting as $0.0000 since the confirmation template relies on the fiat value of the coin being present.
  • Corrects various stats queries that were failing due to incorrect grouping.
  • Ensures opened config files in CointipBot's __init__ are closed after parsing.
    • Otherwise leads to a bug where restarting the bot multiple times will eventually output a "too many open files" error.

@GoldenChrysus GoldenChrysus changed the title Update altcointip for newer dependencies Update altcointip for newer dependencies and general bug fixes Dec 18, 2017
@vindimy
Copy link
Owner

vindimy commented Jan 5, 2018

Thanks a lot for the effort to refresh the code to latest dependencies. I'll review and merge this in a bit.

@GoldenChrysus
Copy link
Contributor Author

Thanks! Let me know if you have any questions. Re: the large comment I added in /src/main.py, I was able to resolve the mentioned pifkoin bug in pifkoin pull 1. However, I was not sure if I should leave the comment as-is and let people decide if they want to uncomment the code, as people with older local copies of pifkoin would run into issues if they did not update their copy to include my pull.

@vindimy vindimy merged commit 83c9fac into vindimy:master Jan 31, 2018
@vindimy
Copy link
Owner

vindimy commented Jan 31, 2018

@GoldenChrysus I agree with your approach (leaving large comment as-is for informational purposes). Once again thanks for the effort to refresh this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants