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

Config changes #4359

Closed
wants to merge 32 commits into from
Closed

Config changes #4359

wants to merge 32 commits into from

Conversation

sohje
Copy link
Contributor

@sohje sohje commented Aug 20, 2016

Short Description:

Detect config changes on the fly

Fixes/Resolves/Closes (please use correct syntax):

p.s.

Im totally new to this project, so im not sure that bot logic isnt broken. But it works fine for me - OSx, bots running perfectly.

solderzzc and others added 13 commits August 17, 2016 13:06
* Do not spin fort on timeout when restarting the bot (PokemonGoF#3931)

Fix bot stuck between forts when inventory is full

* Fixed references to self.bot.config.walk (PokemonGoF#4046)

* Fixed error

* Fixed error

* Updating run.sh and install.sh (PokemonGoF#4033)

* Update run.sh

* Update setup.sh

* Update setup.sh

* Update setup.sh

* Fixing typo

* Added heartbeat threshold, it's not reasonable to send heartbeat to server every second. (PokemonGoF#4058)

* Added heartbeat threshold, it's not reasonable to send heartbeat to server every second.

* Added example in config.

* heartbeat_threshold using time delta (PokemonGoF#4095)

* changed hearbeat threshold to work on a delta time

* renamed variable for clarity

* tidy up

* Fixing live stats crash on first run (PokemonGoF#4088)

* try to fix system platform in init.py (PokemonGoF#4068)

Fix for other system we don't know but should run without problem.

* Fix get_top_rank (PokemonGoF#3823)

Refresh inventory when opening it
Do not use rare pokemon to xp
Fix an issue when use_lucky_egg=true and evolve_only_with_lucky_egg=false
Save web inventory after refresh
Add parameter evolve_time default to 20.
Rename parameter use_candies_for_xp in evolve_for_xp
Rename parameter minimum_evolve_for_lucky_egg in evolve_count_for_lucky_egg
Rename parameter use_lucky_egg in may_use_lucky_egg
Add 1 percent rule = Do not use rare pokemon candies for xp
Handle lucky egg already active case
Plan bad Eevees for transfer if evolve is deactivated

* Enhancement/sleep schedule check if current sleep is over (PokemonGoF#4031)

* SleepSchedule check if current sleep period is over

Enhances PokemonGoF#2193

* Add config field "skip_current_sleep_cycle"

* Edit sample config files to include skip_current_sleep_cycle

* Remove skip_current_sleep_cycle

* Add one more check for current sleep

* MoveToMapPokemon: Replacing min_time with reachable distance calculation (PokemonGoF#4022)

* * replacing min_time functionality of MoveToMapPokemon by a more sophisticated way of determining reachability on time

* * fixing PokemonGoF#3609

* moving config values to top

* Make PokemonOptimizer calculate correct transfer / evolve groups (PokemonGoF#4099)

* Humanize & better app simulation for catches (PokemonGoF#3872)

* changed 2 second delay between retrying throws to use action_delay
minimum delay is 2 seconds

* quick randomise 2,4 or 6 secs between failed throw and next throw to simulate app better

* added config option to turn randomize_flee_duration off (default = on)

* configurable delay for throwing balls

added action_delay when changing ball or using razzberry

* moved delay for razzberry to more appropriate place

* updated config files with catch_wait_min and catch_wait_max

* updated config files with randomize_flee_duration

* grouped catch simulation and humanization settings
added settings for all catch related sleeps

* Changed the logic for randomly choosing a sleep for flee animation to something reasonable

* docs
clean up import

* re-Wording followPath to more readable, recycle_items.should_run should accept <= for min_empty_space: 0 (PokemonGoF#4105)

* re-wording follow path, inventory should have -1 value instead of 0

* remove unused

* refactor: inventory.get_space_left should return 0 so change conditions from recycle.should_run instead

* Send bot through Tor (PokemonGoF#4108)

* Send bot through Tor

All of the bot's API requests go through tor

* links privoxy

you gotta link if you want to reference

* keep privoxy up too

* Update setup.sh (PokemonGoF#4117)

* Update run.sh (PokemonGoF#4123)

typo

* Fixing values on UpdateLiveStatus (PokemonGoF#4127)

* Updated wiki, explain how to use Docker under Windows (PokemonGoF#4136)

* Bring together CatchVisiblePokemon & CatchLuredPokemon in config (PokemonGoF#3966)

* CatchPokemon calls CatchLuredPokemon and CatchVisiblePokemon methods.

Config now only needs one catch related worker.  All catch related config including option to catch lured and/or visible can be kept with the task.

* example config

* indentation

* defaults for catch_lured/visible_pokemon

* deprecated command line options for throw parameters

* catch_throw_parameters defaults match config.json.example

* added deprecation functionality for CatchVisiblePokemon and CatchLuredPokemon

* min_ultraball_to_keep default reflects example config

* tree_config_builder_test uses CatchPokemon instead of CatchLuredPokemon

* deprecation warning message

* catchsim config moved to CatchPokemon

* updated example configs

* updated docs

* User configurable delay when spinning fort (PokemonGoF#4109)

* user configurable delay for spin fort

* replaced time.sleep(2) with configurable delay

* updated configs

* fix followCluster & MoveToMapPokemon (PokemonGoF#4115)

* * fixed followCluster not following lured clusters because of outdated pokestop data structure
* fixed very annoying followCluster wording (OCD senses were tickling)
* fixed PokemonGoF#4022

* no message

* string formatting

* correcting message to display lured only when walking to lured cluster

* message formatting

* forgot to add regester event variable

* Showing detailed sleep info (PokemonGoF#4066)

* Windows installation instructions refit (PokemonGoF#3898)

* Delete PokemonGo-Bot-Repair.bat

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Start.bat

Removed an update procedure that was making the map not to work.

* Update installation.md

Modified Windows installation instructions to use the batch files.

* Update PokemonGo-Bot-Install.bat

Added links for the configuration instructions. Still missing links for the encrypt files. Need help on it.

* Update manual_installation.md

Recreated the installations instructions for Windows.

* Update installation.md

Removed the need to download PyYAML and modified the instructions to download only the required encrypt files.

* Update manual_installation.md

Removed the requirement to download PyYAML as the installer already downloads it during git pull. Also removed the requirement to download all encrypt files.

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Start.bat

Added a pause in the end so the promp wont close in the end if `pokecli.py` goes to error.

* Update PokemonGo-Bot-Install.bat

Added a procedure to deal with the installation path issue. Also, added a command to install protobuff automatically.

* Update installation.md

Removed the requirement to install protobuff as it will be installed automatically by the install batch.

* Update PokemonGo-Bot-Install.bat

* Update manual_installation.md

Removed the requirement for protoc and added command line to download it.

* Update PokemonGo-Bot-Install.bat

* Update PokemonGo-Bot-Start.bat

Updated in order to work anywhere as long its inside the windows_bat folder

* Update PokemonGo-Bot-Install.bat

* Update installation.md

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Install.bat

* Update CONTRIBUTORS.md

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Start.bat

* Update PokemonGo-Bot-Install.bat

* Revert "Update CONTRIBUTORS.md"

This reverts commit 856a0fd.

* Revert "Delete PokemonGo-Bot-Repair.bat"

This reverts commit a459a86.

* Revert "Update PokemonGo-Bot-Start.bat"

This reverts commit 510570d.

* Revert "Update PokemonGo-Bot-Install.bat"

This reverts commit 9db2798.

# Conflicts:
#	windows_bat/PokemonGo-Bot-Install.bat

* Complete refit of all batches

We can now choose an install location and all required software is
automatically installed.

* Added contributors

Added new contributors

* Revert "Added contributors"

This reverts commit a1d364c.

* Deprecate action_wait_min/max in favour of task specific options (PokemonGoF#4048)

* RecycleItems uses it's own recycle_wait_min/max instead of action_wait_min/max

* TransferPokemon uses it's own transfer_wait_min/max instead of action_wait_min/max

* PokemonOptimizer uses it's own transfer_wait_min/max instead of action_wait_min/max

* Deprecated action_wait_min and action_wait_max

* fixed mistake

* Update update_live_stats.py (PokemonGoF#3985)

* SQLite backend for bot/plugin use (PokemonGoF#4129)

* Initial attempt at implementing an SQLite backend for plugin use

* Fixed attribute error when accessing DB

* Patch snipey in move_to_map_pokemon.py (PokemonGoF#4146)

to solve issue PokemonGoF#4142

* Add files via upload (PokemonGoF#4151)

* fix example config

* fix config file

* added a script to check json, and updated .travis.yml

* Update json-validate.py

* Documenting docker-compose with Tor (PokemonGoF#4161)

* Send bot through Tor

All of the bot's API requests go through tor

* links privoxy

you gotta link if you want to reference

* keep privoxy up too

* Docker documentation update

Including example command for using the alternate tor proxy command. Additionally changed line 114 to down rather than rm so that the containers are stopped before they are removed in the case that the containers were launched in detached mode.

* Remove `,` at line 112 (PokemonGoF#4171)

* Minor config fix (PokemonGoF#4173)

Fixes indent

* Fix no pokeballs log spamming (PokemonGoF#4000)

* Fix looping between equidstant pokestops

* :D

* emp

* changes

* fix no pokeballs log spamming, fix possible bug

* remove unnesscessary return

* revert pokemongo_bot/cell_workers/move_to_fort.py

* solve merge conflicts

* Remove extra whitespace
…nGoF#4350)

* bugfix for polyline

* leftovers

* changed default value of pokecli config aswell

* added fix for PokemonGoF#4250

* fixed spiral aswell

* original current and last are wrong...

* seems it was ok, reverted partly...

* upside down

* changed message

* cleanup & polyline support for move_to_fort

* fixed default conf to StepWalker
* Transfert pokemon only when we don't have free slots

* Update configuration file

* Added tip

* Typo
* Added PokemonBag to UpdateLiveInventory

* Added documentation
It was not possible to execute the script with
'./'.
* bugfix for polyline

* leftovers

* changed default value of pokecli config aswell

* added fix for PokemonGoF#4250

* fixed spiral aswell

* original current and last are wrong...

* seems it was ok, reverted partly...

* upside down

* changed message

* cleanup & polyline support for move_to_fort

* fixed default conf to StepWalker

* fixed ValueError issue
@ghost
Copy link

ghost commented Aug 20, 2016

IMHO this is far too much overhead for most of the people. This should definetly be an option in the config file, to be started or not (maybe even with a check frequency?)

Added FollowPath and UpdateLiveStats description. The UpdateLiveStats options are taken from the source code.
@sohje
Copy link
Contributor Author

sohje commented Aug 20, 2016

@doctordo0m I dont think this option should be added to config.json file cause of self-reference. Maybe CLI option with delay param?

BreezeRo and others added 5 commits August 20, 2016 15:11
* Ban Notifications (Slack) PokemonCatchWorker

* Update requirements.txt (slack notif)

* Update pokemon_catch_worker.py

* spin_fort.py slack notifcations

* Update config.json.cluster.example

* Update config.json.example

* Update config.json.map.example

* Update config.json.optimizer.example

* Update config.json.path.example

* Update config.json.pokemon.example

* pokecli.py slack variable

* Update pokecli.py

* Update pokemon_catch_worker.py

* Update spin_fort.py

* Update pokecli.py
- Add parameter `candy` to `pokemon_evolved` event.

- Fix PokemonOptimizer evolve problem with `pokemon_evolved` event.

- EvolvePokemon now correctly updates inventory even if evolve_log fails.

- EvolvePokemon now emits evolved event with xp & candy.
* Minor update/fix
 * Fixed bad function call at update_live_inventory.py
 * Fixed 'Total eggs' only show not incubating eggs

* Updated configuration file

* Small fix

* Small fix

* Minor fix

* Fixed typo mistake
solderzzc and others added 8 commits August 20, 2016 20:46
* fix commit 4350

* Update follow_path.py

* Update follow_path.py

* Update follow_path.py
* Added number of hatched eggs since the bot started (hatched_eggs) and distance (km) to next egg hatching (next_egg_hatching) in metrics/UpdateLiveStats PokemonGoF#4150

* Hotfix to 0bff492 (type error)
* bugfix for polyline

* leftovers

* changed default value of pokecli config aswell

* added fix for PokemonGoF#4250

* fixed spiral aswell

* original current and last are wrong...

* seems it was ok, reverted partly...

* upside down

* changed message

* cleanup & polyline support for move_to_fort

* fixed default conf to StepWalker

* fixed ValueError issue

* polyline stucking issue fixed

* minor fix

* removed print
* Correct sort on keep best custom

* Add wake up at location in sleep schedule

* Update docs for sleep schedule

* final corrections for wake up at location in sleep schedule

* Do not use self.wake up at location without set up in config file

* Update (again?) the docs for randompause

* Include a mention of altitude in default config docs

* Update config.json.example with empty field for wake up at

* Repair config.example (a comma)
* Refresh web inventory when pokemon inventory change
Take into account the candy rewarded at evolution

* Update configuration default values

* default off

* Deactivate evolve if contradicting evolution settings

* default off
* Correct sort on keep best custom

* Some test on follow path

* Number lap max in followpath

* Sleep at end of follow path

* Add restart timer to follow path

* Add example for config path

* Update wiki for follow path, number of lap

* Add login back up after pause

* Forget comma in config path example
@k4n30
Copy link
Contributor

k4n30 commented Aug 21, 2016

@sohje merge conflicts needs resolving

@sohje
Copy link
Contributor Author

sohje commented Aug 21, 2016

Omg.. wrong click and F$#K

@danielsdian
Copy link
Contributor

danielsdian commented Aug 21, 2016

Would be nice if we could "Modularize" the config file in order to make it easier to modify. Like, a section for GPS configs (GPS location, noise, altitude), another for pokemon management (capture, evolution and release), another for movement logic (Walk speeds, Spiral, cluster), stuff like that.

@k4n30
Copy link
Contributor

k4n30 commented Aug 21, 2016

@danielsdian different Feature request found here #3506

This PR is for detecting config changes after bot start (FR #3588 )

@sohje sohje closed this Aug 22, 2016
@k4n30
Copy link
Contributor

k4n30 commented Aug 23, 2016

@sohje why the close?

@alexyaoyang alexyaoyang mentioned this pull request Aug 25, 2016
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.