-
-
Notifications
You must be signed in to change notification settings - Fork 126
Open Team Sheets #533
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
Open Team Sheets #533
Conversation
…plemented open team sheet functionality
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #533 +/- ##
==========================================
- Coverage 83.38% 83.24% -0.15%
==========================================
Files 39 40 +1
Lines 3918 3998 +80
==========================================
+ Hits 3267 3328 +61
- Misses 651 670 +19 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! I left a couple of minor comments, but this is almost ready to merge. Thanks a lot!
src/poke_env/player/player.py
Outdated
battle_format: str = "gen9randombattle", | ||
log_level: Optional[int] = None, | ||
max_concurrent_battles: int = 1, | ||
open_team_sheet: bool = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rename this parameter to accept_open_team_sheet
?
src/poke_env/player/player.py
Outdated
elif split_message[1] == "bigerror": | ||
self.logger.warning("Received 'bigerror' message: %s", split_message) | ||
elif split_message[1] == "uhtml": | ||
if split_message[2] == "otsrequest": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uhtml
messages are currently handled in battle.parse_message
- can you combine the two conditions (eg. elif split_message[1] == "uhtml" and split_message[2] == "otsrequest"
) so that other messages are still parsed by it?
|
||
|
||
def test_open_team_sheet(): | ||
assert SimplePlayer(open_team_sheet=True).open_team_sheet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would add a negative and a default test as well
Related to Issue #530 added implementation to accept/reject open team sheets for formats that request it. By default, we reject open team sheets to save the privacy of the bots.
Changes:
Also, learned my lesson! It passes:
Hopefully this one is more straightforward!