Skip to content

v1: PreciseFlex: move the arm family into a brooks.precise_flex package#1099

Merged
BioCam merged 2 commits into
PyLabRobot:v1b1from
BioCam:brooks-precise-flex-package
Jun 22, 2026
Merged

v1: PreciseFlex: move the arm family into a brooks.precise_flex package#1099
BioCam merged 2 commits into
PyLabRobot:v1b1from
BioCam:brooks-precise-flex-package

Conversation

@BioCam

@BioCam BioCam commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

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 flat brooks/ 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 one PreciseFlexArmBackend, 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 named errors.py and PreciseFlexError (which reads ERROR_CODES) lives in it, so the table and the exception that consumes it sit together.

The package __init__ re-exports the public classes, so from pylabrobot.brooks.precise_flex import PreciseFlex400 and the pylabrobot.brooks exports 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

…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>
@BioCam BioCam force-pushed the brooks-precise-flex-package branch from b04d2f4 to bb3263e Compare June 22, 2026 11:07
@BioCam BioCam changed the title v1: PreciseFlex: move the device into a brooks.precise_flex package v1: PreciseFlex: move the arm family into a brooks.precise_flex package Jun 22, 2026
…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>
@BioCam BioCam merged commit 76a5774 into PyLabRobot:v1b1 Jun 22, 2026
@BioCam BioCam deleted the brooks-precise-flex-package branch June 22, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant