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

Incubate eggs fix #4881

Merged
merged 10 commits into from
Aug 29, 2016
Merged

Incubate eggs fix #4881

merged 10 commits into from
Aug 29, 2016

Conversation

DeXtroTip
Copy link
Contributor

Short Description:

Fixed a bug when hatching an egg and displaying the eggs at the same time would print wrong output (something like an egg hatching '2.26/2.0 km').
Fixed a bug where breakable incubators weren't being used.
Updated cached inventory after an egg hatched, removing the egg from the inventory and adding it as pokemon.

@mention-bot
Copy link

@DeXtroTip, thanks for your PR! By analyzing the annotation information on this pull request, we identified @mjmadsen, @reddivision and @douglascamata to be potential reviewers

@@ -176,6 +180,9 @@ def _check_inventory(self, lookup_ids=[]):
pokemon.get('individual_stamina', 0)
]})
matched_pokemon.append(pokemon)
#remove as egg and add as pokemon
inventory.pokemons().remove(pokemon['id'])
inventory.pokemons().add(inventory.Pokemon(pokemon))
Copy link
Contributor

@rawgni rawgni Aug 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DeXtroTip it's better for 184 to go inside _apply_incubators (line 99), ie. once you get a reply that you successfully use an incubator on an egg, you remove it from the inventory. what do you think ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about that, because even when incubating, it is still an egg and is in the inventory. It never leaves it, it just switches from egg to actual pokemon.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I Agree with @DeXtroTip. Removing it while being incubated just causes an inventory size mismatch.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like it is going to work like that. It is hard to be entirely sure since this file is a maze.
The _check_inventory should not call the api (at every loop !) so, removing the egg and adding the Pokemon will have to be moved in the _hatch_eggs function one day or another.

Copy link
Contributor

@mjmadsen mjmadsen Aug 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"It seems like it is going to work like that. It is hard to be entirely sure since this file is a maze." I know right?

For the time being, can we move the api call to init and store it in a local variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the egg and adding the Pokemon can easily be done in the _hatch_eggs.
If we remove the api call, the we will need to update the cached inventory with incubators when no uses are left and use distance walked in metrics.

Copy link
Contributor

@julienlavergne julienlavergne Aug 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjmadsen
I don't think so because this function also fetch the km walked on each eggs to know if they have to be hatched. So right now the egg incubator does not work if it does not query the api at every loop.
Ideally, walkers would update km walked somewhere and egg incubator would use that to know when to hatch eggs, or at least when to query api to check. That would require complete rewrite of this task.
What is the phone app doing anyway ? Is it querying the inventory regularly ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It all depends on what the phone app is doing. If it only queries the inventory once, so should we. Otherwise it would be a big red flag for Niantic.

@mjmadsen
Copy link
Contributor

Going to wait for @anakin5 to give his input. But I like it!

@Jasperrr91
Copy link
Contributor

        if self.ready_breakable_incubators:
            # get available eggs
            eggs = self._filter_sort_eggs(self.infinite_incubator,
                    self.infinite_longer_eggs_first)
            self._apply_incubators(eggs, self.ready_infinite_incubators)

Weird that this was ever merged 😛

@mjmadsen
Copy link
Contributor

While we may not have all of our wants in this merge, we fixed one of the problems. Can we settle on that and make a new issue on improvements to this task?

@julienlavergne
Copy link
Contributor

ok for me

@mjmadsen
Copy link
Contributor

mjmadsen commented Aug 29, 2016

👍

Approved with PullApprove

@mjmadsen
Copy link
Contributor

@DeXtroTip Do you agree?

@DeXtroTip
Copy link
Contributor Author

Yes, it's fine for me.

@mjmadsen
Copy link
Contributor

Thanks for the PR :)

@mjmadsen mjmadsen merged commit 3ebabfb into PokemonGoF:dev Aug 29, 2016
@mjmadsen
Copy link
Contributor

Who'd like to sum up our thoughts for improvement in an issue? I'm sure you guys know what's going on here far better than myself.

