Port shared types to solver/datagen/types.py #1

Closed
opened 2026-02-02 19:31:49 +00:00 by forbes · 0 comments
Owner

Summary

Move shared data types from data/synthetic/pebble-game.py into solver/datagen/types.py.

Classes to port

  • JointType enum (L42-63) — CAD joint types with DOF-removal counts
  • RigidBody dataclass (L72-81) — body with position, orientation, local anchors
  • Joint dataclass (L85-99) — joint connecting two bodies with type, anchors, axis, pitch
  • PebbleState dataclass (L103-122) — pebble game internal state tracking
  • ConstraintAnalysis dataclass (L911-930) — combined analysis results

Requirements

  • Full type annotations on all fields
  • Preserve existing docstrings, clean up where needed
  • __all__ export list
  • No functional changes — pure data structures only
  • Imports: numpy, enum, dataclasses, typing

Notes

PebbleState is internal to the pebble game but including it here avoids circular imports. ConstraintAnalysis is the public-facing result type used by both the pebble game analysis and training data generation.

## Summary Move shared data types from `data/synthetic/pebble-game.py` into `solver/datagen/types.py`. ## Classes to port - `JointType` enum (L42-63) — CAD joint types with DOF-removal counts - `RigidBody` dataclass (L72-81) — body with position, orientation, local anchors - `Joint` dataclass (L85-99) — joint connecting two bodies with type, anchors, axis, pitch - `PebbleState` dataclass (L103-122) — pebble game internal state tracking - `ConstraintAnalysis` dataclass (L911-930) — combined analysis results ## Requirements - [ ] Full type annotations on all fields - [ ] Preserve existing docstrings, clean up where needed - [ ] `__all__` export list - [ ] No functional changes — pure data structures only - [ ] Imports: `numpy`, `enum`, `dataclasses`, `typing` ## Notes `PebbleState` is internal to the pebble game but including it here avoids circular imports. `ConstraintAnalysis` is the public-facing result type used by both the pebble game analysis and training data generation.
forbes added the phase:1port labels 2026-02-02 19:31:49 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/solver#1