Skip to content
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
- name: Run black to test code linting
uses: psf/black@stable
with:
options: "--check --verbose --exclude 'prpl-mono|\\.venv|outputs'"
options: "--check --verbose --exclude 'third-party|\\.venv|outputs'"
jupyter: true
- name: Run isort to organize imports
uses: isort/isort-action@master
with:
configuration: "--skip prpl-mono --skip .venv --skip outputs --check-only"
configuration: "--skip third-party --skip .venv --skip outputs --check-only"
linting:
runs-on: ubuntu-latest
strategy:
Expand All @@ -36,7 +36,7 @@ jobs:
run: uv sync --all-extras --dev
- name: Lint
run: |
uv run pytest . --pylint -m pylint --pylint-rcfile=.pylintrc --ignore=prpl-mono --ignore=outputs
uv run pytest . --pylint -m pylint --pylint-rcfile=.pylintrc --ignore=third-party --ignore=outputs
static-type-checking:
runs-on: ubuntu-latest
strategy:
Expand All @@ -57,7 +57,7 @@ jobs:
run: uv sync --all-extras --dev
- name: Mypy
run: |
uv run mypy . --exclude prpl-mono --exclude outputs
uv run mypy . --exclude third-party --exclude outputs
unit-tests:
runs-on: ubuntu-latest
strategy:
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "prpl-mono"]
path = prpl-mono
url = https://github.com/Jaraxxus-Me/prpl-roboclaude
[submodule "third-party/kindergarden"]
path = third-party/kindergarden
url = https://github.com/Jaraxxus-Me/kindergarden
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ All environments are available as Hydra configs via `environment=<config_name>`.
| `obstruction3d_easy` | `kinder/Obstruction3D-o0-v0` | Easy (0 obstructions) |
| `obstruction3d_medium` | `kinder/Obstruction3D-o2-v0` | Medium (2 obstructions) |
| `obstruction3d_hard` | `kinder/Obstruction3D-o4-v0` | Hard (4 obstructions) |
| `shelf3d_easy` | `kinder/Shelf3D-o1-v0` | Easy (1 cube) |
| `shelf3d_medium` | `kinder/Shelf3D-o3-v0` | Medium (3 cubes) |
| `shelf3d_hard` | `kinder/Shelf3D-o5-v0` | Hard (5 cubes) |
| `shelf3d_easy` | `kinder/KinematicShelf3D-o1-v0` | Easy (1 cube) |
| `shelf3d_medium` | `kinder/KinematicShelf3D-o3-v0` | Medium (3 cubes) |
| `shelf3d_hard` | `kinder/KinematicShelf3D-o5-v0` | Hard (5 cubes) |
| `transport3d_easy` | `kinder/Transport3D-o1-v0` | Easy (1 cube) |
| `transport3d_hard` | `kinder/Transport3D-o2-v0` | Hard (2 cubes) |
| `packing3d_easy` | `kinder/Packing3D-p1-v0` | Easy (1 part) |
Expand Down
2 changes: 1 addition & 1 deletion experiments/conf/environment/shelf3d_easy.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
_target_: robocode.environments.kinder_geom3d_env.KinderGeom3DEnv
env_id: kinder/Shelf3D-o1-v0
env_id: kinder/KinematicShelf3D-o1-v0
2 changes: 1 addition & 1 deletion experiments/conf/environment/shelf3d_hard.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
_target_: robocode.environments.kinder_geom3d_env.KinderGeom3DEnv
env_id: kinder/Shelf3D-o5-v0
env_id: kinder/KinematicShelf3D-o5-v0
2 changes: 1 addition & 1 deletion experiments/conf/environment/shelf3d_medium.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
_target_: robocode.environments.kinder_geom3d_env.KinderGeom3DEnv
env_id: kinder/Shelf3D-o3-v0
env_id: kinder/KinematicShelf3D-o3-v0
1 change: 0 additions & 1 deletion prpl-mono
Submodule prpl-mono deleted from 650efc
15 changes: 4 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ dependencies = [
"hydra-core",
"hydra-joblib-launcher",
"omegaconf",
"relational-structs",
"prpl_utils",
"tomsgeoms2d",
"kinder[all]",
"pybullet_helpers",
"kindergarden[kinematic2d,kinematic3d,dynamic2d,dynamic3d]",
"pybullet",
"types-shapely",
"scipy-stubs",
"imageio",
Expand Down Expand Up @@ -65,14 +62,10 @@ wrap-descriptions = 88
strict_equality = true
disallow_untyped_calls = true
warn_unreachable = true
exclude = ["venv/*", ".venv/*", "outputs/*"]
exclude = ["venv/*", ".venv/*", "outputs/*", "third-party/*"]

[tool.uv.sources]
relational-structs = { path = "prpl-mono/relational-structs", editable = true }
prpl_utils = { path = "prpl-mono/prpl-utils", editable = true }
tomsgeoms2d = { path = "prpl-mono/toms-geoms-2d", editable = true }
kinder = { path = "prpl-mono/kinder", editable = true }
pybullet_helpers = { path = "prpl-mono/pybullet-helpers", editable = true }
kindergarden = { path = "third-party/kindergarden", editable = true }

[[tool.mypy.overrides]]
module = [
Expand Down
6 changes: 3 additions & 3 deletions run_autoformat.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
python -m black . --exclude 'prpl-mono|\.venv|outputs|multirun'
docformatter -i -r . --exclude venv .venv prpl-mono outputs multirun
isort . --skip .venv --skip prpl-mono --skip outputs --skip multirun
python -m black . --exclude 'third-party|\.venv|outputs|multirun'
docformatter -i -r . --exclude venv .venv third-party outputs multirun
isort . --skip .venv --skip third-party --skip outputs --skip multirun
4 changes: 2 additions & 2 deletions run_ci_checks.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
set -e
./run_autoformat.sh
mypy . --exclude prpl-mono --exclude outputs --exclude multirun --exclude 'src/robocode/mcp'
pytest . --pylint -m pylint --pylint-rcfile=.pylintrc --ignore=prpl-mono --ignore=outputs --ignore=multirun
mypy . --exclude third-party --exclude outputs --exclude multirun --exclude 'src/robocode/mcp'
pytest . --pylint -m pylint --pylint-rcfile=.pylintrc --ignore=third-party --ignore=outputs --ignore=multirun
pytest tests/ --ignore=tests/mcp
4 changes: 2 additions & 2 deletions src/robocode/environments/kinder_geom2d_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def env_description(self) -> str:
f"`KinderGeom2DEnv` is a thin wrapper. The underlying environment "
f"logic lives in the `kinder` package. To find the source files:\n\n"
f"```python\n"
f"import kinder.envs.geom2d\n"
f"print(kinder.envs.geom2d.__path__)\n"
f"import kinder.envs.kinematic2d\n"
f"print(kinder.envs.kinematic2d.__path__)\n"
f"```\n\n"
f"Key files in that directory:\n"
f"- `base_env.py` \u2014 `step()` transition dynamics and collision "
Expand Down
4 changes: 2 additions & 2 deletions src/robocode/environments/kinder_geom3d_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def env_description(self) -> str:
f"`KinderGeom3DEnv` is a thin wrapper. The underlying environment "
f"logic lives in the `kinder` package. To find the source files:\n\n"
f"```python\n"
f"import kinder.envs.geom3d\n"
f"print(kinder.envs.geom3d.__path__)\n"
f"import kinder.envs.kinematic3d\n"
f"print(kinder.envs.kinematic3d.__path__)\n"
f"```\n\n"
f"Key files in that directory:\n"
f"- `base_env.py` \u2014 `step()` transition dynamics and collision "
Expand Down
14 changes: 7 additions & 7 deletions src/robocode/oracles/clutteredstorage2d_medium/obs_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from dataclasses import dataclass

import numpy as np
from kinder.envs.geom2d.object_types import (
from kinder.envs.kinematic2d.object_types import (
CRVRobotType,
DoubleRectType,
Geom2DRobotEnvTypeFeatures,
Kinematic2DRobotEnvTypeFeatures,
RectangleType,
)
from kinder.envs.geom2d.utils import create_walls_from_world_boundaries
from kinder.envs.kinematic2d.utils import create_walls_from_world_boundaries
from numpy.typing import NDArray
from relational_structs import Object, ObjectCentricState

Expand Down Expand Up @@ -94,9 +94,9 @@
_BLOCK_OBJECTS = {name: Object(name, RectangleType) for name in BLOCK_NAMES}

_OBJECT_CENTRIC_TYPE_FEATURES = {
CRVRobotType: Geom2DRobotEnvTypeFeatures[CRVRobotType],
DoubleRectType: Geom2DRobotEnvTypeFeatures[DoubleRectType],
RectangleType: Geom2DRobotEnvTypeFeatures[RectangleType],
CRVRobotType: Kinematic2DRobotEnvTypeFeatures[CRVRobotType],
DoubleRectType: Kinematic2DRobotEnvTypeFeatures[DoubleRectType],
RectangleType: Kinematic2DRobotEnvTypeFeatures[RectangleType],
}


Expand Down Expand Up @@ -463,7 +463,7 @@ def extract_object_centric_state(obs: NDArray) -> ObjectCentricState:
min_dy=-0.05,
max_dy=0.05,
)
rect_features = Geom2DRobotEnvTypeFeatures[RectangleType]
rect_features = Kinematic2DRobotEnvTypeFeatures[RectangleType]
for wall_obj, wall_feat_dict in walls.items():
state_data[wall_obj] = np.array(
[float(wall_feat_dict[feat]) for feat in rect_features],
Expand Down
2 changes: 1 addition & 1 deletion src/robocode/oracles/pushpullhook2d/behaviors.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from typing import Callable

import numpy as np
from kinder.envs.geom2d.structs import SE2Pose
from kinder.envs.kinematic2d.structs import SE2Pose
from numpy.typing import NDArray

from robocode.oracles.pushpullhook2d.act_helpers import (
Expand Down
4 changes: 2 additions & 2 deletions src/robocode/primitives/crv_motion_planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import numpy as np
from kinder.core import RobotActionSpace
from kinder.envs.geom2d.object_types import DoubleRectType, RectangleType
from kinder.envs.geom2d.structs import MultiBody2D, SE2Pose, ZOrder
from kinder.envs.kinematic2d.object_types import DoubleRectType, RectangleType
from kinder.envs.kinematic2d.structs import MultiBody2D, SE2Pose, ZOrder
from kinder.envs.utils import (
BLACK,
crv_robot_to_multibody2d,
Expand Down
4 changes: 2 additions & 2 deletions src/robocode/primitives/crv_motion_planning_grasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from dataclasses import dataclass

import numpy as np
from kinder.envs.geom2d.object_types import RectangleType
from kinder.envs.geom2d.structs import MultiBody2D, SE2Pose
from kinder.envs.kinematic2d.object_types import RectangleType
from kinder.envs.kinematic2d.structs import MultiBody2D, SE2Pose
from kinder.envs.utils import rectangle_object_to_geom, state_2d_has_collision
from prpl_utils.utils import get_signed_angle_distance, wrap_angle
from relational_structs import Object, ObjectCentricState
Expand Down
6 changes: 3 additions & 3 deletions tests/environments/test_kinder_geom3d_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"kinder/Obstruction3D-o0-v0",
"kinder/Obstruction3D-o2-v0",
"kinder/Obstruction3D-o4-v0",
"kinder/Shelf3D-o1-v0",
"kinder/Shelf3D-o3-v0",
"kinder/Shelf3D-o5-v0",
"kinder/KinematicShelf3D-o1-v0",
"kinder/KinematicShelf3D-o3-v0",
"kinder/KinematicShelf3D-o5-v0",
"kinder/Transport3D-o1-v0",
"kinder/Transport3D-o2-v0",
"kinder/Packing3D-p1-v0",
Expand Down
10 changes: 5 additions & 5 deletions tests/primitives/test_crv_motion_planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from __future__ import annotations

import numpy as np
from kinder.envs.geom2d.object_types import (
from kinder.envs.kinematic2d.object_types import (
CRVRobotType,
Geom2DRobotEnvTypeFeatures,
Kinematic2DRobotEnvTypeFeatures,
RectangleType,
)
from relational_structs import Object, ObjectCentricState
Expand All @@ -26,8 +26,8 @@

_ROBOT = Object("robot", CRVRobotType)
_TYPE_FEATURES = {
CRVRobotType: Geom2DRobotEnvTypeFeatures[CRVRobotType],
RectangleType: Geom2DRobotEnvTypeFeatures[RectangleType],
CRVRobotType: Kinematic2DRobotEnvTypeFeatures[CRVRobotType],
RectangleType: Kinematic2DRobotEnvTypeFeatures[RectangleType],
}


Expand Down Expand Up @@ -86,7 +86,7 @@ def _state(
for name, (cx, cy, width, height) in (block_specs or {}).items():
data[Object(name, RectangleType)] = _rect_from_center(cx, cy, width, height)

rect_features = Geom2DRobotEnvTypeFeatures[RectangleType]
rect_features = Kinematic2DRobotEnvTypeFeatures[RectangleType]
walls = create_walls_from_world_boundaries(
WORLD_MIN_X,
WORLD_MAX_X,
Expand Down
10 changes: 5 additions & 5 deletions tests/primitives/test_crv_motion_planning_grasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from __future__ import annotations

import numpy as np
from kinder.envs.geom2d.object_types import (
from kinder.envs.kinematic2d.object_types import (
CRVRobotType,
Geom2DRobotEnvTypeFeatures,
Kinematic2DRobotEnvTypeFeatures,
RectangleType,
)
from relational_structs import Object, ObjectCentricState
Expand All @@ -27,8 +27,8 @@

_ROBOT = Object("robot", CRVRobotType)
_TYPE_FEATURES = {
CRVRobotType: Geom2DRobotEnvTypeFeatures[CRVRobotType],
RectangleType: Geom2DRobotEnvTypeFeatures[RectangleType],
CRVRobotType: Kinematic2DRobotEnvTypeFeatures[CRVRobotType],
RectangleType: Kinematic2DRobotEnvTypeFeatures[RectangleType],
}


Expand Down Expand Up @@ -73,7 +73,7 @@ def _state(
for name, (cx, cy, width, height) in (extra_blocks or {}).items():
data[Object(name, RectangleType)] = _rect_from_center(cx, cy, width, height)

rect_features = Geom2DRobotEnvTypeFeatures[RectangleType]
rect_features = Kinematic2DRobotEnvTypeFeatures[RectangleType]
walls = create_walls_from_world_boundaries(
WORLD_MIN_X,
WORLD_MAX_X,
Expand Down
6 changes: 0 additions & 6 deletions tests/utils/test_docker_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ def test_find_repo_root_has_pyproject() -> None:
assert (root / "pyproject.toml").exists()


def test_find_repo_root_has_prpl_mono() -> None:
"""_find_repo_root() returns a directory containing prpl-mono/."""
root = _find_repo_root()
assert (root / "prpl-mono").is_dir()


def test_setup_creates_sandbox_dir(tmp_path: Path) -> None:
"""_setup_sandbox_dir() creates the sandbox directory if absent."""
config = DockerSandboxConfig(sandbox_dir=tmp_path / "sandbox")
Expand Down
1 change: 1 addition & 0 deletions third-party/kindergarden
Submodule kindergarden added at e4f2c4
Loading