Repository navigation
Adds unit tests for isaac_autodata_core - #29
Conversation
|
@coderabbitai full review |
✅ Action performedFull review finished. |
njawale42
left a comment
There was a problem hiding this comment.
I have reviewed the resolutions to Stephan's comments. Lgtm!
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughPose transform composition and noise handling are updated. New unit tests cover algorithms, data generation, metadata, pooling, selection strategies, transforms, waypoint trajectories, and CI test-suite wiring. ChangesCore validation and transform coverage
Estimated code review effort: 3 (Moderate) | ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@isaac_autodata_tests/core/test_algorithms.py`:
- Around line 39-41: Update the `@pytest.mark.parametrize` decorator on
test_get_algorithm_no_kwargs to pass argnames as the tuple ("name", "cls")
instead of the comma-separated string "name, cls", keeping the existing
parameter values unchanged.
In `@isaac_autodata_tests/core/test_data_generator.py`:
- Around line 29-44: Add concrete return type annotations to
_MockDatastream.get_eef_names, get_subtasks, and get_task_constraints, using
types consistent with their returned values and the subtasks_by_eef structure,
so the mock interface satisfies Ruff ANN202.
In `@isaac_autodata_tests/core/test_selection_strategy.py`:
- Around line 42-45: Add an assertion to test_make_returns_registered_instance()
verifying that make_selection_strategy("nearest_neighbor_robot_distance")
returns an instance of its corresponding registered strategy class, covering the
third factory registration.
In `@isaac_autodata_tests/core/test_waypoint.py`:
- Around line 41-58: Add a regression test in the sequence-from-poses tests
using action_noise=torch.tensor(0.1) with multiple poses, asserting every
waypoint receives scalar noise. Update WaypointSequence.from_poses to detect
zero-dimensional tensor noise and broadcast or expand it to the trajectory
length before indexing, while preserving existing float and per-step tensor
behavior.
- Around line 173-203: Add content assertions to the three tests: in
test_trajectory_merge_without_bridge_concatenates, assert X positions are [0.0,
1.0]; in test_trajectory_merge_with_fixed_hold, assert they are [0.0, 1.0, 1.0,
1.0, 2.0]; and in test_trajectory_get_full_sequence_flattens, assert they are
[0.0, 1.0, 2.0], using each waypoint’s position data.
- Line 138: Annotate the nested helper function `_wp_x` with an explicit return
type, such as `-> float`, matching the value it returns and satisfying the
repository’s type-checking rules.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: d27f89c3-898c-4d84-966b-b10502a6db5f
📒 Files selected for processing (9)
isaac_autodata_core/transforms.pyisaac_autodata_tests/core/__init__.pyisaac_autodata_tests/core/test_algorithms.pyisaac_autodata_tests/core/test_data_generator.pyisaac_autodata_tests/core/test_datagen_info.pyisaac_autodata_tests/core/test_pool.pyisaac_autodata_tests/core/test_selection_strategy.pyisaac_autodata_tests/core/test_transforms.pyisaac_autodata_tests/core/test_waypoint.py
Summary
Adds unit tests for isaac_autodata_core classes and modules. Test included for:
Summary by CodeRabbit