tezos-reward-distributor-organization / tezos-reward-distributor

Tezos Reward Distributor (TRD): A reward distribution software for tezos bakers.
https://tezos-reward-distributor-organization.github.io/tezos-reward-distributor/
GNU General Public License v3.0
87 stars 50 forks source link

update for new requirements #583

Closed sebuhbitcoin closed 2 years ago

sebuhbitcoin commented 2 years ago

oauthlib-3.2.0 tweepy-4.8.0 transitions-0.8.11 charset-normalizer-2.0.12 requests-2.27.1

updated to newer version


name: Updating Requirements.txt about: This pull request is dedicated to Requirements.txt updates. labels: Package manager updates.


IMPORTANT NOTICE: I read and understood the guidelines for contributions to the TRD. The contribution may qualify for being compensated by the TRD grant if approved by the maintainers.

This PR resolves the issue . The following steps were performed:

After a routine update of TRD, there were some error messages. These messages can be avoided by updating the requirements.txt and adding it as a part of the upgrade procedure.

im doing the best i can with documentation. just doing things fast. i am not a comp/sci major but this is what i got.

Work effort: Give your estimate of the work effort in hours. This might be adjusted or discussed by the other contributors in order to keep a fair rewarding process for the efforts.

if the sebuh can contribute code, than a lot of other bakers should be able to also. I hope by doing a contribution it will motivate other bakers to start working on TRD also.

sebuhbitcoin commented 2 years ago

When I went to upgrade my TRD to latest version today, I pulled the new git and branches, than I shut off my trd script and re ran it.

It gave me an error saying I needed these packages updated.

I added these packages to requirements so that the TRD would check those before starting its run.

Spent 1 hour testing, code, documenting.

Some posts with screenshots available in TRD baking slack section with others comments.

sebuhbitcoin commented 2 years ago

I will test with these changes on my build and report back later.

sebuhbitcoin commented 2 years ago

made changes in requirements.txt, ran pip3 install -r requirements, with these reults.


ubuntu@Payouts:~/tezos-reward-distributor$ pip3 install -r requirements.txt
Requirement already satisfied: requests>=2.27.1 in /home/ubuntu/.local/lib/pytho                                                                                                                                                             n3.8/site-packages (from -r requirements.txt (line 2)) (2.27.1)
Requirement already satisfied: base58>=1.0.2 in /home/ubuntu/.local/lib/python3.                                                                                                                                                             8/site-packages (from -r requirements.txt (line 3)) (2.1.1)
Requirement already satisfied: pyyaml>=5.3.1 in /usr/lib/python3/dist-packages (                                                                                                                                                             from -r requirements.txt (line 4)) (5.3.1)
Requirement already satisfied: fysom>=2.1.6 in /home/ubuntu/.local/lib/python3.8                                                                                                                                                             /site-packages (from -r requirements.txt (line 5)) (2.1.6)
Requirement already satisfied: parse>=1.19.0 in /home/ubuntu/.local/lib/python3.                                                                                                                                                             8/site-packages (from -r requirements.txt (line 6)) (1.19.0)
Requirement already satisfied: transitions>=0.8.11 in /home/ubuntu/.local/lib/py                                                                                                                                                             thon3.8/site-packages (from -r requirements.txt (line 7)) (0.8.11)
Requirement already satisfied: tweepy>=4.8.0 in /home/ubuntu/.local/lib/python3.                                                                                                                                                             8/site-packages (from -r requirements.txt (line 8)) (4.8.0)
Requirement already satisfied: oauthlib>=3.2.0 in /home/ubuntu/.local/lib/python                                                                                                                                                             3.8/site-packages (from -r requirements.txt (line 9)) (3.2.0)
Requirement already satisfied: charset-normalizer>=2.0.12 in /home/ubuntu/.local                                                                                                                                                             /lib/python3.8/site-packages (from -r requirements.txt (line 10)) (2.0.12)
Requirement already satisfied: idna<4,>=2.5; python_version >= "3" in /usr/lib/p                                                                                                                                                             ython3/dist-packages (from requests>=2.27.1->-r requirements.txt (line 2)) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packa                                                                                                                                                             ges (from requests>=2.27.1->-r requirements.txt (line 2)) (2019.11.28)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3/dist-pa                                                                                                                                                             ckages (from requests>=2.27.1->-r requirements.txt (line 2)) (1.25.8)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from trans                                                                                                                                                             itions>=0.8.11->-r requirements.txt (line 7)) (1.14.0)
Requirement already satisfied: requests-oauthlib<2,>=1.2.0 in /home/ubuntu/.loca                                                                                                                                                             l/lib/python3.8/site-packages (from tweepy>=4.8.0->-r requirements.txt (line 8))                                                                                                                                                              (1.3.0)
ubuntu@Payouts:~/tezos-reward-distributor$
sebuhbitcoin commented 2 years ago

