Refactor how well position numbers are calculate to be Fluent-trough compatible #65
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.
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(...)
orLabware(...)
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 inBaseWorklist
is modified to use a new, private methodself._get_well_position
instead ofLabware().positions
.EvoWorklist
/FluentWorklist
which route the call to the aforementioned functions.._get_well_position
is not marked abstract because some otherBaseWorklist
methods remain usable even without instances of model-specific worklist.._get_well_position
raises an informativeTypeError
instructing the user to useEvoWorklist
/FluentWorklist
for model-specific operations.Changes
BaseWorklist
tests were moved, because they are in factEvoWorklist
-specific.Labware.positions
was deprecated and emits aDeprecationWarning
when used.Trough(..., virtual_rows=...)
will not be relevant for operations inFluentWorklist
moving forward.