mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-31 10:09:53 +00:00
* 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>