Skip to content
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

Refactor how well position numbers are calculate to be Fluent-trough compatible #65

Merged
merged 7 commits into from
Apr 5, 2024

Conversation

michaelosthege
Copy link
Member

@michaelosthege michaelosthege commented Mar 26, 2024

This refactors how well position numbers are calculated and accessed, such that cross-compatibility between Tecan EVO and Tecan Fluent is maximized.

Problem

On the EVO, troughs have "virtual rows" that count into the Fortran-style well numbering.

On the Fluent, all wells in the same column are addressed by the column number.

Previously, Labware(...).positions was the lookup-dictionary encoding this information within robotools.
However, the construction of Trough(...) or Labware(...) is not specific to the EVO vs. Fluent, and such a dependency should not be introduced.

Solution

New functions are introduced to facilitate Tecan model-specific calculation of well position numbers:

  • evotools.get_well_position
  • fluenttools.get_well_position

The aspirate/dispense/distribute commands in BaseWorklist is modified to use a new, private method self._get_well_position instead of Labware().positions.

  • This new method must be implemented by EvoWorklist/FluentWorklist which route the call to the aforementioned functions.
  • ._get_well_position is not marked abstract because some other BaseWorklist methods remain usable even without instances of model-specific worklist.
  • ._get_well_position raises an informative TypeError instructing the user to use EvoWorklist/FluentWorklist for model-specific operations.

Changes

  • 🧹 Some unused test code was deleted.
  • 🚚 Some BaseWorklist tests were moved, because they are in fact EvoWorklist-specific.
  • 🔧 New functions, methods and refactoring as described above.
  • ⚠️ Labware.positions was deprecated and emits a DeprecationWarning when used.
  • ℹ️ The value of Trough(..., virtual_rows=...) will not be relevant for operations in FluentWorklist moving forward.

@michaelosthege michaelosthege added the enhancement New feature or request label Mar 26, 2024
@michaelosthege michaelosthege self-assigned this Mar 26, 2024
This prepares deprecation of the `Labware.positions` lookup dictionary
by providing an alternative, model-specific way to get position numbers.
These functions account for differences in how EVO vs. Fluent
address well positions in troughs.
…etters

This removes their dependency on `Labware.positions` which will be deprecated.
This lookup dictionary encoded a well numbering scheme
which differs between Tecan EVO and Tecan Fluent liquid handlers.

Users should use these functions instead:
* `evotools.get_well_position`
* `fluenttools.get_well_position`
@michaelosthege michaelosthege marked this pull request as ready for review March 26, 2024 14:18
@michaelosthege michaelosthege merged commit beb77d7 into master Apr 5, 2024
5 checks passed
@michaelosthege michaelosthege deleted the refactor-well-positions branch April 5, 2024 15:31
@github-actions github-actions bot locked and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants