Skip to content

Commit 03a73b8

Browse files
committed
Allow Isaac Sim 6.1 bundled dependencies
1 parent 042e6f0 commit 03a73b8

10 files changed

Lines changed: 84 additions & 9 deletions

File tree

source/isaaclab/test/cli/test_wheel_builder_metadata.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
from pathlib import Path
1212

1313
import tomllib
14+
from packaging.requirements import Requirement
15+
from packaging.version import Version
1416

1517

1618
def _repo_root() -> Path:
@@ -39,6 +41,26 @@ def _rsl_rl_pin_from_setup() -> str:
3941
raise AssertionError("Could not find rsl-rl-lib pin in source/isaaclab_rl/setup.py")
4042

4143

44+
def _requirements_from_setup(package_name: str, extra_name: str, dependency_name: str) -> list[Requirement]:
45+
"""Return matching requirements from a source package extra."""
46+
setup_path = _repo_root() / f"source/{package_name}/setup.py"
47+
module = ast.parse(setup_path.read_text(encoding="utf-8"))
48+
49+
for node in module.body:
50+
if not isinstance(node, ast.Assign):
51+
continue
52+
if not any(isinstance(target, ast.Name) and target.id == "EXTRAS_REQUIRE" for target in node.targets):
53+
continue
54+
extras_require = ast.literal_eval(node.value)
55+
return [
56+
requirement
57+
for dependency in extras_require[extra_name]
58+
if (requirement := Requirement(dependency)).name == dependency_name
59+
]
60+
61+
raise AssertionError(f"Could not find EXTRAS_REQUIRE in {setup_path}")
62+
63+
4264
def test_wheel_builder_rsl_rl_pin_matches_source_package():
4365
"""The bundled wheel metadata must install the RSL-RL version required by training scripts."""
4466
expected_pin = _rsl_rl_pin_from_setup()
@@ -52,3 +74,40 @@ def test_wheel_builder_rsl_rl_pin_matches_source_package():
5274
for extra_name in ("rsl-rl", "rsl_rl", "all"):
5375
rsl_rl_pins = [dep for dep in dependencies_by_extra[extra_name] if dep.startswith("rsl-rl-lib==")]
5476
assert rsl_rl_pins == [expected_pin]
77+
78+
79+
def test_newton_requirements_support_isaac_sim_6_0_and_6_1():
80+
"""Newton extras must accept the releases bundled by Isaac Sim 6.0 and 6.1."""
81+
requirements = []
82+
for package_name, extra_names in {
83+
"isaaclab_newton": ("all",),
84+
"isaaclab_physx": ("newton",),
85+
"isaaclab_visualizers": ("newton", "rerun", "viser"),
86+
}.items():
87+
for extra_name in extra_names:
88+
requirements.extend(_requirements_from_setup(package_name, extra_name, "newton"))
89+
90+
packages_path = _repo_root() / "tools/wheel_builder/res/python_packages.toml"
91+
with packages_path.open("rb") as f:
92+
packages = tomllib.load(f)
93+
optional_dependencies = packages["isaaclab"]["pyproject"]["optional-dependencies"]["all"]
94+
dependencies_by_extra = {name: deps for entry in optional_dependencies for name, deps in entry.items()}
95+
requirements.extend(
96+
Requirement(dependency) for dependency in dependencies_by_extra["newton"] if dependency.startswith("newton[")
97+
)
98+
99+
assert len(requirements) == 6
100+
for requirement in requirements:
101+
assert Version("1.2.1") in requirement.specifier
102+
assert Version("1.5.0") in requirement.specifier
103+
assert Version("2.0.0") not in requirement.specifier
104+
105+
106+
def test_rl_games_aiohttp_requirement_supports_isaac_sim_6_0_and_6_1():
107+
"""RL-Games must not downgrade the aiohttp release bundled by Isaac Sim 6.1."""
108+
requirements = _requirements_from_setup("isaaclab_rl", "rl-games", "aiohttp")
109+
110+
assert len(requirements) == 1
111+
assert Version("3.13.3") in requirements[0].specifier
112+
assert Version("3.14.1") in requirements[0].specifier
113+
assert Version("4.0.0") not in requirements[0].specifier
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fixed
2+
^^^^^
3+
4+
* Allowed the Newton release bundled with Isaac Sim 6.1 to satisfy the optional dependency.

