Skip to content

Commit

Permalink
Confirm in testing that Gymnasium v0.28 and v0.29.1 are pass the testing
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts committed Aug 9, 2024
1 parent 6a09d2d commit 3ef5ad3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
37 changes: 18 additions & 19 deletions highway_env/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import os
import sys

import gymnasium as gym
from gymnasium.envs.registration import register


__version__ = "1.9.0"
__version__ = "2.0.0"

try:
from farama_notifications import notifications
Expand All @@ -25,94 +24,94 @@ def _register_highway_envs():
from highway_env.envs.common.abstract import MultiAgentWrapper

# exit_env.py
gym.register(
register(
id="exit-v0",
entry_point="highway_env.envs.exit_env:ExitEnv",
)

# highway_env.py
gym.register(
register(
id="highway-v0",
entry_point="highway_env.envs.highway_env:HighwayEnv",
)

gym.register(
register(
id="highway-fast-v0",
entry_point="highway_env.envs.highway_env:HighwayEnvFast",
)

# intersection_env.py
gym.register(
register(
id="intersection-v0",
entry_point="highway_env.envs.intersection_env:IntersectionEnv",
)

gym.register(
register(
id="intersection-v1",
entry_point="highway_env.envs.intersection_env:ContinuousIntersectionEnv",
)

gym.register(
register(
id="intersection-multi-agent-v0",
entry_point="highway_env.envs.intersection_env:MultiAgentIntersectionEnv",
)

gym.register(
register(
id="intersection-multi-agent-v1",
entry_point="highway_env.envs.intersection_env:MultiAgentIntersectionEnv",
additional_wrappers=(MultiAgentWrapper.wrapper_spec(),),
)

# lane_keeping_env.py
gym.register(
register(
id="lane-keeping-v0",
entry_point="highway_env.envs.lane_keeping_env:LaneKeepingEnv",
max_episode_steps=200,
)

# merge_env.py
gym.register(
register(
id="merge-v0",
entry_point="highway_env.envs.merge_env:MergeEnv",
)

# parking_env.py
gym.register(
register(
id="parking-v0",
entry_point="highway_env.envs.parking_env:ParkingEnv",
)

gym.register(
register(
id="parking-ActionRepeat-v0",
entry_point="highway_env.envs.parking_env:ParkingEnvActionRepeat",
)

gym.register(
register(
id="parking-parked-v0",
entry_point="highway_env.envs.parking_env:ParkingEnvParkedVehicles",
)

# racetrack_env.py
gym.register(
register(
id="racetrack-v0",
entry_point="highway_env.envs.racetrack_env:RacetrackEnv",
)

# roundabout_env.py
gym.register(
register(
id="roundabout-v0",
entry_point="highway_env.envs.roundabout_env:RoundaboutEnv",
)

# two_way_env.py
gym.register(
register(
id="two-way-v0",
entry_point="highway_env.envs.two_way_env:TwoWayEnv",
max_episode_steps=15,
)

# u_turn_env.py
gym.register(id="u-turn-v0", entry_point="highway_env.envs.u_turn_env:UTurnEnv")
register(id="u-turn-v0", entry_point="highway_env.envs.u_turn_env:UTurnEnv")


_register_highway_envs()
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ setup_requires=
pytest-runner
install_requires=
farama-notifications
gymnasium>=0.27
gymnasium>=0.28
numpy
pygame>=2.0.2
matplotlib
Expand Down
2 changes: 1 addition & 1 deletion tests/envs/test_gym.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_highway_api(env_id):
for warning in caught_warnings:
if "is different from the unwrapped version" in warning.message.args[0]:
continue
if warning.message.args[0] not in CHECK_ENV_IGNORE_WARNINGS:
elif warning.message.args[0] not in CHECK_ENV_IGNORE_WARNINGS:
raise gym.error.Error(f"Unexpected warning: {warning.message}")


Expand Down

0 comments on commit 3ef5ad3

Please sign in to comment.