Fully implemented the Renderer Gym API with render_mode. This won't break other libraries since the old rendering API can still be used.
Moved benchmark.py and manual_control.py to gym_minigrid\ directory.
Add Pytest to the Github CI. Pytests are organized in two files tests\test_envs.py and tests\test_wrappers.py. These have a combination of tests previously found in run_tests.py and test_interactive_mode.py, the env_checker test from Gym, and new tests. The division of the pytest functions are as follow:
From old run_tests.py and test_interactive_mode.py: test_envs.py:test_agent_sees_method(), test_envs.py:old_run_test(), test_envs.py:test_interactive_mode(), test_wrappers.py:test_dict_observation_space_wrapper(), test_wrappers.py:test_main_wrappers(), test_wrappers.py:test_observation_space_wrappers(), test_wrappers.py:test_agent_sees_method()
From Gym: test_envs.py:test_env(), test_envs.py:test_env_determinism_rollout(), test_envs.py:test_render_modes()
New tests: test_wrappers.py:test_reseed_wrapper(), test_wrappers.py:test_state_bonus_wrapper(), test_wrappers.py:test_action_bonus_wrapper()
Type of change
Please delete options that are not relevant.
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist:
[x] I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
Description
This PR adds the following:
Renderer
Gym API withrender_mode
. This won't break other libraries since the old rendering API can still be used.benchmark.py
andmanual_control.py
togym_minigrid\
directory.tests\test_envs.py
andtests\test_wrappers.py
. These have a combination of tests previously found inrun_tests.py
andtest_interactive_mode.py
, theenv_checker
test from Gym, and new tests. The division of the pytest functions are as follow:From old
run_tests.py
andtest_interactive_mode.py
:test_envs.py:test_agent_sees_method()
,test_envs.py:old_run_test()
,test_envs.py:test_interactive_mode()
,test_wrappers.py:test_dict_observation_space_wrapper()
,test_wrappers.py:test_main_wrappers()
,test_wrappers.py:test_observation_space_wrappers()
,test_wrappers.py:test_agent_sees_method()
From Gym:
test_envs.py:test_env()
,test_envs.py:test_env_determinism_rollout()
,test_envs.py:test_render_modes()
New tests:
test_wrappers.py:test_reseed_wrapper()
,test_wrappers.py:test_state_bonus_wrapper()
,test_wrappers.py:test_action_bonus_wrapper()
Type of change
Please delete options that are not relevant.
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist:
pre-commit
checks withpre-commit run --all-files
(seeCONTRIBUTING.md
instructions to set it up)