Skip to content

Commit

Permalink
Check for callable entrypoint (#108)
Browse files Browse the repository at this point in the history
* long description content type

* fix callable entrypoint in doc generation

* fix pytest registry callable

* update pre-commit

* update isort

* fix callable entrypoint docs
  • Loading branch information
rodrigodelazcano committed Feb 10, 2023
1 parent 974392f commit b3fba54
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
15 changes: 8 additions & 7 deletions docs/scripts/gen_envs_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
# REWRITE: for new environments that don't include Fetch and Shadow Hand (D4RL)
# TODO: use same format for Fetch and Shadow Hand
# The environment entrypoints have the following standard: `gymnasium_robotics.envs.env_type.env_name:EnvName`
all_envs = [
env_spec.entry_point
for env_spec in gym.registry.values()
if env_spec.entry_point.startswith("gymnasium_robotics.envs")
and "MujocoPy"
not in env_spec.entry_point # Exclude Fetch and Shadow Hand environments
]
all_envs = []
for env_spec in gym.envs.registry.values():
if isinstance(env_spec.entry_point, str):
if (
env_spec.entry_point.startswith("gymnasium_robotics.envs")
and "MujocoPy" not in env_spec.entry_point
):
all_envs.append(env_spec) # Exclude Fetch and Shadow Hand environments
filtered_envs_by_type = {}
for entry_point in all_envs:
env_full_name = entry_point.split(":")
Expand Down
15 changes: 8 additions & 7 deletions docs/scripts/gen_gifs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@

# TODO: Add Fetch and Shadow Hand environments
# The environment entrypoints have the following standard: `gymnasium_robotics.envs.env_type.env_name:EnvName`
all_envs = [
env_spec
for env_spec in gym.registry.values()
if env_spec.entry_point.startswith("gymnasium_robotics.envs")
and "Mujoco"
not in env_spec.entry_point # Exclude Fetch and Shadow Hand environments
]
all_envs = []
for env_spec in gym.envs.registry.values():
if isinstance(env_spec.entry_point, str):
if (
env_spec.entry_point.startswith("gymnasium_robotics.envs")
and "MujocoPy" not in env_spec.entry_point
):
all_envs.append(env_spec) # Exclude Fetch and Shadow Hand environments

# Keep latest version of environments
filtered_envs_by_version = {}
Expand Down

0 comments on commit b3fba54

Please sign in to comment.