@DeXtroTip DeXtroTip deleted the incubate_eggs_fix branch August 29, 2016 13:44
mjmadsen added a commit that referenced this pull request Aug 29, 2016
* Expand simple logging options (#4832)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Changed ) to } (#4845)

Fixed an faulty character

* fix incubator logic (#4848)

* corrected logic to respect snipe = true

* Update configuration_files.md (#4854)

* corrected logic to respect snipe = true (#4855)

* Revert "corrected logic to respect snipe = true" (#4857)

* dont forget to update the docs when adding config changes... (#4856)

* dont forget to update the docs when adding config changes...

* reflect config changes....

* please keep this as is (#4859)

Add stuff in the right order.

* Clarify Max_distance for Sniping (#4858)

* Clarify Max_distance

* Added distance unit and updated configuration_files.md

* - debug improvements for MoveToMap (#4860)

- fix for Telegram to accept "@username" as "master", too, along with numeric  IDs

* Fixes catch rates. (#4863)

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Add exceptions to json file read/writes (#4877)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Incubate eggs fix (#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs
mjmadsen pushed a commit that referenced this pull request Aug 30, 2016
* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Update player data in web from metrics

Uses existing metrics instead of waiting on liveupdate

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Improvements to evolve + config md updates (#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* Incubate eggs fix (#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* Call level_up_rewards on exp changes/Some pep-8 (#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* add some sanitycheck (#4891)

* execute setup.sh -u if there is a need to (#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Refactoring to share inventory and reduce api calls

Modifications to share cached inventory and reduce overall required api
calls from 4 to 1. Only remaining api call comes from heartbeat which
updates the cached inventory for sanity reasons.

* Remove import of UpdateWebPlayerdata

Decided there was a better way to go with this, since both
UpdateWebInventory and UpdateWebPlayerdata share the same inventory
input/output, just different sections. Combined into UpdateWebInventory.

* Fixed conflict

* Import inventory added to metrics

Allows metrics to use the cached inventory to retrieve player stats
instead of making another api call

* Removed api call from incubate_eggs

Cached inventory should be accurate enough for this
alexyaoyang pushed a commit that referenced this pull request Sep 1, 2016
* Update merge (#1)

* Expand simple logging options (#4832)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Changed ) to } (#4845)

Fixed an faulty character

* fix incubator logic (#4848)

* corrected logic to respect snipe = true

* Update configuration_files.md (#4854)

* corrected logic to respect snipe = true (#4855)

* Revert "corrected logic to respect snipe = true" (#4857)

* dont forget to update the docs when adding config changes... (#4856)

* dont forget to update the docs when adding config changes...

* reflect config changes....

* please keep this as is (#4859)

Add stuff in the right order.

* Clarify Max_distance for Sniping (#4858)

* Clarify Max_distance

* Added distance unit and updated configuration_files.md

* - debug improvements for MoveToMap (#4860)

- fix for Telegram to accept "@username" as "master", too, along with numeric  IDs

* Fixes catch rates. (#4863)

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Add exceptions to json file read/writes (#4877)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Incubate eggs fix (#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* add some sanitycheck (#4891)

* execute setup.sh -u if there is a need to (#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Call level_up_rewards on exp changes/Some pep-8 (#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* Improvements to evolve + config md updates (#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* 2000 pokestop in 24h limit (#4906)

* 2000 pokestop in 24h limit

* 2000 pokestop in 24h limit

* add config variable

* config update

* Update readme.md + Improve FollowPath & SleepSchedule messages (#4911)

* Use logger for follow path loiter message

* Update readme.md

* Improve sleep message

* Allow follow_path to use config's distance unit

* Allow follow_path to use config's distance unit

* Reduce API calls (#4916)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Update player data in web from metrics

Uses existing metrics instead of waiting on liveupdate

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Improvements to evolve + config md updates (#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* Incubate eggs fix (#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* Call level_up_rewards on exp changes/Some pep-8 (#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* add some sanitycheck (#4891)

* execute setup.sh -u if there is a need to (#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Refactoring to share inventory and reduce api calls

Modifications to share cached inventory and reduce overall required api
calls from 4 to 1. Only remaining api call comes from heartbeat which
updates the cached inventory for sanity reasons.

* Remove import of UpdateWebPlayerdata

Decided there was a better way to go with this, since both
UpdateWebInventory and UpdateWebPlayerdata share the same inventory
input/output, just different sections. Combined into UpdateWebInventory.

* Fixed conflict

* Import inventory added to metrics

Allows metrics to use the cached inventory to retrieve player stats
instead of making another api call

* Removed api call from incubate_eggs

Cached inventory should be accurate enough for this

* Swap auth and config position (#4909)

* add telegram check messages interval (#4919)

* add telegram check messages interval

* config changed

* fix config

* telegram doc update

* Add documentation (#4921)

See documentation for full list of new features

* documented docker for the auth.json use case (#4922)

add instructions for the docker run command for the multiple config files use case.

* Fix for #4718 (#4924)

* Add except variable

* Add except variable

* Fix filter (#4925)

* improve docker pull speed (#4899)

* Update inventory.py (#4928)

FIX: #4926

* fixed a runtime error caused by incorrect imports (#4931)

* Catch exception telegram.error.NetworkError.
Fixs some pylint complain.

* More config parameters for MoveToMap (#4937)

* fixed a runtime error caused by incorrect imports

* Moving module-level constants (snipe parameters) into config file

* Add experimental pokemon upgrade (power-up) logic (#4938)

Add upgrade cost data file
Add last pokemon level.

* Set default value of skip_rounds to 30 since many people just use the default value.
30 will behave close to human.

* Add exception handling for cached forts (#4943)

* Add exception handling for cached forts

* whitespace fix

* telegram to thread

* config update

* doc update

* update web repo to have better web ui contribute.

* Using $TIMEZONE environment variable to set timezone

* fix errors

* fix errors

* Fixing clean run issues.

* During startup, no bot object.

* Added option PokemonGo-Bot-Configurator

Smoothed some things up
Added option to run PokemonGo-Bot-Configurator at the end of the
installation.

* Hotfix for EvolvePokemon (#4960)

* Compatiable with old protocol define in map-chat.

* Update merge (#2)

* Expand simple logging options (#4832)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Changed ) to } (#4845)

Fixed an faulty character

* fix incubator logic (#4848)

* corrected logic to respect snipe = true

* Update configuration_files.md (#4854)

* corrected logic to respect snipe = true (#4855)

* Revert "corrected logic to respect snipe = true" (#4857)

* dont forget to update the docs when adding config changes... (#4856)

* dont forget to update the docs when adding config changes...

* reflect config changes....

* please keep this as is (#4859)

Add stuff in the right order.

* Clarify Max_distance for Sniping (#4858)

* Clarify Max_distance

* Added distance unit and updated configuration_files.md

* - debug improvements for MoveToMap (#4860)

- fix for Telegram to accept "@username" as "master", too, along with numeric  IDs

* Fixes catch rates. (#4863)

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Add exceptions to json file read/writes (#4877)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Incubate eggs fix (#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* add some sanitycheck (#4891)

* execute setup.sh -u if there is a need to (#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Call level_up_rewards on exp changes/Some pep-8 (#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* Improvements to evolve + config md updates (#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* 2000 pokestop in 24h limit (#4906)

* 2000 pokestop in 24h limit

* 2000 pokestop in 24h limit

* add config variable

* config update

* Update readme.md + Improve FollowPath & SleepSchedule messages (#4911)

* Use logger for follow path loiter message

* Update readme.md

* Improve sleep message

* Allow follow_path to use config's distance unit

* Allow follow_path to use config's distance unit

* Reduce API calls (#4916)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Update player data in web from metrics

Uses existing metrics instead of waiting on liveupdate

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Improvements to evolve + config md updates (#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* Incubate eggs fix (#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* Call level_up_rewards on exp changes/Some pep-8 (#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* add some sanitycheck (#4891)

* execute setup.sh -u if there is a need to (#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Refactoring to share inventory and reduce api calls

Modifications to share cached inventory and reduce overall required api
calls from 4 to 1. Only remaining api call comes from heartbeat which
updates the cached inventory for sanity reasons.

* Remove import of UpdateWebPlayerdata

Decided there was a better way to go with this, since both
UpdateWebInventory and UpdateWebPlayerdata share the same inventory
input/output, just different sections. Combined into UpdateWebInventory.

* Fixed conflict

* Import inventory added to metrics

Allows metrics to use the cached inventory to retrieve player stats
instead of making another api call

* Removed api call from incubate_eggs

Cached inventory should be accurate enough for this

* Swap auth and config position (#4909)

* add telegram check messages interval (#4919)

* add telegram check messages interval

* config changed

* fix config

* telegram doc update

* Add documentation (#4921)

See documentation for full list of new features

* documented docker for the auth.json use case (#4922)

add instructions for the docker run command for the multiple config files use case.

* Fix for #4718 (#4924)

* Add except variable

* Add except variable

* Fix filter (#4925)

* improve docker pull speed (#4899)

* Update inventory.py (#4928)

FIX: #4926

* fixed a runtime error caused by incorrect imports (#4931)

* Catch exception telegram.error.NetworkError.
Fixs some pylint complain.

* More config parameters for MoveToMap (#4937)

* fixed a runtime error caused by incorrect imports

* Moving module-level constants (snipe parameters) into config file

* Add experimental pokemon upgrade (power-up) logic (#4938)

Add upgrade cost data file
Add last pokemon level.

* Set default value of skip_rounds to 30 since many people just use the default value.
30 will behave close to human.

* Add exception handling for cached forts (#4943)

* Add exception handling for cached forts

* whitespace fix

* telegram to thread

* config update

* doc update

* update web repo to have better web ui contribute.

* Using $TIMEZONE environment variable to set timezone

* fix errors

* fix errors

* Fixing clean run issues.

* During startup, no bot object.

* Added option PokemonGo-Bot-Configurator

Smoothed some things up
Added option to run PokemonGo-Bot-Configurator at the end of the
installation.

* Hotfix for EvolvePokemon (#4960)

* Compatiable with old protocol define in map-chat.

* Provided a default for max_walking_distance and max_sniping_distance in
order to avoid unhandled exceptions

* Made sure nicknaming only waits if real api-relevant action was taken.
rawgni added a commit to rawgni/PokemonGo-Bot that referenced this pull request Sep 1, 2016
Fix nickname (PokemonGoF#5031)

* Update merge (PokemonGoF#1)

* Expand simple logging options (PokemonGoF#4832)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Changed ) to } (PokemonGoF#4845)

Fixed an faulty character

* fix incubator logic (PokemonGoF#4848)

* corrected logic to respect snipe = true

* Update configuration_files.md (PokemonGoF#4854)

* corrected logic to respect snipe = true (PokemonGoF#4855)

* Revert "corrected logic to respect snipe = true" (PokemonGoF#4857)

* dont forget to update the docs when adding config changes... (PokemonGoF#4856)

* dont forget to update the docs when adding config changes...

* reflect config changes....

* please keep this as is (PokemonGoF#4859)

Add stuff in the right order.

* Clarify Max_distance for Sniping (PokemonGoF#4858)

* Clarify Max_distance

* Added distance unit and updated configuration_files.md

* - debug improvements for MoveToMap (PokemonGoF#4860)

- fix for Telegram to accept "@username" as "master", too, along with numeric  IDs

* Fixes catch rates. (PokemonGoF#4863)

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Add exceptions to json file read/writes (PokemonGoF#4877)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Incubate eggs fix (PokemonGoF#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* add some sanitycheck (PokemonGoF#4891)

* execute setup.sh -u if there is a need to (PokemonGoF#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (PokemonGoF#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Call level_up_rewards on exp changes/Some pep-8 (PokemonGoF#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* Improvements to evolve + config md updates (PokemonGoF#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* 2000 pokestop in 24h limit (PokemonGoF#4906)

* 2000 pokestop in 24h limit

* 2000 pokestop in 24h limit

* add config variable

* config update

* Update readme.md + Improve FollowPath & SleepSchedule messages (PokemonGoF#4911)

* Use logger for follow path loiter message

* Update readme.md

* Improve sleep message

* Allow follow_path to use config's distance unit

* Allow follow_path to use config's distance unit

* Reduce API calls (PokemonGoF#4916)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Update player data in web from metrics

Uses existing metrics instead of waiting on liveupdate

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Improvements to evolve + config md updates (PokemonGoF#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* Incubate eggs fix (PokemonGoF#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* Call level_up_rewards on exp changes/Some pep-8 (PokemonGoF#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* add some sanitycheck (PokemonGoF#4891)

* execute setup.sh -u if there is a need to (PokemonGoF#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (PokemonGoF#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Refactoring to share inventory and reduce api calls

Modifications to share cached inventory and reduce overall required api
calls from 4 to 1. Only remaining api call comes from heartbeat which
updates the cached inventory for sanity reasons.

* Remove import of UpdateWebPlayerdata

Decided there was a better way to go with this, since both
UpdateWebInventory and UpdateWebPlayerdata share the same inventory
input/output, just different sections. Combined into UpdateWebInventory.

* Fixed conflict

* Import inventory added to metrics

Allows metrics to use the cached inventory to retrieve player stats
instead of making another api call

* Removed api call from incubate_eggs

Cached inventory should be accurate enough for this

* Swap auth and config position (PokemonGoF#4909)

* add telegram check messages interval (PokemonGoF#4919)

* add telegram check messages interval

* config changed

* fix config

* telegram doc update

* Add documentation (PokemonGoF#4921)

See documentation for full list of new features

* documented docker for the auth.json use case (PokemonGoF#4922)

add instructions for the docker run command for the multiple config files use case.

* Fix for PokemonGoF#4718 (PokemonGoF#4924)

* Add except variable

* Add except variable

* Fix filter (PokemonGoF#4925)

* improve docker pull speed (PokemonGoF#4899)

* Update inventory.py (PokemonGoF#4928)

FIX: PokemonGoF#4926

* fixed a runtime error caused by incorrect imports (PokemonGoF#4931)

* Catch exception telegram.error.NetworkError.
Fixs some pylint complain.

* More config parameters for MoveToMap (PokemonGoF#4937)

* fixed a runtime error caused by incorrect imports

* Moving module-level constants (snipe parameters) into config file

* Add experimental pokemon upgrade (power-up) logic (PokemonGoF#4938)

Add upgrade cost data file
Add last pokemon level.

* Set default value of skip_rounds to 30 since many people just use the default value.
30 will behave close to human.

* Add exception handling for cached forts (PokemonGoF#4943)

* Add exception handling for cached forts

* whitespace fix

* telegram to thread

* config update

* doc update

* update web repo to have better web ui contribute.

* Using $TIMEZONE environment variable to set timezone

* fix errors

* fix errors

* Fixing clean run issues.

* During startup, no bot object.

* Added option PokemonGo-Bot-Configurator

Smoothed some things up
Added option to run PokemonGo-Bot-Configurator at the end of the
installation.

* Hotfix for EvolvePokemon (PokemonGoF#4960)

* Compatiable with old protocol define in map-chat.

* Update merge (PokemonGoF#2)

* Expand simple logging options (PokemonGoF#4832)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Changed ) to } (PokemonGoF#4845)

Fixed an faulty character

* fix incubator logic (PokemonGoF#4848)

* corrected logic to respect snipe = true

* Update configuration_files.md (PokemonGoF#4854)

* corrected logic to respect snipe = true (PokemonGoF#4855)

* Revert "corrected logic to respect snipe = true" (PokemonGoF#4857)

* dont forget to update the docs when adding config changes... (PokemonGoF#4856)

* dont forget to update the docs when adding config changes...

* reflect config changes....

* please keep this as is (PokemonGoF#4859)

Add stuff in the right order.

* Clarify Max_distance for Sniping (PokemonGoF#4858)

* Clarify Max_distance

* Added distance unit and updated configuration_files.md

* - debug improvements for MoveToMap (PokemonGoF#4860)

- fix for Telegram to accept "@username" as "master", too, along with numeric  IDs

* Fixes catch rates. (PokemonGoF#4863)

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Add exceptions to json file read/writes (PokemonGoF#4877)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Incubate eggs fix (PokemonGoF#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* add some sanitycheck (PokemonGoF#4891)

* execute setup.sh -u if there is a need to (PokemonGoF#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (PokemonGoF#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Call level_up_rewards on exp changes/Some pep-8 (PokemonGoF#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* Improvements to evolve + config md updates (PokemonGoF#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* 2000 pokestop in 24h limit (PokemonGoF#4906)

* 2000 pokestop in 24h limit

* 2000 pokestop in 24h limit

* add config variable

* config update

* Update readme.md + Improve FollowPath & SleepSchedule messages (PokemonGoF#4911)

* Use logger for follow path loiter message

* Update readme.md

* Improve sleep message

* Allow follow_path to use config's distance unit

* Allow follow_path to use config's distance unit

* Reduce API calls (PokemonGoF#4916)

* Fix bot crash at start on permaban

* Expanded logging options

Added "logging" section to config, with options "color",
"show_datetime", "show_process_name" and "show_log_level"

* Added warning about deprecated logging_color arg

* Display log message moved

No point trying to use the logger before it's been initialised. Moved to
init_config.

* Remove milliseconds from datetime

Because really, do we need that?

* Reversed condition order for clarity

First check: "if not in config", OR
Second check: "is in config AND set to true"

If either condition matches, the logging detail will be displayed.

* Documented new log options

* Modified conditions again

Removed unnecessary second check for config values and slightly modified
parentheses as per suggestion from @mjmadsen

* Add exception handling to json file read/write ops

* Removed API call in update live stats

Instead of making a new api call, utilise stats already contained in
metrics.

* Update player data in web from metrics

Uses existing metrics instead of waiting on liveupdate

* Implemented more granularity in the "alert_catch" parameter for Telegram
alerts.

* Improvements to evolve + config md updates (PokemonGoF#4900)

* Better do not evolve handling

* Edit config

* Update config

* Edit config

* Edit config

* Edit config

* Update config.json.path.example

* Update config.json.map.example

* Update config.json.example

* Update config.json.cluster.example

* Updated configuration_files.md

* Add extra tests

* Update config

* Update config

* Update config

* Update config

* Update config.json.pokemon.example

* Update config.json.cluster.example

* Begin fixing configuration_files.md

* Small fix

* Small fix

* Bit for of config updated

* Bit more on config

* A few more to config md

* Bit more of of an update

* Incubate eggs fix (PokemonGoF#4881)

* Fixed incubator_eggs wrong print

* Fixed pokemon hatched from eggs not added to cached inventory

* Fix

* Fixed not using breakable incubators

* Fixed error adding pokemon to cached inventory

* Moved remove egg and add Pokemon to _hatch_eggs

* Call level_up_rewards on exp changes/Some pep-8 (PokemonGoF#4896)

* Call level_up_rewards on exp changes.

* Cleanup

* add some sanitycheck (PokemonGoF#4891)

* execute setup.sh -u if there is a need to (PokemonGoF#4870)

* execute setup.sh -u if there is a need to

* ask the user whether to run setup.sh -u or not

* fix grammatical error

* Add PokemonGo bot version to docker image (PokemonGoF#4886)

* fix pep8

* Add PokemonGo bot version to docker image

* Use https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha} API

* Fix remove pyc, pyo files

* Refactoring to share inventory and reduce api calls

Modifications to share cached inventory and reduce overall required api
calls from 4 to 1. Only remaining api call comes from heartbeat which
updates the cached inventory for sanity reasons.

* Remove import of UpdateWebPlayerdata

Decided there was a better way to go with this, since both
UpdateWebInventory and UpdateWebPlayerdata share the same inventory
input/output, just different sections. Combined into UpdateWebInventory.

* Fixed conflict

* Import inventory added to metrics

Allows metrics to use the cached inventory to retrieve player stats
instead of making another api call

* Removed api call from incubate_eggs

Cached inventory should be accurate enough for this

* Swap auth and config position (PokemonGoF#4909)

* add telegram check messages interval (PokemonGoF#4919)

* add telegram check messages interval

* config changed

* fix config

* telegram doc update

* Add documentation (PokemonGoF#4921)

See documentation for full list of new features

* documented docker for the auth.json use case (PokemonGoF#4922)

add instructions for the docker run command for the multiple config files use case.

* Fix for PokemonGoF#4718 (PokemonGoF#4924)

* Add except variable

* Add except variable

* Fix filter (PokemonGoF#4925)

* improve docker pull speed (PokemonGoF#4899)

* Update inventory.py (PokemonGoF#4928)

FIX: PokemonGoF#4926

* fixed a runtime error caused by incorrect imports (PokemonGoF#4931)

* Catch exception telegram.error.NetworkError.
Fixs some pylint complain.

* More config parameters for MoveToMap (PokemonGoF#4937)

* fixed a runtime error caused by incorrect imports

* Moving module-level constants (snipe parameters) into config file

* Add experimental pokemon upgrade (power-up) logic (PokemonGoF#4938)

Add upgrade cost data file
Add last pokemon level.

* Set default value of skip_rounds to 30 since many people just use the default value.
30 will behave close to human.

* Add exception handling for cached forts (PokemonGoF#4943)

* Add exception handling for cached forts

* whitespace fix

* telegram to thread

* config update

* doc update

* update web repo to have better web ui contribute.

* Using $TIMEZONE environment variable to set timezone

* fix errors

* fix errors

* Fixing clean run issues.

* During startup, no bot object.

* Added option PokemonGo-Bot-Configurator

Smoothed some things up
Added option to run PokemonGo-Bot-Configurator at the end of the
installation.

* Hotfix for EvolvePokemon (PokemonGoF#4960)

* Compatiable with old protocol define in map-chat.

* Provided a default for max_walking_distance and max_sniping_distance in
order to avoid unhandled exceptions

* Made sure nicknaming only waits if real api-relevant action was taken.
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

6 participants