read this to manually downgrade some pip packages.

to retry running script start command before upgrading.

sebuhbitcoin commented 2 years ago

for test checked tweepy versions to downgradde at [](https://github.com/tweepy/tweepy/releases)

sebuhbitcoin commented 2 years ago

uninstall tweepy 4.8.0 with

https://www.activestate.com/resources/quick-reads/how-to-uninstall-python-packages/

pip uninstall tweepy

sebuhbitcoin commented 2 years ago
 Testing proved that having this updated **_requirements.txt_** would make sure to have all installed packages required for running TRD.

normal 'update procedure' should be as is

Regularly check and upgrade to the latest available version:

git fetch origin #fetches new branches git status #see the changes git pull pip3 install requirements.txt Stop TRD Script Restart TRD Script

sebuhbitcoin commented 2 years ago

1.5 hours, adding .5 hours for testing / documenting potential revisions for readme.doc

sebuhbitcoin commented 2 years ago

oauthlib>=3.2.0 was added for "Discord Bot" integration.

jdsika commented 2 years ago

Why was tweepy==4.6 not sufficient?

oauthlib-3.2.0 did you get an error that the package was missing? charset-normalizer-2.0.12 did you get an error that the package was missing? requests-2.27.1 did you get an error that the version was not sufficient?

I will change the package installation routine to be more convinient.

jdsika commented 2 years ago

oauthlib-3.2.0 is a dependency of tweepy and is installed along with it - checked it charset-normalizer-2.0.12 is a dependency of tweepy and is installed along with it - checked it

 Testing proved that having this updated **_requirements.txt_** would make sure to have all installed packages required for running TRD.

normal 'update procedure' should be as is

Regularly check and upgrade to the latest available version:

git fetch origin #fetches new branches git status #see the changes git pull pip3 install requirements.txt Stop TRD Script Restart TRD Script

TRD will automatically install the requirements at startup and also update them

jdsika commented 2 years ago

When I went to upgrade my TRD to latest version today, I pulled the new git and branches, than I shut off my trd script and re ran it.

It gave me an error saying I needed these packages updated.

I added these packages to requirements so that the TRD would check those before starting its run.

Spent 1 hour testing, code, documenting.

Some posts with screenshots available in TRD baking slack section with others comments.

What error exaclty? If it tells you "do you want to install XY" it is actually part of the requirements and working as intended. Pleease have a look at this if the installation process works for you now in a more convinient way. Pushing "Y" for every package and restarting 3 times was not very good. Thanks for poinint this out

ericlavoie commented 2 years ago

Why was tweepy==4.6 not sufficient?

oauthlib-3.2.0 did you get an error that the package was missing? charset-normalizer-2.0.12 did you get an error that the package was missing? requests-2.27.1 did you get an error that the version was not sufficient?

I will change the package installation routine to be more convinient.

4.6.0 was sufficient, are there changes that require 4.8?

ericlavoie commented 2 years ago

oauthlib-3.2.0 is a dependency of tweepy and is installed along with it - checked it charset-normalizer-2.0.12 is a dependency of tweepy and is installed along with it - checked it

 Testing proved that having this updated **_requirements.txt_** would make sure to have all installed packages required for running TRD.

normal 'update procedure' should be as is Regularly check and upgrade to the latest available version: git fetch origin #fetches new branches git status #see the changes git pull pip3 install requirements.txt Stop TRD Script Restart TRD Script

TRD will automatically install the requirements at startup and also update them

It does one at a time, should we one a prompt for each module that needs updating, without having to restart TRD

jdsika commented 2 years ago

Look at #581 for bounty. Thank you for the feedback on the requirements installation!

jdsika commented 2 years ago

oauthlib-3.2.0 is a dependency of tweepy and is installed along with it - checked it charset-normalizer-2.0.12 is a dependency of tweepy and is installed along with it - checked it

 Testing proved that having this updated **_requirements.txt_** would make sure to have all installed packages required for running TRD.

normal 'update procedure' should be as is Regularly check and upgrade to the latest available version: git fetch origin #fetches new branches git status #see the changes git pull pip3 install requirements.txt Stop TRD Script Restart TRD Script

TRD will automatically install the requirements at startup and also update them

It does one at a time, should we one a prompt for each module that needs updating, without having to restart TRD

@ericlavoie I have solved it this way here