From 7e885597633bd7d9730ddf7c9524fda5d960ecb9 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Sun, 4 Dec 2022 22:24:02 +0800 Subject: [PATCH] Update and rerun `pre-commit` hooks for better code quality (#179) --- .github/ISSUE_TEMPLATE/question.yml | 11 +- .github/PULL_REQUEST_TEMPLATE.md | 1 + .github/stale.yml | 2 +- .github/workflows/build-docs.yml | 2 +- .github/workflows/docs-manual-versioning.yml | 2 +- .github/workflows/docs-versioning.yml | 2 +- .gitignore | 4 + .pre-commit-config.yaml | 40 +++-- CODE_OF_CONDUCT.rst | 1 - CONTRIBUTING.md | 33 ++-- README.md | 5 - docs/.gitignore | 2 +- docs/_static/img/github_icon.svg | 2 +- docs/api/env.md | 12 +- docs/api/experimental.md | 33 ++-- docs/api/experimental/functional.md | 2 +- docs/api/experimental/wrappers.md | 2 +- docs/api/registry.md | 5 +- docs/api/spaces.md | 8 +- docs/api/spaces/composite.md | 6 +- docs/api/spaces/fundamental.md | 10 +- docs/api/spaces/utils.md | 2 +- docs/api/spaces/vector_utils.md | 2 +- docs/api/utils.md | 6 +- docs/api/wrappers.md | 158 +++++++++--------- docs/api/wrappers/action_wrappers.md | 2 +- docs/api/wrappers/misc_wrappers.md | 1 + docs/conf.py | 1 + docs/content/basic_usage.md | 16 +- docs/content/migration-guide.md | 2 + docs/environments/atari.md | 9 +- docs/environments/atari/adventure.md | 24 ++- docs/environments/atari/air_raid.md | 27 +-- docs/environments/atari/alien.md | 28 ++-- docs/environments/atari/amidar.md | 27 +-- docs/environments/atari/assault.md | 24 ++- docs/environments/atari/asterix.md | 29 ++-- docs/environments/atari/asteroids.md | 30 ++-- docs/environments/atari/atlantis.md | 26 ++- docs/environments/atari/bank_heist.md | 29 ++-- docs/environments/atari/battle_zone.md | 28 ++-- docs/environments/atari/beam_rider.md | 27 +-- docs/environments/atari/berzerk.md | 26 ++- docs/environments/atari/bowling.md | 28 ++-- docs/environments/atari/boxing.md | 27 ++- docs/environments/atari/breakout.md | 27 ++- docs/environments/atari/carnival.md | 28 ++-- docs/environments/atari/centipede.md | 27 +-- docs/environments/atari/chopper_command.md | 24 ++- docs/environments/atari/crazy_climber.md | 31 ++-- docs/environments/atari/defender.md | 28 ++-- docs/environments/atari/demon_attack.md | 28 +++- docs/environments/atari/double_dunk.md | 28 +++- docs/environments/atari/elevator_action.md | 28 +++- docs/environments/atari/enduro.md | 30 ++-- docs/environments/atari/fishing_derby.md | 31 ++-- docs/environments/atari/freeway.md | 34 ++-- docs/environments/atari/frostbite.md | 34 ++-- docs/environments/atari/gopher.md | 34 ++-- docs/environments/atari/gravitar.md | 34 ++-- docs/environments/atari/hero.md | 28 ++-- docs/environments/atari/ice_hockey.md | 26 ++- docs/environments/atari/jamesbond.md | 26 ++- docs/environments/atari/journey_escape.md | 27 ++- docs/environments/atari/kangaroo.md | 26 ++- docs/environments/atari/krull.md | 26 ++- docs/environments/atari/kung_fu_master.md | 21 ++- docs/environments/atari/montezuma_revenge.md | 21 ++- docs/environments/atari/ms_pacman.md | 24 ++- docs/environments/atari/name_this_game.md | 18 +- docs/environments/atari/phoenix.md | 19 ++- docs/environments/atari/pitfall.md | 22 ++- docs/environments/atari/pong.md | 27 +-- docs/environments/atari/pooyan.md | 28 ++-- docs/environments/atari/private_eye.md | 26 ++- docs/environments/atari/qbert.md | 28 ++-- docs/environments/atari/riverraid.md | 30 ++-- docs/environments/atari/road_runner.md | 26 ++- docs/environments/atari/robotank.md | 32 ++-- docs/environments/atari/seaquest.md | 28 +++- docs/environments/atari/skiing.md | 28 +++- docs/environments/atari/solaris.md | 22 ++- docs/environments/atari/space_invaders.md | 22 ++- docs/environments/atari/star_gunner.md | 21 ++- docs/environments/atari/tennis.md | 22 ++- docs/environments/atari/time_pilot.md | 26 +-- docs/environments/atari/tutankham.md | 21 ++- docs/environments/atari/up_n_down.md | 27 ++- docs/environments/atari/venture.md | 21 ++- docs/environments/atari/video_pinball.md | 21 ++- docs/environments/atari/wizard_of_wor.md | 21 ++- docs/environments/atari/zaxxon.md | 19 ++- docs/environments/mujoco.md | 2 +- docs/environments/third_party_environments.md | 49 +++++- docs/index.md | 1 - docs/requirements.txt | 2 +- docs/scripts/gen_envs_display.py | 1 + docs/scripts/gen_gifs.py | 3 +- docs/scripts/gen_mds.py | 3 +- docs/scripts/move_404.py | 1 + docs/tutorials/blackjack_tutorial.py | 1 + docs/tutorials/reinforce_invpend_gym_v26.py | 1 + gymnasium/core.py | 1 + gymnasium/envs/__init__.py | 1 + gymnasium/envs/box2d/bipedal_walker.py | 1 + gymnasium/envs/box2d/car_dynamics.py | 1 + gymnasium/envs/box2d/car_racing.py | 1 + gymnasium/envs/box2d/lunar_lander.py | 1 + gymnasium/envs/classic_control/acrobot.py | 1 + gymnasium/envs/classic_control/pendulum.py | 1 + gymnasium/envs/mujoco/ant_v3.py | 1 + gymnasium/envs/mujoco/ant_v4.py | 1 + gymnasium/envs/mujoco/assets/humanoid.xml | 0 .../envs/mujoco/assets/humanoidstandup.xml | 0 .../assets/inverted_double_pendulum.xml | 2 +- .../envs/mujoco/assets/inverted_pendulum.xml | 2 +- gymnasium/envs/mujoco/assets/pusher.xml | 6 +- gymnasium/envs/mujoco/half_cheetah_v3.py | 1 + gymnasium/envs/mujoco/half_cheetah_v4.py | 1 + gymnasium/envs/mujoco/hopper_v3.py | 1 + gymnasium/envs/mujoco/hopper_v4.py | 1 + gymnasium/envs/mujoco/humanoid_v3.py | 1 + gymnasium/envs/mujoco/humanoid_v4.py | 1 + gymnasium/envs/mujoco/humanoidstandup_v4.py | 1 + .../mujoco/inverted_double_pendulum_v4.py | 1 + gymnasium/envs/mujoco/inverted_pendulum_v4.py | 1 + gymnasium/envs/mujoco/mujoco_env.py | 1 + gymnasium/envs/mujoco/pusher_v4.py | 1 + gymnasium/envs/mujoco/reacher_v4.py | 1 + gymnasium/envs/mujoco/swimmer_v3.py | 1 + gymnasium/envs/mujoco/walker2d_v3.py | 1 + gymnasium/envs/mujoco/walker2d_v4.py | 1 + gymnasium/envs/phys2d/cartpole.py | 1 + gymnasium/envs/phys2d/pendulum.py | 1 + gymnasium/envs/registration.py | 4 +- gymnasium/envs/toy_text/cliffwalking.py | 1 + gymnasium/envs/toy_text/frozen_lake.py | 1 + gymnasium/envs/toy_text/taxi.py | 1 + gymnasium/experimental/__init__.py | 1 + gymnasium/experimental/functional.py | 1 + .../experimental/wrappers/torch_to_jax.py | 1 + gymnasium/logger.py | 1 + gymnasium/spaces/__init__.py | 1 + gymnasium/spaces/space.py | 1 + gymnasium/spaces/text.py | 1 + gymnasium/utils/play.py | 1 + gymnasium/utils/save_video.py | 1 + gymnasium/utils/step_api_compatibility.py | 1 + gymnasium/vector/__init__.py | 1 + gymnasium/vector/async_vector_env.py | 1 + gymnasium/vector/sync_vector_env.py | 1 + gymnasium/vector/utils/__init__.py | 1 + gymnasium/vector/utils/misc.py | 1 + gymnasium/vector/utils/numpy_utils.py | 1 + gymnasium/vector/utils/shared_memory.py | 1 + gymnasium/vector/utils/spaces.py | 1 + gymnasium/vector/vector_env.py | 1 + gymnasium/wrappers/atari_preprocessing.py | 1 + gymnasium/wrappers/compatibility.py | 1 + gymnasium/wrappers/pixel_observation.py | 1 + pyproject.toml | 26 +-- requirements.txt | 2 +- tests/envs/test_envs.py | 1 + tests/envs/test_mujoco.py | 13 +- tests/envs/test_pprint_registry.py | 3 +- .../experimental/wrappers/test_clip_action.py | 1 + .../wrappers/test_delay_observation.py | 1 + .../wrappers/test_lambda_action.py | 1 + .../wrappers/test_lambda_observation.py | 1 + .../wrappers/test_lambda_rewards.py | 1 + .../wrappers/test_rescale_action.py | 1 + .../wrappers/test_sticky_action.py | 1 + .../wrappers/test_time_aware_observation.py | 1 + tests/spaces/test_space.py | 1 + tests/spaces/test_spaces.py | 1 + tests/spaces/test_utils.py | 1 + tests/spaces/utils.py | 1 + tests/test_core.py | 1 + tests/utils/test_play.py | 1 + tests/vector/test_shared_memory.py | 1 + tests/vector/test_spaces.py | 1 + tests/vector/test_vector_env_info.py | 1 + tests/vector/utils.py | 1 + tests/wrappers/test_frame_stack.py | 1 + tests/wrappers/test_vector_list_info.py | 1 + 185 files changed, 1423 insertions(+), 762 deletions(-) mode change 100755 => 100644 gymnasium/envs/mujoco/assets/humanoid.xml mode change 100755 => 100644 gymnasium/envs/mujoco/assets/humanoidstandup.xml diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml index 6a504fc6d..9725bc4cd 100644 --- a/.github/ISSUE_TEMPLATE/question.yml +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -6,13 +6,12 @@ body: - type: markdown attributes: value: > - If you're a beginner and have basic questions, please ask on - [r/reinforcementlearning](https://www.reddit.com/r/reinforcementlearning/) or in the - [RL Discord](https://discord.com/invite/xhfNqQv) (if you're new please use the beginners channel). - Basic questions that are not bugs or feature requests will be closed without reply, because GitHub - issues are not an appropriate venue for these. Advanced/nontrivial questions, especially in areas where + If you're a beginner and have basic questions, please ask on + [r/reinforcementlearning](https://www.reddit.com/r/reinforcementlearning/) or in the + [RL Discord](https://discord.com/invite/xhfNqQv) (if you're new please use the beginners channel). + Basic questions that are not bugs or feature requests will be closed without reply, because GitHub + issues are not an appropriate venue for these. Advanced/nontrivial questions, especially in areas where documentation is lacking, are very much welcome. - - type: textarea id: question attributes: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 996c690ec..df1dcee92 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,6 +14,7 @@ Please delete options that are not relevant. - [ ] This change requires a documentation update ### Screenshots + Please attach before and after screenshots of the change if applicable.