-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): Add skeleton of new Labware class
Closes #2261
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
from typing import List, Tuple | ||
from collections import OrderedDict | ||
|
||
|
||
class Well: | ||
""" | ||
This class represents a well within a labware. It provides methods for | ||
specifying a location within a well. | ||
""" | ||
|
||
def __init__(self) -> None: | ||
pass | ||
|
||
def top(self) -> Tuple[float, float, float]: | ||
pass | ||
|
||
def bottom(self) -> Tuple[float, float, float]: | ||
pass | ||
|
||
def from_center(self) -> Tuple[float, float, float]: | ||
pass | ||
|
||
|
||
class Labware: | ||
""" | ||
This class represents a labware, such as a PCR plate, a tube rack, trough, | ||
tip rack, etc. It defines the physical geometry of the labware, and | ||
provides methods for accessing wells within the labware. | ||
""" | ||
def __init__(self, defintion: dict) -> None: | ||
pass | ||
|
||
def wells(self) -> List[Well]: | ||
pass | ||
|
||
def wells_by_index(self) -> OrderedDict[str, Well]: | ||
pass | ||
|
||
def rows(self) -> List[List[Well]]: | ||
pass | ||
|
||
def rows_by_index(self) -> OrderedDict[str, List[Well]]: | ||
pass | ||
|
||
def columns(self) -> List[List[Well]]: | ||
pass | ||
|
||
def columns_by_index(self) -> OrderedDict[str, List[Well]]: | ||
pass | ||
|
||
|
||
def load(name: str) -> Labware: | ||
""" | ||
Load a labware definition by name. Definition must have been previously | ||
stored locally on the robot. | ||
""" | ||
pass | ||
|
||
|
||
def load_from_definition(definition: dict) -> Labware: | ||
""" | ||
Create a labware object from a labware definition dict | ||
""" | ||
return Labware(definition) |