v1: PreciseFlex: move the arm family into a brooks.precise_flex package#1099
Merged
Conversation
…ackage Restructure only - no behaviour change. Moves the entire PreciseFlex arm family into a `brooks/precise_flex/` package, matching how pylabrobot organises other manufacturers as manufacturer/<device> packages (thermo_fisher/multidrop_combi, ufactory/xarm6, inheco/scila); the flat `brooks/` was the outlier. Every PreciseFlex arm (PF400, PF3400, and the c-series / direct-drive / rail variants) runs the same Guidance/TCS controller and shares the bulk of this driver, so the family lives in one package: separate device classes (`PreciseFlex400`, `PreciseFlex3400`, ...) over one `PreciseFlexArmBackend`, differing only in kinematics and gripper. Everything PreciseFlex moves in - the device classes/driver (`precise_flex`), `kinematics`, `confirmed_firmware_versions`, the controller modules (`tcs_modules`, `error_codes`, `data_ids`), the tests, and the notebook - because the PreciseFlex line is the only user of the Guidance/TCS controller. `brooks/` is left as the manufacturer namespace holding the one package. The package `__init__` re-exports the public classes, so `from pylabrobot.brooks.precise_flex import PreciseFlex400` and the `pylabrobot.brooks` exports are unchanged. Done as `git mv`, so history is preserved (the diff is renames + import-path updates + the new `__init__`). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
b04d2f4 to
bb3263e
Compare
PreciseFlex: move the device into a brooks.precise_flex packagePreciseFlex: move the arm family into a brooks.precise_flex package
…reciseFlexError` `errors.py` is the codebase convention for a backend's error module - the Hamilton STAR `errors.py` holds both the error-code tables and the exception classes. This renames the PreciseFlex code-table module from `error_codes.py` to `errors.py` and moves `PreciseFlexError` (which reads `ERROR_CODES`) into it, so the table and the exception that consumes it live together. No behaviour change. The public import paths are unchanged: `PreciseFlexError` is still re-exported from the package `__init__` and remains importable from `precise_flex`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restructure only, no behaviour change. Moves the entire PreciseFlex arm family into a
brooks/precise_flex/package, matching how pylabrobot organises other manufacturers - manufacturer/<device>packages (thermo_fisher/multidrop_combi,ufactory/xarm6,inheco/scila). The flatbrooks/was the outlier.Why the family lives in one package: every PreciseFlex arm (PF400, PF3400, and the c-series / direct-drive / rail variants) runs the same Guidance/TCS controller and speaks the same GPL command protocol, DataIDs, and error codes, so they share the bulk of the driver. They are separate device classes (
PreciseFlex400,PreciseFlex3400, …) over onePreciseFlexArmBackend, differing only in kinematics (per geometry) and gripper - so grouping by the shared controller keeps that common driver in one place rather than duplicated per model.Everything PreciseFlex moves into the package - the device classes/driver (
precise_flex),kinematics,confirmed_firmware_versions, the controller modules (tcs_modules,errors,data_ids), the tests, and the notebook - because the PreciseFlex line is the only user of the Guidance/TCS controller.brooks/is left as the manufacturer namespace holding the one package; a future, genuinely different Brooks device family would get its own sibling package.The error module follows the codebase convention: like the Hamilton STAR
errors.py, which holds both the error-code tables and the exception classes, the PreciseFlex code-table module is namederrors.pyandPreciseFlexError(which readsERROR_CODES) lives in it, so the table and the exception that consumes it sit together.The package
__init__re-exports the public classes, sofrom pylabrobot.brooks.precise_flex import PreciseFlex400and thepylabrobot.brooksexports are unchanged - no call sites change.Done as
git mv, so history is preserved (the diff is renames + import-path updates + the new__init__).Tests: the existing PreciseFlex suite, unchanged, now at
pylabrobot/brooks/precise_flex/precise_flex_tests.py.🤖 Generated with Claude Code