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

Added Total Stardust to UpdateLiveStats task #5874

Merged
merged 3 commits into from
Jan 17, 2017
Merged

Added Total Stardust to UpdateLiveStats task #5874

merged 3 commits into from
Jan 17, 2017

Conversation

pogarek
Copy link
Contributor

@pogarek pogarek commented Jan 14, 2017

Now you can have Total Stardust if UpdateLiveStats task is enabled. Just add "total_stardust" to stats property in task configuration in your configuration file.

@mention-bot
Copy link

@pogarek, thanks for your PR! By analyzing the history of the files in this pull request, we identified @AdaptCharm, @Moonlight-Angel and @brantje to be potential reviewers.

@pogarek
Copy link
Contributor Author

pogarek commented Jan 14, 2017

I don't how to fix line 30 in tests/update_live_stats_test.py to pass the test..
I'm just quite new to python..

@nelsyeung
Copy link
Contributor

nelsyeung commented Jan 17, 2017

I've created a fix for the test for you, you can check it out at my fork of your fork. I will let you edit your own fork so you can understand exactly what happened. However, if you want I can just submit a pull request to your fork.

Summary of changes

pokemongo_bot/cell_workers/update_live_stats.py

# From
total_stardust = int(self.bot.stardust)
# to
total_stardust = int(metrics.stardust)

tests/update_live_stats_test.py

line 17:

# added
'total_stardust'
# to config['stats'] list.

line 187 and 188:

# added
'Total Stardust: 1'
# to expected.

@pogarek
Copy link
Contributor Author

pogarek commented Jan 17, 2017

thanks, @nelsyeung ! So using metrics class was the way to go :) Changes are commited now, thanks a lot!!

@brantje
Copy link
Contributor

brantje commented Jan 17, 2017

I don't play anymore so can't test

@solderzzc solderzzc changed the base branch from dev to master January 17, 2017 18:30
@solderzzc
Copy link
Contributor

@brantje lol, I don't have a usable hash key, so I can only review and merge w/o testing..

@solderzzc
Copy link
Contributor

solderzzc commented Jan 17, 2017

👍

Approved with PullApprove

@solderzzc solderzzc merged commit efda870 into PokemonGoF:master Jan 17, 2017
@pogarek pogarek deleted the totalstardust branch January 18, 2017 06:04
BreezeRo pushed a commit that referenced this pull request Jan 27, 2017
* Added Total Stardust to UpdateLiveStats task (#5874)

* added Total Stardust to UpdateLiveStats task

* fixes to tests, thanks to @nelsyeung

* enabled option to log to file (#5881)

* Fixes #5883 (#5884)

This fixes an issue when you have a brand new account (no stardust yet)
and run the bot. This makes sure the key is there before we do something
with it.

* removing proto and protobuf and changing pogoapi to dev

* removing proto and protobuf, changing pogoapi to dev branch, fixing docs and install scripts
solderzzc pushed a commit that referenced this pull request Jan 30, 2017
* Proto requirements fix (#5888)

* Added Total Stardust to UpdateLiveStats task (#5874)

* added Total Stardust to UpdateLiveStats task

* fixes to tests, thanks to @nelsyeung

* enabled option to log to file (#5881)

* Fixes #5883 (#5884)

This fixes an issue when you have a brand new account (no stardust yet)
and run the bot. This makes sure the key is there before we do something
with it.

* removing proto and protobuf and changing pogoapi to dev

* removing proto and protobuf, changing pogoapi to dev branch, fixing docs and install scripts

* Prevent bouncing between 2 forts

Added simple logic to prevent bouncing between 2 forts when using Polyline walker

* Original fixes by Anakin5

Original PR by Anakin5 which fixes the following:
#5407
Fix step walker timing issue. This solve some problems where we were moving more than the configured speed from time to time.
Improve a bit the computation speed of step_walker get_next_step
pep8 fixes

* Prevent bouncing between 2 forts

Added simple logic to prevent bouncing between 2 forts when using Polyline walker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants