* Update pendulum.py
* version warnings
* black
* try except
* update notices version
* Exception
* nosec
* black
* no loop, stderr
* black
* convert ## to ###
* correct subheader
* black
* despace
* spacing
* frozen lake fixes
* Fix `return_info` for Observation wrappers, Atari (?) and framestack
* Make type checkers and IDEs happier
* Merge in #2454
* Update the info dict based on no-op steps
Some type hints
* Bug fix
* Handle resets during frameskip
* Add typing to gym.make via literals
* Fix for type object not subscriptable
* Use Env[ObsType, ActType] instead of specific types to account for wrapping
* Move make and all overloads to `registration.py`
* Hack around py37 typing checks
* Typecheck classic control environments
* consistent imports + comments
* Don't use seed method
Although this code is exact duplication, we at least don't call deprecated method.
* Update core.py
* initial draft of optional info dict in reset function, implemented for cartpole, tests seem to be passing
* merged core.py
* updated return type annotation for reset function in core.py
* optional metadata with return_info from reset added for all first party environments, with corresponding tests. Incomplete implementation for wrappers and vector wrappers
* removed Optional type for return_info arguments
* added tests for return_info to normalize wrapper and sync_vector_env
* autoformatted using black
* added optional reset metadata tests to several wrappers
* added return_info capability to async_vector_env.py and test to verify functionality
* added optional return_info test for record_video.py
* removed tests for mujoco environments
* autoformatted
* improved test coverage for optional reset return_info
* re-removed unit test envs accidentally reintroduced in merge
* removed unnecessary import
* changes based on code-review
* small fix to core wrapper typing and autoformatted record_epsisode_stats
* small change to pass flake8 style
* Fix jerky camera angle in car racing env
* Bump the version of CarRacing
* Fix episode termination criterion in car racing env
* Improve lap detection and add argument
* Fix pre-commit
Co-authored-by: J K Terry <justinkterry@gmail.com>
* Refactor lunar lander to use pygame
* Fix minor rendering inconsistency
* Refactor bipedal walker to use pygame
* Reformat with black
* Remove viewer
* Fix color for obstacles
* Update dependencies for box2d
* Optimize screen initialization
* docs+credits
* docs: refactor box2d + comment version history
* fix mujoco line lengths
* fix more env line lengths
* black
* typos
* put docstrings in base environments rather than highest version
* fix richer reacher
* black
* correct black version
* continuous mountain car docstring to markdown
* remove unneeded images
* black
* fix quote
* docs: add version history to Box2D envs
* Update lunar_lander.py
Co-authored-by: Andrea PIERRÉ <andrea_pierre@brown.edu>
* Add call, get_attr and set_attr methods
* Use f-strings and remove assert
* Allow tuples in set_attr and move docstrings
* Replace CubeCrash by CartPole in tests
* Add call, get_attr and set_attr methods
* Use f-strings and remove assert
* Allow tuples in set_attr and move docstrings
* Replace CubeCrash by CartPole in tests
* docs+credits
* docs: refactor box2d + comment version history
* fix mujoco line lengths
* fix more env line lengths
* black
* typos
* put docstrings in base environments rather than highest version
* fix richer reacher
* black
* correct black version
* continuous mountain car docstring to markdown
* remove unneeded images
* black
Co-authored-by: Andrea PIERRÉ <andrea_pierre@brown.edu>
* docs+credits
* docs: refactor box2d + comment version history
* fix mujoco line lengths
* fix more env line lengths
* black
* typos
* put docstrings in base environments rather than highest version
* fix richer reacher
* black
* correct black version
Co-authored-by: Andrea PIERRÉ <andrea_pierre@brown.edu>
* docs+credits
* docs: refactor box2d + comment version history
* fix mujoco line lengths
* fix more env line lengths
* black
* typos
Co-authored-by: Andrea PIERRÉ <andrea_pierre@brown.edu>
* typing in spaces.Box and spaces.Discrete
* adds typing to dict and tuple spaces
* Typecheck all spaces
* Explicit regex to include all files under space folder
* Style: use native types and __future__ annotations
* Allow only specific strings for Box.is_bounded args
* Add typing to changes from #2517
* Remove Literal as it's not supported by py3.7
* Use more recent version of pyright
* Avoid name clash for type checker
* Revert "Avoid name clash for type checker"
This reverts commit 1aaf3e0e0328171623a17a997b65fe734bc0afb1.
* Ignore the error. It's reported as probable bug at https://github.com/microsoft/pyright/issues/2852
* rebase and add typing for `_short_repr`
* Fixed ordering of space. Added singledispatch utility.
* Added singledispatch utility to vector.utils & changed order of space argument
* Fixed Error from _BaseGymSpaces
* Minor adjustment for Discrete Spaces
* Fixed Tests/ to reflect changes
* Fixed precommit error - custom namespaces
* Concrete Implementations start with _
* First find/replace, now tests
* Fixes to the vector env
* Make seed keyword only in wrappers
* (try to) fix the bug with old environments using new wrappers (with the seed keyword)
* black
* Change **kwargs to options, try to make it work; black
* Add OrderEnforcing wrapper to wrapper exports
Add a test for compatibility with old (pybullet-like) envs
* Add OrderEnforcing wrapper to wrapper exports
Add a test for compatibility with old (pybullet-like) envs
black
* Update the env checker
* Update the env checker
* Update the env checker to use inspect (might fail tests, let's see)
* Allow the signature to include kwargs in env_checker
* Minor fix
* refactor: required version in env name
* refactor: rename env_id function
* refactor: regex + function logic
* test: some more edge cases + error
* refactor: version max/comparison
- Move version max/comparison in a method
- Remove type ignore to improve type checking
* fix: failing tests & error introduced in rebasing
* refactor: simplify map and remove type ignore
* refactor: remove _is_lesser_version() method
* refactor: _versions() to return NamedTuples
* chore: remove minor changes
* Refactor registration EnvSpec and EnvSpecTree
* test: move tests from #2513 here
* fix: typing
* test: try to fix unregistered env
* refactor: change InitVar id name for typing
Changed InitVar id name to fix the following typing error:
error: Declaration "id" is obscured by a declaration of the same name
* refactor: return only the first difflib match
* test: improve tear down of added test env
* refactor: dataclass fields
* refactor: compile regex pattern only once
* refactor: `_assert_version_exists()`
`_assert_version_exists()` rewritten from @JesseFarebro:
https://github.com/openai/gym/pull/2535#discussion_r777573839
* refactor: latest_spec -> latest_versioned_spec
* fix: bug + typing + test
* Add default/versioned tests
* Fix Env field defaults
* feat: improve versioned/unversioned env handling
* Disallow versioned/unversioned registration/lookup
* test: remove warning + check default suggestion
Co-authored-by: Jesse Farebrother <jessefarebro@gmail.com>