-
Notifications
You must be signed in to change notification settings - Fork 120
remove Liquid tracking from volume tracker, delete contamination tracker #744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request removes liquid tracking from the volume tracker and deletes the cross-contamination tracker, simplifying the API to track only volumes instead of individual liquids with their types.
Key Changes:
- Refactored
VolumeTrackerto track simple volume values instead of lists of liquid tuples - Removed all cross-contamination tracking functionality and associated helper functions
- Updated API surface with new methods (
set_volume,set_well_volumes) while deprecating old methods (set_liquids,set_well_liquids)
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
pylabrobot/resources/volume_tracker.py |
Core refactoring: replaced liquid tracking with simple volume tracking; removed cross-contamination functionality; added deprecation warnings for old API |
pylabrobot/resources/well.py |
Added set_volume method; deprecated set_liquids with warning |
pylabrobot/resources/tube.py |
Added set_volume method; deprecated set_liquids with warning |
pylabrobot/resources/plate.py |
Added set_well_volumes method; deprecated set_well_liquids method |
pylabrobot/resources/errors.py |
Added deprecation warning to CrossContaminationError.__init__ |
pylabrobot/resources/__init__.py |
Removed exports for deleted cross-contamination tracking functions |
pylabrobot/liquid_handling/standard.py |
Removed liquids field from aspiration/dispense dataclasses |
pylabrobot/liquid_handling/liquid_handler.py |
Removed liquid tracking and cross-contamination logic from aspirate/dispense operations |
pylabrobot/liquid_handling/backends/ |
Updated backends to remove liquid class detection from operations; simplified to default to Liquid.WATER |
pylabrobot/server/liquid_handling_server.py |
Removed liquid deserialization from API endpoints |
pylabrobot/visualizer/lib.js |
Simplified Container class to track single volume value instead of liquids array |
pylabrobot/visualizer/visualizer_tests.py |
Updated test to use new set_well_volumes API |
| Test files | Updated all tests to use volume-based API (set_volume, tracker.volume) instead of liquid-based API |
| Documentation notebooks | Updated examples to demonstrate new volume-based API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Raises: | ||
| ValueError: If the number of liquids does not match the number of wells in the plate. | ||
| volume: The volume to fill each well with, in uL. |
Copilot
AI
Nov 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstring mentions volume (singular) but the parameter is volumes (plural, a list). The description should be updated to clarify that this method accepts a list of volumes, one for each well.
| def set_well_liquids( | ||
| self, | ||
| liquids: Union[ | ||
| List[List[Tuple[Optional["Liquid"], Union[int, float]]]], | ||
| List[Tuple[Optional["Liquid"], Union[int, float]]], | ||
| Tuple[Optional["Liquid"], Union[int, float]], | ||
| ], | ||
| ): | ||
| """Deprecated: Use `set_well_volumes` instead.""" |
Copilot
AI
Nov 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deprecated set_well_liquids method is missing a deprecation warning. Since set_liquids in VolumeTracker emits a DeprecationWarning (lines 79-84 in volume_tracker.py), this method should also emit a deprecation warning to inform users that they should migrate to set_well_volumes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
https://discuss.pylabrobot.org/t/are-people-using-the-cross-contamination-tracker/370
the syntax is useless and it does not work well, so just delete it. it's better to not have it than have it whack