Skip to content

Commit 3fccc99

Browse files
authored
Adds support for underscore and hyphens in RL framework names (#566)
According to PIP, both`rl_games` and `rl-games` are valid PIP packages and are resolved similarly. This MR adds support for the different name conventions of PIP packages in the `setup.py` for the `omni.isaac.lab_tasks` extension. Fixes #547 ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have run all the tests with `./isaaclab.sh --test` and they pass - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
1 parent e28eeb7 commit 3fccc99

File tree

1 file changed

+6
-1
lines changed
  • source/extensions/omni.isaac.lab_tasks

1 file changed

+6
-1
lines changed

source/extensions/omni.isaac.lab_tasks/setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,18 @@
4444
"rsl-rl": ["rsl-rl@git+https://github.com/leggedrobotics/rsl_rl.git"],
4545
"robomimic": [],
4646
}
47+
# Add the names with hyphens as aliases for convenience
48+
EXTRAS_REQUIRE["rl_games"] = EXTRAS_REQUIRE["rl-games"]
49+
EXTRAS_REQUIRE["rsl_rl"] = EXTRAS_REQUIRE["rsl-rl"]
4750

4851
# Check if the platform is Linux and add the dependency
4952
if platform.system() == "Linux":
5053
EXTRAS_REQUIRE["robomimic"].append("robomimic@git+https://github.com/ARISE-Initiative/robomimic.git")
5154

52-
# cumulation of all extra-requires
55+
# Cumulation of all extra-requires
5356
EXTRAS_REQUIRE["all"] = list(itertools.chain.from_iterable(EXTRAS_REQUIRE.values()))
57+
# Remove duplicates in the all list to avoid double installations
58+
EXTRAS_REQUIRE["all"] = list(set(EXTRAS_REQUIRE["all"]))
5459

5560

5661
# Installation operation

0 commit comments

Comments
 (0)