source/isaaclab_newton/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def run(self):
4040
"prettytable==3.3.0",
4141
"PyOpenGL-accelerate==3.1.10",
4242
"pyglet>=2.1.6,<3",
43-
"newton[sim]==1.2.1",
43+
"newton[sim]>=1.2.1,<2",
4444
],
4545
}
4646

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fixed
2+
^^^^^
3+
4+
* Allowed the Newton release bundled with Isaac Sim 6.1 to satisfy the optional dependency.

source/isaaclab_physx/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
EXTRAS_REQUIRE = {
2222
"newton": [
23-
"newton[sim]==1.2.1",
23+
"newton[sim]>=1.2.1,<2",
2424
],
2525
}
2626

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fixed
2+
^^^^^
3+
4+
* Allowed the aiohttp release bundled with Isaac Sim 6.1 to satisfy the RL-Games dependency.

source/isaaclab_rl/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"sb3": ["stable-baselines3>=2.6", "tqdm", "rich"], # tqdm/rich for progress bar
4949
"skrl": ["skrl>=2.1.0"],
5050
"rl-games": [
51-
"aiohttp==3.13.3",
51+
"aiohttp>=3.13.3,<4",
5252
"rl-games @ git+https://github.com/isaac-sim/rl_games.git@python3.11",
5353
"gym",
5454
"standard-distutils",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fixed
2+
^^^^^
3+
4+
* Allowed the Newton release bundled with Isaac Sim 6.1 to satisfy the visualizer dependencies.

source/isaaclab_visualizers/setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@
1818
# `newton @ git+...` while another declares `newton[sim] @ git+...`, the first
1919
# resolution wins and silently drops the `[sim]` extra. That breaks `isaaclab_newton`
2020
# at import time because `mujoco` / `mujoco-warp` go missing. So even the rerun/viser
21-
# extras — which don't use the MuJoCo solver directly — must pin `newton[sim]` to
22-
# stay consistent with `isaaclab_newton`.
21+
# extras — which don't use the MuJoCo solver directly — must use the same
22+
# `newton[sim]` range to stay consistent with `isaaclab_newton`.
2323
EXTRAS_REQUIRE = {
2424
"kit": [],
2525
"newton": [
2626
"warp-lang",
27-
"newton[sim]==1.2.1",
27+
"newton[sim]>=1.2.1,<2",
2828
"PyOpenGL-accelerate",
2929
"pyglet>=2.1.6,<3",
3030
"imgui-bundle>=1.92.601",
3131
"typing-extensions==4.12.2",
3232
"pydantic>=2.7,<2.12",
3333
],
3434
"rerun": [
35-
"newton[sim]==1.2.1",
35+
"newton[sim]>=1.2.1,<2",
3636
"rerun-sdk>=0.29.0",
3737
"pyarrow==23.0.1",
3838
],
3939
"viser": [
40-
"newton[sim]==1.2.1",
40+
"newton[sim]>=1.2.1,<2",
4141
"viser>=1.0.16",
4242
],
4343
}

tools/wheel_builder/res/python_packages.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pyproject.optional-dependencies.all = [
9595
# ================================================================================
9696
{ "newton" = [
9797
"warp-lang==1.13.0",
98-
"newton[sim]==1.2.1",
98+
"newton[sim]>=1.2.1,<2",
9999
"PyOpenGL-accelerate==3.1.10"
100100
] },
101101
# ================================================================================

0 commit comments

Comments
 (0)