Commit Graph

17 Commits

Author SHA1 Message Date
Mark Towers
52b6878618 Pre commit autoupdate (#1082) 2024-06-10 17:07:47 +01:00
Ariel Kwiatkowski
e9c66e4225 Change autoreset order (#808)
Co-authored-by: pseudo-rnd-thoughts <mark.m.towers@gmail.com>
2023-12-03 19:50:18 +01:00
Mark Towers
27f8e85051 Merge v1.0.0 (#682)
Co-authored-by: Kallinteris Andreas <30759571+Kallinteris-Andreas@users.noreply.github.com>
Co-authored-by: Jet <38184875+jjshoots@users.noreply.github.com>
Co-authored-by: Omar Younis <42100908+younik@users.noreply.github.com>
2023-11-07 13:27:25 +00:00
Mark Towers
8589523a77 Change import gymnasium to import gymnasium as gym (#20) 2022-09-16 23:41:27 +01:00
pseudo-rnd-thoughts
640c509109 Rename to gymnasium 2022-09-08 10:10:07 +01:00
Mark Towers
ab3e02db83 Reduce the number of unexpected warnings during testing (#3050)
* Initial commit

* Remove unnecessary `warnings.simplefilters`

* Fix tests for new step API

* Fix testing

Co-authored-by: Markus28 <montcyril@gmail.com>
2022-08-30 14:47:26 -04:00
Arjun KG
54b406b799 Support only new step API (while retaining compatibility functions) (#3019) 2022-08-30 10:11:59 -04:00
John Balis
3a8daafce1 Removing return_info argument to env.reset() and deprecated env.seed() function (reset now always returns info) (#2962)
* removed return_info, made info dict mandatory in reset

* tenatively removed deprecated seed api for environments

* added more info type checks to wrapper tests

* formatting/style compliance

* addressed some comments

* polish to address review

* fixed tests after merge, and added a test of the return_info deprecation assertion if found in reset signature

* some organization of env_checker tests, reverted a probably merge error

* added deprecation check for seed function in env

* updated docstring

* removed debug prints, tweaked test_check_seed_deprecation

* changed return_info deprecation check from assertion to warning

* fixes to vector envs, now  should be correctly structured

* added some explanation and typehints for mockup depcreated return info reset function

* re-removed seed function from vector envs

* added explanation to _reset_return_info_type and changed the return statement
2022-08-23 11:09:54 -04:00
Mark Towers
a8d4dd7b14 Add testing for step api compatibility functions and wrapper (#3028)
* Initial commit

* Fixed tests and forced TimeLimit.truncated to always exist when truncated or terminated

* Fix CI issues

* pre-commit

* Revert back to old language

* Revert changes to step api wrapper
2022-08-18 10:25:46 -04:00
Arjun KG
907b1b20dd New Step API with terminated, truncated bools instead of done (#2752) 2022-07-09 16:48:06 -04:00
Mark Towers
ffbf971171 Rewrite env tests (#2867) 2022-06-16 09:29:13 -04:00
Mark Towers
1c62d3c6ad Add Pydocstyle to CI (#2785)
* Added pydocstyle to pre-commit

* Added docstrings for tests and updated the tests for autoreset

* Add pydocstyle exclude folder to allow slowly adding new docstrings

* Add docstrings for setup.py and gym/__init__.py, core.py, error.py and logger.py

* Check that all unwrapped environment are of a particular wrapper type

* Reverted back to import gym.spaces.Space to gym.spaces

* Fixed the __init__.py docstring

* Fixed autoreset autoreset test

* Updated gym __init__.py top docstring

* Remove unnecessary import

* Removed "unused error" and make APIerror deprecated at gym 1.0

* Add pydocstyle description to CONTRIBUTING.md

* Added docstrings section to CONTRIBUTING.md

* Added :meth: and :attr: keywords to docstrings

* Added :meth: and :attr: keywords to docstrings

* Update the step docstring placing the return type in the as a note.

* Updated step return type to include each element

* Update maths notation to reward range

* Fixed infinity maths notation
2022-05-10 10:35:45 -04:00
Mark Towers
bf093c6890 Update the flake8 pre-commit ignores (#2778)
* Remove additional ignores from flake8

* Remove all unused imports

* Remove all unused imports

* Update flake8 and pyupgrade

* F841, removed unused variables

* E731, removed lambda assignment to variables

* Remove E731, F403, F405, F524

* Remove E722, bare exceptions

* Remove E712, compare variable == True or == False to is True or is False

* Remove E402, module level import not at top of file

* Added --pre-file-ignores

* Add --per-file-ignores removing E741, E302 and E704

* Add E741, do not use variables named ‘l’, ‘O’, or ‘I’ to ignore issues in classic control

* Fixed issues for pytest==6.2

* Remove unnecessary # noqa

* Edit comment with the removal of E302

* Added warnings and declared module, attr for pyright type hinting

* Remove unused import

* Removed flake8 E302

* Updated flake8 from 3.9.2 to 4.0.1

* Remove unused variable
2022-04-26 11:18:37 -04:00
Mark Towers
b7179241ec Update the parametrize to show the ids of the specification to make debugging easier (#2740) 2022-04-10 13:36:23 -04:00
John Balis
d4cda255ea AutoResetWrapper integration with gym.make() (#2728)
* added autoreset wrapper and tests

* added basic inline documentation for autoreset wrapper

* changes to comply with flake8 style

* redid autoreset wrapper

* compliance with flake8

* added final_info to info

* removed unnecessary override from autoreset wrapper

* fixed ordering mistake

* fixed flake8 compliance

* improved clarify of inline documentation

* changes to address code review

* changed autoreset terminal state keys, added message to key overlap check assert statement, updated autoreset wrapper docstring

* auto-reset integration draft

* changed arg name to autoreset for consistency

* pre commit compliance

* formatting compliance

* addressed code review

* removed commented out line
2022-04-08 10:54:49 -04:00
Andrea PIERRÉ
e913bc81b8 Improve pre-commit workflow (#2602)
* feat: add `isort` to `pre-commit`

* ci: skip `__init__.py` file for `isort`

* ci: make `isort` mandatory in lint pipeline

* docs: add a section on Git hooks

* ci: check isort diff

* fix: isort from master branch

* docs: add pre-commit badge

* ci: update black + bandit versions

* feat: add PR template

* refactor: PR template

* ci: remove bandit

* docs: add Black badge

* ci: try to remove all `|| true` statements

* ci: remove lint_python job

- Remove `lint_python` CI job
- Move `pyupgrade` job to `pre-commit` workflow

* fix: avoid messing with typing

* docs: add a note on running `pre-cpmmit` manually

* ci: apply `pre-commit` to the whole codebase
2022-03-31 15:50:38 -04:00
John Balis
05df86e104 autoreset wrapper (#2650)
* added autoreset wrapper and tests

* added basic inline documentation for autoreset wrapper

* changes to comply with flake8 style

* redid autoreset wrapper

* compliance with flake8

* added final_info to info

* removed unnecessary override from autoreset wrapper

* fixed ordering mistake

* fixed flake8 compliance

* improved clarify of inline documentation

* changes to address code review

* changed autoreset terminal state keys, added message to key overlap check assert statement, updated autoreset wrapper docstring
2022-03-25 13:20:02 -04:00