-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
'all' in 'release' config discards all pokemon except N best (Closes #4552) #4615
Conversation
…N best ones * "release": {"all": keep_best_cp": 100} globally keeps 100 best CP pokemon * fixed description of 'any' in docs and configs * added 'all' example in config files * added example of 'all' to docs
@LitRidl, thanks for your PR! By analyzing the annotation information on this pull request, we identified @Quantra, @achretien and @supercourgette to be potential reviewers |
Thanks for your commit. :) English is not my first language, and I have some difficulty to understand the meaning of your PR (and your proposition in #4552). From my understanding, the actual configuration already allow to discard any Pokemons which does not met customs criteria, to only keep the N best. In the documentation you said:
For your example with the Snorlax, wouldn't the same output will be done with:
Thanks you in advance for your explanation. :) |
@supercourgette well, you think exactly as I did before I got into this problem. I though that keep with 'any' works by keeping N best pokemon in bag. But sadly, it doesn't: it tries to replicate deduplication mechanism from Necrobot. For example, if you have 50 pidgeys, 50 rattatas and 50 weedles and run them through
With |
|
@solderzzc And what to do? When I published PR there were no conflict. Few hours later -- well, of course they happened to be ) If I will create new PR, time delays will be the same. So conflicts will happen again? |
@LitRidl Since there're several PRs I merged before yours. You can just on your branch, run |
@solderzzc fixed |
Hmm, I haven't read the code carefully. The release task is out date since PokemonOptimizer did much better on XP. |
"any" is releasing all but the top as a whole. @solderzzc @LitRidl #4621 |
@mjmadsen Strange, how does it come that I have broken 'any'? Sorry, going to look for this |
@LitRidl Yeah, I haven't found it yet. |
@mjmadsen I have found it -- if 'all' is not present in release config, it falls into 'any'. 'any' logics is organised as default value: if pokemon name is not found in release config, bot gets 'any'. And well, if someone haven't specified 'all'... 'any' runs on the whole pokemon bag :) |
Yes please. Nice work! My self included, we had a few folks lose most of their bags. Doh! |
I am really sorry. Should have tested it better. |
No problem. It happens! |
Closes #4552 , Resolves #4468
Added keyword 'all' in 'release' config which allows to discards all pokemon in bag except N best. Updated docs and added commented examples in configs.
Changes in code are exactly as described in #4552 solution suggestion (refactored contents of
for
in a separate method and added 3 new lines, that's all).