hsahovic / poke-env

A python interface for training Reinforcement Learning bots to battle on pokemon showdown
https://poke-env.readthedocs.io/
MIT License
297 stars 103 forks source link

Added gen and format information to AbstractBattle #558

Closed caymansimpson closed 5 months ago

caymansimpson commented 5 months ago

I did a couple of things here:

  1. _format was an internal variable that wasn't used, and recorded the generation of the AbstractBattle, so I changed _format to hold the format of the battle, aligning with Showdown protocol via the python equivalent to Showdown's parsing
  2. Stored generational info (the int) in _gen
  3. Added gen and format as properties of AbstractBattle
  4. Added a RunTime check to ensure that AbstractBattle is initiated with the right gen
  5. Added to fixture_data official showdown logs for easier parse_message testing
  6. Added testing for battle.format and battle.gen
codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.05%. Comparing base (f458350) to head (aa0f974). Report is 50 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #558 +/- ## ========================================== + Coverage 83.38% 85.05% +1.67% ========================================== Files 39 42 +3 Lines 3918 4189 +271 ========================================== + Hits 3267 3563 +296 + Misses 651 626 -25 ```