* 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`
* Typing in gym/envs/registration.py
* Add registration to type checked list
* Adds type hints to space.py
* Typing in gym.core.Env
* Typing in seeding.py
* fixup Typing after rebase
* revert accidental change
* Install dependencies in pyright runner
* fix: can only install dependencies after checkout
* fix: install types in a venv
* fix path
* skip env activation, install directly from venv interpreter
* absolute path to venv
* use central python installation
* skip one more typecheck
* cleanup gh actions .yml
* Add py.typed to signal using sources for typechecking
* black!
Co-authored-by: sj_petterson <sj_petterson@gmail.com>
Co-authored-by: J K Terry <justinkterry@gmail.com>
* Make the seed in default initialization controllable
Since seed() is being called in default initialization of Space, it should be controllable for reproducibility.
* Updated derived classes of Space to have their seeds controllable at initialization.
* Allow Tuple's spaces to each have their own seed
* Added dict based seeding for Dict space; test cases for Tuple and Dict seeding
* Update discrete.py
* Update test_spaces.py
* Add seed to __init__()
* blacked
* Fix black
* Fix failing tests
* Allow custom observation spaces in VectorEnv
* Replace np.copy by deepcopy in reset of SyncVectorEnv
* Add tests for VectorEnv with custom spaces
* Add tests for shared memory and batches of custom spaces
* Remove unused import in VectorEnv test
* Add warning note in the Space class for custom spaces
* Updated spaces.py method description
No longer sampling from uniform distribution always, changing distribution
* update space.py sampling method description
The "strong random seed" defined in utils.seeding and used in environments
cannot be used to seed the action spaces (np.random.RandomState only
supports uint32 seeds).
For consistency, the same seeding procedure should be used everywhere.