Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix broken URL links #554

Merged
merged 1 commit into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gymnasium/experimental/wrappers/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ def __init__(self, env: gym.Env[ObsType, ActType]):

assert hasattr(
env, "action_space"
), "The environment must specify an action space. https://gymnasium.farama.org/content/environment_creation/"
), "The environment must specify an action space. https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/"
check_action_space(env.action_space)
assert hasattr(
env, "observation_space"
), "The environment must specify an observation space. https://gymnasium.farama.org/content/environment_creation/"
), "The environment must specify an observation space. https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/"
check_observation_space(env.observation_space)

self._checked_reset: bool = False
Expand Down
8 changes: 4 additions & 4 deletions gymnasium/utils/env_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def check_env(env: gym.Env, warn: bool = None, skip_render_check: bool = False):
This is an invasive function that calls the environment's reset and step.

This is particularly useful when using a custom environment.
Please take a look at https://gymnasium.farama.org/content/environment_creation/
Please take a look at https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/
for more information about the API.

Args:
Expand All @@ -275,7 +275,7 @@ def check_env(env: gym.Env, warn: bool = None, skip_render_check: bool = False):

assert isinstance(
env, gym.Env
), "The environment must inherit from the gymnasium.Env class. See https://gymnasium.farama.org/content/environment_creation/ for more info."
), "The environment must inherit from the gymnasium.Env class. See https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more info."

if env.unwrapped is not env:
logger.warn(
Expand All @@ -285,13 +285,13 @@ def check_env(env: gym.Env, warn: bool = None, skip_render_check: bool = False):
# ============= Check the spaces (observation and action) ================
assert hasattr(
env, "action_space"
), "The environment must specify an action space. See https://gymnasium.farama.org/content/environment_creation/ for more info."
), "The environment must specify an action space. See https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more info."
check_action_space(env.action_space)
check_space_limit(env.action_space, "action")

assert hasattr(
env, "observation_space"
), "The environment must specify an observation space. See https://gymnasium.farama.org/content/environment_creation/ for more info."
), "The environment must specify an observation space. See https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more info."
check_observation_space(env.observation_space)
check_space_limit(env.observation_space, "observation")

Expand Down
4 changes: 2 additions & 2 deletions gymnasium/wrappers/env_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ def __init__(self, env):

assert hasattr(
env, "action_space"
), "The environment must specify an action space. https://gymnasium.farama.org/content/environment_creation/"
), "The environment must specify an action space. https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/"
check_action_space(env.action_space)
assert hasattr(
env, "observation_space"
), "The environment must specify an observation space. https://gymnasium.farama.org/content/environment_creation/"
), "The environment must specify an observation space. https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/"
check_observation_space(env.observation_space)

self.checked_reset = False
Expand Down
6 changes: 3 additions & 3 deletions tests/utils/test_env_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,15 @@ def test_check_reset_options():
[
[
"Error",
"The environment must inherit from the gymnasium.Env class. See https://gymnasium.farama.org/content/environment_creation/ for more info.",
"The environment must inherit from the gymnasium.Env class. See https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more info.",
],
[
GenericTestEnv(action_space=None),
"The environment must specify an action space. See https://gymnasium.farama.org/content/environment_creation/ for more info.",
"The environment must specify an action space. See https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more info.",
],
[
GenericTestEnv(observation_space=None),
"The environment must specify an observation space. See https://gymnasium.farama.org/content/environment_creation/ for more info.",
"The environment must specify an observation space. See https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more info.",
],
],
)
Expand Down
4 changes: 2 additions & 2 deletions tests/wrappers/test_passive_env_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ def test_passive_checker_wrapper_warnings(env):
[
(
GenericTestEnv(action_space=None),
"The environment must specify an action space. https://gymnasium.farama.org/content/environment_creation/",
"The environment must specify an action space. https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/",
),
(
GenericTestEnv(action_space="error"),
"action space does not inherit from `gymnasium.spaces.Space`, actual type: <class 'str'>",
),
(
GenericTestEnv(observation_space=None),
"The environment must specify an observation space. https://gymnasium.farama.org/content/environment_creation/",
"The environment must specify an observation space. https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/",
),
(
GenericTestEnv(observation_space="error"),
Expand Down