Skip to content

Commit abeea95

Browse files
diegoferigo-raiexploy-bot
authored andcommitted
Update structure for better Python packaging (#74)
# Pull Request ### What change is being made Implements the Python-related changes described in #65. ### Why this change is being made Bring the repository in a state where packaging and distributing Python code is easier. ### Tested Waited CI to pass. GitOrigin-RevId: 4cbdaf3d68375ed690c7b66c63113866f507b760
1 parent ab4d9e4 commit abeea95

42 files changed

Lines changed: 138 additions & 118 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ dist/
1010
*.egg-info
1111
*.whl
1212

13+
# dynamic versioning
14+
python/**/_version.py
15+
1316
# IsaacLab & ONNX
1417
IsaacLab/
1518
*.onnx

.ruff.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Ruff configuration
44
line-length = 100
5+
src = ["python/"]
56
target-version = "py311"
67

78
[lint]
@@ -42,4 +43,5 @@ exclude = [
4243
".pixi",
4344
"IsaacLab",
4445
"*.egg-info",
46+
"python/**/_version.py",
4547
]

exploy/exporter/core/pyproject.toml

Lines changed: 0 additions & 15 deletions
This file was deleted.

exploy/exporter/frameworks/isaaclab/pyproject.toml

Lines changed: 0 additions & 20 deletions
This file was deleted.

pixi.lock

Lines changed: 27 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ruff = "*"
3232
pre-commit = "*"
3333

3434
[feature.python.pypi-dependencies]
35-
exploy-exporter-core = { path = "./exploy/exporter/core", editable = true }
35+
exploy = { path = ".", editable = true }
3636
build = "*"
3737

3838
[feature.python.tasks]
@@ -81,11 +81,11 @@ setup = { depends-on = ["configure"] }
8181
pytest = "*"
8282

8383
[feature.core.pypi-dependencies]
84-
exploy-exporter-core = { path = "./exploy/exporter/core", editable = true }
84+
exploy = { path = ".", editable = true }
8585
pytest-gitignore = "*"
8686

8787
[feature.core.tasks]
88-
test-python = "PYTHONPATH=$PIXI_PROJECT_ROOT:$PYTHONPATH pytest -s $PIXI_PROJECT_ROOT/exploy/exporter/core"
88+
test-python = "PYTHONPATH=$PIXI_PROJECT_ROOT:$PYTHONPATH pytest -s $PIXI_PROJECT_ROOT/python/exploy/exporter/core"
8989
test = { depends-on = ["test-python"] }
9090

9191
[feature.isaaclab.dependencies]
@@ -103,7 +103,7 @@ libglu = "*"
103103
extra-index-urls = ["https://pypi.nvidia.com"]
104104

105105
[feature.isaaclab.pypi-dependencies]
106-
exploy-frameworks-isaaclab = { path = "./exploy/exporter/frameworks/isaaclab", editable = true }
106+
exploy = { path = ".", editable = true }
107107
isaaclab = { version = ">=2,<3", extras = ["all"] }
108108
isaacsim = { extras = ["all", "extscache"], version = ">=5,<6" }
109109

@@ -115,7 +115,7 @@ export-isaaclab = { depends-on = ["export-isaaclab-g1"] }
115115
export-isaaclab-ci = "python examples/exporter_scripts/isaaclab/export_isaaclab.py --task Isaac-Velocity-Rough-G1-Play-v0"
116116
test-import = "python -c \"import isaaclab; print('Isaac Lab installed:', isaaclab.__file__)\""
117117
test-torch = "python -c \"import torch; print('CUDA available:', torch.cuda.is_available())\""
118-
test-python = "PYTHONPATH=$PIXI_PROJECT_ROOT:$PYTHONPATH pytest -s $PIXI_PROJECT_ROOT/exploy/exporter/frameworks/isaaclab/tests"
118+
test-python = "PYTHONPATH=$PIXI_PROJECT_ROOT:$PYTHONPATH pytest -s $PIXI_PROJECT_ROOT/python/exploy/exporter/frameworks/isaaclab/tests"
119119
test = { depends-on = ["test-python", "verify"] }
120120
verify = { depends-on = ["test-import", "test-torch"] }
121121

@@ -130,8 +130,7 @@ breathe = "*"
130130
myst-parser = "*"
131131

132132
[feature.docs.pypi-dependencies]
133-
exploy-exporter-core = { path = "./exploy/exporter/core", editable = true }
134-
exploy-frameworks-isaaclab = { path = "./exploy/exporter/frameworks/isaaclab", editable = true }
133+
exploy = { path = ".", editable = true }
135134

136135
[feature.docs.tasks]
137136
doxygen = "mkdir -p docs/_build/doxygen && doxygen Doxyfile"

pyproject.toml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Copyright (c) 2026 Robotics and AI Institute LLC dba RAI Institute. All rights reserved.
2+
[project]
3+
description = "EXport and dePLOY Reinforcement Learning policies."
4+
name = "exploy"
5+
requires-python = ">=3.11"
6+
7+
# Version is determined dynamically from git tags.
8+
dynamic = ["version"]
9+
10+
authors = [
11+
{ name = "Dario Bellicoso", email = "dbellicoso@rai-inst.com" },
12+
{ name = "Annika Wollschläger", email = "awollschlaeger@rai-inst.com" },
13+
]
14+
maintainers = [
15+
{ name = "Dario Bellicoso", email = "dbellicoso@rai-inst.com" },
16+
{ name = "Annika Wollschläger", email = "awollschlaeger@rai-inst.com" },
17+
]
18+
19+
license = { file = "LICENSE" }
20+
readme = "README.md"
21+
22+
classifiers = [
23+
"Framework :: Robot Framework",
24+
"Intended Audience :: Developers",
25+
"Intended Audience :: Science/Research",
26+
"Operating System :: POSIX :: Linux",
27+
"Programming Language :: Python :: 3 :: Only",
28+
"Programming Language :: Python :: 3.11",
29+
"Programming Language :: Python :: 3.12",
30+
"Programming Language :: Python :: 3.13",
31+
"Programming Language :: Python :: 3.14",
32+
"Programming Language :: Python :: Implementation :: CPython",
33+
"Topic :: Games/Entertainment :: Simulation",
34+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
35+
"Topic :: Scientific/Engineering :: Physics",
36+
"Topic :: Software Development",
37+
]
38+
keywords = [
39+
"controllers",
40+
"deploy",
41+
"export",
42+
"onnx",
43+
"policy",
44+
"rl",
45+
"robot",
46+
"robotics",
47+
"sim-to-real",
48+
"training",
49+
]
50+
51+
dependencies = [
52+
# Dependencies of the `exploy.core` subpackage.
53+
"numpy",
54+
"onnx",
55+
"onnxruntime",
56+
"torch",
57+
]
58+
59+
[project.optional-dependencies]
60+
all = ["exploy[isaaclab,style,testing]"]
61+
isaaclab = ["gymnasium", "isaaclab", "rsl-rl-lib", "torch"]
62+
style = ["flake8", "pre-commit", "ruff"]
63+
testing = ["pytest"]
64+
65+
[project.urls]
66+
Changelog = "https://github.com/bdaiinstitute/exploy/releases"
67+
Documentation = "https://bdaiinstitute.github.io/exploy"
68+
Source = "https://github.com/bdaiinstitute/exploy"
69+
Tracker = "https://github.com/bdaiinstitute/exploy/issues"
70+
71+
# ===========
72+
# Build tools
73+
# ===========
74+
75+
[build-system]
76+
build-backend = "hatchling.build"
77+
requires = ["hatchling", "hatch-vcs"]
78+
79+
[tool.hatch.version]
80+
source = "vcs"
81+
82+
[tool.hatch.version.raw-options]
83+
version_scheme = "no-guess-dev"
84+
85+
[tool.hatch.build.hooks.vcs]
86+
version-file = "python/exploy/_version.py"
87+
88+
[tool.hatch.build.targets.sdist]
89+
packages = ["python/exploy"]
90+
91+
[tool.hatch.build.targets.wheel]
92+
packages = ["python/exploy"]
93+
94+
[tool.hatch.metadata]
95+
allow-direct-references = true

exploy/exporter/frameworks/isaaclab/__init__.py renamed to python/exploy/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
# Copyright (c) 2026 Robotics and AI Institute LLC dba RAI Institute. All rights reserved.
2+
from ._version import __version__
3+
4+
__all__ = [
5+
"__version__",
6+
]

0 commit comments

Comments
 (0)